Okay
  Public Ticket #1846583
Swatches issue
Closed

Comments

  • Ivan started the conversation

    Hi, im experimenting some error related to Swatches.

    This is preventing the backend Catalog, Product and Categories to display, getting a 404 error. This is my PHP log:

    [08-Jan-2019 18:12:29] WARNING: [pool www] child 14 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to a member function isSwatchAttribute() on null in /usr/local/apache2/htdocs/vendor/magento/module-swatches/Helper/Data.php:518"

    [08-Jan-2019 18:12:29] WARNING: [pool www] child 14 said into stderr: "Stack trace:"

    [08-Jan-2019 18:12:29] WARNING: [pool www] child 14 said into stderr: "#0 /usr/local/apache2/htdocs/vendor/magento/module-swatches/Model/Plugin/EavAttribute.php(512): Magento\Swatches\Helper\Data->isSwatchAttribute(Object(Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor))"

    [08-Jan-2019 18:12:29] WARNING: [pool www] child 14 said into stderr: "#1 /usr/local/apache2/htdocs/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Swatches\Model\Plugin\EavAttribute->afterUsesSource(Object(Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor), false)"

    [08-Jan-2019 18:12:29] WARNING: [pool www] child 14 said into stderr: "#2 /usr/local/apache2/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->Magento\Framework\Interception\{closure}()"

    [08-Jan-2019 18:12:29] WARNING: [pool www] child 14 said into stderr: "#3 /usr/local/apache2/htdocs/generated/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php(1196): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->_..."

    172.18.0.4 -  08/Jan/2019:18:12:02 +0000 "GET /index.php" 500

    172.18.0.4 -  08/Jan/2019:18:12:29 +0000 "GET /index.php" 404

    ------ Same than this I found as a magento thread> https://community.magento.com/t5/Magento-2-x-Technical-Issues/Product-amp-Category-page-in-admin-is-not-working/td-p/108073

    Im running Magento 2.3.0 with Amely v.1.0.7.

    Hope you can help.

  • [deleted] replied

    Hello Ivan,

    Thanks for your ticket,

    Seem you didn't apply patch2.2+ and 2.3+ tor your site, please open Magento 2.1+\Patches\patch_for_magento_2.2+\ folder and Magento 2.1+\Patches\patch_for_magento_2.3+\ folder then apply 2 patches to your site, the problem will be resolved

  • Ivan replied

    Hi, I tried the solution but it dose not fix the issue, keep getting error message:

    -------

    [09-Jan-2019 14:55:57] WARNING: [pool www] child 147 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught Error: Call to a member function isSwatchAttribute() on null in /usr/local/apache2/htdocs/vendor/magento/module-swatches/Helper/Data.php:518"

    [09-Jan-2019 14:55:57] WARNING: [pool www] child 147 said into stderr: "Stack trace:"

    [09-Jan-2019 14:55:57] WARNING: [pool www] child 147 said into stderr: "#0 /usr/local/apache2/htdocs/vendor/magento/module-swatches/Model/Plugin/EavAttribute.php(512): Magento\Swatches\Helper\Data->isSwatchAttribute(Object(Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor))"

    [09-Jan-2019 14:55:57] WARNING: [pool www] child 147 said into stderr: "#1 /usr/local/apache2/htdocs/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Swatches\Model\Plugin\EavAttribute->afterUsesSource(Object(Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor), false)"

    [09-Jan-2019 14:55:57] WARNING: [pool www] child 147 said into stderr: "#2 /usr/local/apache2/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->Magento\Framework\Interception\{closure}()"

    [09-Jan-2019 14:55:57] WARNING: [pool www] child 147 said into stderr: "#3 /usr/local/apache2/htdocs/generated/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute/Interceptor.php(1196): Magento\Catalog\Model\ResourceModel\Eav\Attribute\Interceptor->_..."

    172.18.0.4 -  09/Jan/2019:14:55:52 +0000 "GET /index.php" 500

    172.18.0.4 -  09/Jan/2019:14:55:57 +0000 "GET /index.php" 404

    ----

    Just to be celar, readme file for patch_for_magento_2.2+ said:

    -----

    - upload app folder to your magento root folder
    - remove app/design/frontend/Mgs/claue/Magento_ConfigurableProduct
    - remove app/design/frontend/Mgs/claue/Magento_Swatches/web/js
    - run command: php bin/magento module:enable MGS_ClaueTheme
    - run command: php bin/magento module:enable MGS_Landing
    - run command: php bin/magento setup:upgrade
    - remove var/*
    - remove generated/code
    - run deploy command: php bin/magento setup:static-content:deploy -f

    ----

    In the: - run command: php bin/magento module:enable MGS_ClaueTheme of course I used MGS_AmelyTheme.

    But in this cases > 

    - remove app/design/frontend/Mgs/claue/Magento_ConfigurableProduct
    - remove app/design/frontend/Mgs/claue/Magento_Swatches/web/js

    I had no files or folder with those names to remove.

    Just proceeded to next line.

    patch_for_magento_2.3+ was implemented


    Hope you can help me fix this issue. 

  • [deleted] replied

    Dear Ivan,

    Thanks for your ticket,

    Could you please provide your site info ( site url, admin account and SSH account ) I will help to check for you

  • Ivan replied

    Thanks, this is a developer state right now, and we are working over a Docker development. Im trying to make a package so you can run locally and try to solve this issue, if this is ok for you?

  • [deleted] replied

    Hello,

    Yes this problem occurs when you didn't apply the patch2.2+, please open Magento 2.1+\Patches\patch_for_magento_2.2+\ folder, upload app folder to magento root, override old file then run the following commands

    php bin/magento module:enable MGS_Landing

    php bin/magento setup:upgrade

    rm -rf var/*

    rm -rf generated/*

    php bin/magento setup:static-content:deploy -f

    Note you have to connect to SSH, navigate to magento root before running any commands

    then refresh magento cache and check again