Skip to main content
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 ...
Pratik Oza's user avatar
  • 4,002
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\...
Prince Patel's user avatar
  • 22.9k
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/...
Paul Blundell's user avatar
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 ...
Amit Bera's user avatar
  • 77.7k
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 ...
DevonDahon's user avatar
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($...
Zsolti's user avatar
  • 746
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
Surendra Kumar Ahir's user avatar
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
NIRAJ SHARMA's user avatar
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.
PЯINCƎ's user avatar
  • 11.7k
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: ...
iJeep's user avatar
  • 621
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.
Divya Sekar's user avatar
  • 1,295
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\...
Adrian's user avatar
  • 366
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 ...
Siarhey Uchukhlebau's user avatar
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 ...
Ander's user avatar
  • 191
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.)
the's user avatar
  • 331
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 ...
Andreas von Studnitz's user avatar
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 ...
joni jones's user avatar
  • 2,559
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
Meetanshi's user avatar
  • 989
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 ...
Prince Patel's user avatar
  • 22.9k
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 ...
1337_sanc's user avatar
  • 389
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->...
Gagan Nayyar's user avatar
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 ...
Muhammad Hasham's user avatar
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 ...
Raphael at Digital Pianism's user avatar
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
Sergii Ivashchenko's user avatar
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
NIRAJ SHARMA's user avatar
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.
Supersonic's user avatar
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 ...
Manthan Dave's user avatar
  • 9,906
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 ...
Edmund's user avatar
  • 545
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 ...
user5198077's user avatar
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 ...
kunj's user avatar
  • 3,709

Only top scored, non community-wiki answers of a minimum length are eligible