cancel
Showing results for 
Search instead for 
Did you mean: 

Product & Category page in admin is not working

Product & Category page in admin is not working

Hello Everyone.

   I  un-commented the ini_set(display_errors,1); in app/bootstrap.php to see the error and following is the output when i try to access the Categories or Products management page from the admin panel.

 

Fatal error: Uncaught Error: Call to a member function isSwatchAttribute() on null in /var/www/html/magento2/app/code/Magento/Swatches/Helper/Data.php:532 Stack trace: #0
/var/www/html/magento2/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php(510): Magento\Swatches\Helper\Data->isSwatchAttribute(Object(Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor)) #1 ​
/var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(146): Magento\Swatches\Model\Plugin\EavAttribute->afterUsesSource(Object(Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor), false) #2 ​
/var/www/html/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->Magento\Framework\Interception\{closure}() #3 ​
/var/www/html/magento2/generated/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php(1183): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->___callPlugins('usesSource', Array, Array) #4 ​
/var/www/ht in /var/www/html/magento2/app/code/Magento/Swatches/Helper/Data.php on line 532

 

Thank you! 

5 REPLIES 5

Re: Product & Category page in admin is not working

Hi @dhwanil_shah1

 

Looking at the error - its coming from app/code/magento directory - so just to confirm with you - which magento 2 version are you using ?

 

Also here - /magento2/app/code/Magento/Swatches/Helper/Data - in this location have you created any custom module or anything ? as error is coming from there only!

if issue solved,Click Kudos & Accept as Solution

Re: Product & Category page in admin is not working

Hello @dhwanil_shah1

 

It seems you made any customization related to Swatches, is it? or it is calling 

file magento2/app/code/Magento/Swatches/Helper/Data.php line @532 

 Please confirm once.

Manish Mittal
https://www.manishmittal.com/

Re: Product & Category page in admin is not working

Hi Manthan,

    Thanks for your reply and to answer your first question, I am using version 2.2. Also, no I have not made any changes. I just stopped working after I uploaded Amely theme from ThemeForest.

 

Regards,

Dhwanil

Re: Product & Category page in admin is not working

Hi Manish,

 

  Thanks for you reply, I have not made any changes or customization in Swatches. I have barely made any changes and most of them are basic URL setting changes and it stopped working after I uploaded the new theme.

 

Regards,

 Dhwanil

Re: Product & Category page in admin is not working

Hi 

 

please post solution of this issue.