Failed to open product from Magento Backend, it shows fatal error

Mistake:

Fatal error: Call to member function getConfig () for non-object in \ app \ code \ core \ Mage \ Adminhtml \ Block \ Catalog \ Product \ Helper \ Form \ Gallery \ Content.php on line 50

Fatal error on product page in frontend:

Fatal error: Call to member function getMediaUrl () on non-object in \ app \ code \ core \ Mage \ Catalog \ Model \ Product.php on line 1018

+3


source to share


3 answers


I'm really sure your problem is in your .gitignore. I recently had the same problem and it is because my .gitignore had media / as one of the entries. Well, go figure that went deep into the core inside Adminhtml, this path: Application / Code / Core / Mage / Adminhtml / Block / Media / This gitignore excluded this folder NOT just the main media folder in the root directory Magento installations. Check your codebase, I suppose the folder is missing on your remote server. After you update your .gitignore to be added, and of course, after you move your code and pull it to a remote server, everything works as expected. I changed my gitingore to be more specific here parts with media folders / Directory / media / client / media / DHL / media / xmlconnect /



+2


source


The error is Call to a member function getConfig() on a non-object in \app\code\core\Mage\Adminhtml\Block\Catalog\Product\Helper\Form\Gallery\Content.php on line 50

caused by the absence of the Uploader.php file located in

app / code / core / Mage / Adminhtml / Block / Media / in most cases.



For example, when moving from one node to another, this file may be lost

due to access restrictions, I mean that reading this file is prohibited for everyone. This is only allowed for the owner of the file and members of the owner's group.

0


source


This is one suggestion that you should check. Follow these steps:

1. Check your Magento version (eg go to admin, scroll to bottom announcement, see version number).
2. Find this version of Magento on the Internet and download it.
3. Copy the application / code / kernel directory, overwrite the existing directory.
4. If you pulled the filesystem out of git, then don't overwrite anything while you work through steps one through three
. 5. Try accessing the product again.

Which Magento version are you using, which PHP version? What operating system?

0


source







All Articles