56
votes
Accepted
Magento 2.2.2 : Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes)
Try following commands:
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento cache:clean
//To run ...
25
votes
Notice: unserialize(); Error at offset in Magento 2.2
Inject \Magento\Framework\Serialize\Serializer\Json class for serialize and unserialize values.
protected $serialize;
public function __construct(
...
\Magento\Framework\Serialize\Serializer\...
14
votes
Magento 2 Full Page Cache not working
We had the same issue after enabling FPC. The following error would occur:
Fatal error: Uncaught Error: Call to a member function getIdentities() on null in /vendor/magento/module-catalog/Block/...
13
votes
Accepted
Magento 2: How to get order data in observer on success page
checkout_onepage_controller_success_action give you order id's
by using $observer->getEvent()->getOrderIds().
This does not given order object directly so, you are getting the error
Then ...
13
votes
getting Fatal error: Class 'IntlDateFormatter' not found in magento 2.1.8
Check your php version :
php -v
Check php-intl packages available :
sudo apt search php | grep intl
Install the php-intl according to your php version (7.1 in my case) :
sudo apt install php-intl ...
11
votes
Accepted
PHP Fatal error - Call to undefined method Magento\\Catalog\\Model\\Product\\Type\\Simple::getConfigurableAttributeCollection()
I had the same problem and when I changed
$objectManager->get('\Magento\Catalog\Model\Product')->load($productId)
into
$objectManager->create('\Magento\Catalog\Model\Product')->load($...
10
votes
Magento 2.0.2 installation, fatal error: DOMDocument
Install these 2 extention and restart apache
sudo apt-get install php7.1-dom
sudo apt-get install php7.1-xml
sudo service apache2 restart
Note: php version according to your current php version
10
votes
Cannot instantiate abstract class Magento\Catalog\Block\Product\View\AbstractView
The following command will helps you.
Please Run Upgrade Command:
php bin/magento setup:upgrade
10
votes
addAttributeToSelect Call to undefined method M2
You have to replace addAttributeToSelect('*') with addFieldToSelect('*')
addAttributeToFilter() is used to filter EAV collections.
addFieldToFilter() is used to filter Non-EAV collections.
8
votes
setup:di:compile error because of duplicated class of data-migration-tool
A more direct answer to this problem is:
At the top of the file: {magento-base}/vendor/magento/data-migration-tool/tests/unit/testsuite/Migration/Step/UrlRewrite/Version11410to2000Test.php
Replace:
...
7
votes
Magento 2.2.2 : Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes)
A quick solution is
php -dmemory_limit=6G bin/magento setup:static-content:deploy
Try this, Its worked for me.
7
votes
PHP Fatal error: Cannot redeclare __() (previously declared in /vendor/magento/framework/Phrase/__.php:15) in /app/functions.php on line 23
This is original content of app/functions.php file:
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Create value-object \Magento\...
6
votes
Accepted
Uncaught TypeError: Argument 1 passed to [...] must be an instance of
I found that in the LN module 2 different namespace declarations was used: Layerednavigation and LayeredNavigation. When code is compiled all di class arguments was stored in the array where the class ...
5
votes
Magento 2.0.2 installation, fatal error: DOMDocument
I know this is a pretty old question, but just in case someone came here (as I did)...
You have to install the php-dom module on your system, on debianlike systems:
apt-get install php-xml
And ...
5
votes
I am getting Fatal error: Class 'IntlDateFormatter' not found in Magento2
sudo apt-get install php7.0-intl did the trick for me on Ubuntu 18.04.
(That's with this PPA repo containing a backport of PHP sudo add-apt-repository ppa:ondrej/php.)
5
votes
Fatal error: Call to a member function setArea() on a non-object in /home/hoods/public_html/app/code/core/Mage/Adminhtml/Controller/Action.php
I just had the same and found out by debugging that there was an invalid rewrite for the layout model Mage_Core_Model_Layout. In fact, I had an incomplete install of Inchoo_PHP7 where the config.xml ...
5
votes
Accepted
Magento2: Cannot instantiate interface Magento\Vault\Api\Data\PaymentTokenInterfaceFactory in Cart and Checkout
At first, please, provide Magento version of your application.
Starting Magento >= 2.1.3 version the Magento\Vault\Api\Data\PaymentTokenInterfaceFactory is no more autogenerated factory (the ...
5
votes
check file uploaded or not without $_FILES in Magento 2
This will resolve the problem. Put this in controller.
$files = $this->getRequest()->getFiles()
Here is
Magento2 :: Accessing $_FILES using Magento Framework
5
votes
Accepted
How to resolve unserialize issue
As per magento 2.2 release note, Now you can not use direct serialize and unserialize PHP functions.
To solve this issue Inject \Magento\Framework\Serialize\Serializer\Json class for serialize and ...
5
votes
Magento 2.2.2 : Allowed memory size of 792723456 bytes exhausted (tried to allocate 184320 bytes)
792723456 bytes mean 756 MB.
This is the value that Magento suggests and is the default on their sample configs(nginx in particular).
Do try everything that @Pratik Oza suggested and let me point to ...
5
votes
PHP Fatal error - Call to undefined method Magento\\Catalog\\Model\\Product\\Type\\Simple::getConfigurableAttributeCollection()
Check your custom modules or extensions and find if you are using either of the following -:
Magento\Catalog\Model\Product (in the constructor)
$this->_product->load($id)
or
$this->...
5
votes
Magento 1.9 - HTTP ERROR 500 and PHP Fatal error:
It seems you're using the Magento Compiler. You'll need to refresh or disable. In my case, I prefer to disable the Compiler.
The easier way is using Magento shell. Go to the shell directory and then ...
4
votes
Controller not loading Grid container Error: Class 'Mage_Reviewmycompany_Helper_Data
Your helpers calls in your Grid.php are wrong.
You need to replace:
Mage::helper('optFirst_reviewMyCompany')
With :
Mage::helper('optfirst_reviewmycompany')
The value inside the Mage::helper ...
4
votes
Uncaught TypeError: Argument 1 passed to [...] must be an instance of
The following sequence of actions usually help me to resolve such errors:
bin/magento cache:flush
remove var/generation and var/di
bin/magento setup:di:compile
4
votes
Accepted
Magento 2 : Fatal error - Cannot instantiate abstract class Magento\Wishlist\Block\AbstractBlock
The following command will helps you.
Please Run Upgrade Command:
php bin/magento setup:upgrade
4
votes
Magento2 Fatal error: Interface 'Iterator' not found
I have had the same on a local machine and restarting Apache and MySql fixed it.
4
votes
Accepted
Fatal error after changing robot.txt setting
Solution: To solve this problem, run following commands.
Delete the var directory from your root directory
php bin/Magento setup:upgrade
php bin/Magento setup:static-content:deploy
php bin/Magento ...
4
votes
Magento 2.2 error: Unable to unserialize value
The problem is in /vendor/magento/framework/Serialize/Serializer/Json.php there is a function unserialize($string) which gives you a syntax error if the string is already serialized.
There is a ...
4
votes
Accepted
Fatal error after upgrade from 2.1.8 to 2.2.0
I fixed the issue.
The root cause was that the app/code/MagePal/GmailSmtpApp-module wasn't updated when I used the web upgrade. My Magento-installation still contained old files. The error message ...
4
votes
addAttributeToSelect Call to undefined method M2
Try with
$collection->addFieldToSelect('*');
which is exist under
\Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
and
addAttributeToSelect
method exist under
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
fatal-error × 361magento2 × 105
magento-1.9 × 101
error × 34
php × 21
magento-1 × 21
magento-2.1 × 18
admin × 14
magento-1.7 × 11
magento2.2 × 11
setup-di-compile × 11
magento2.3 × 10
magento-1.8 × 8
database × 8
configurable-product × 8
event-observer × 8
admin-panel × 8
php-7 × 8
checkout × 7
module × 7
category × 7
customer × 7
extensions × 7
upgrade × 7
memory × 7