CompactCodeEU / FixProductBreadcrumbs

This is a Fix for Magento 2.2.4 and 2.2.5 where the Product Breadcrumbs are generated with JS normally and contain unwanted text.
GNU General Public License v3.0
32 stars 13 forks source link

There is an error when trying to access to Not Visible product #4

Open serzhik opened 5 years ago

serzhik commented 5 years ago

How to reproduce:

CompactCodeEU commented 5 years ago

What is the error that you are getting?

webmaker1 commented 5 years ago

Same error here.

when you view a disabled product, error 500.

getProduct() function in View.php throws an exception.

CompactCodeEU commented 5 years ago

This module will be reviewed and reworked in the coming 2 weeks. I will put it in the notification

givan808 commented 5 years ago

Same error. M2.2.3 I create and enable product - everything is OK. Then I disable/make invisible and try to follow the link - get this error:

Fatal error: Uncaught Error: Call to undefined method Magento\Framework\Controller\Result\Forward\Interceptor::getLayout() in /app/code/CompactCode/FixProductBreadcrumbs/Plugin/Product/View.php:62 Stack trace: #0 /vendor/magento/framework/Interception/Interceptor.php(146): CompactCode\FixProductBreadcrumbs\Plugin\Product\View->afterExecute(Object(Magento\Catalog\Controller\Product\View\Interceptor), Object(Magento\Framework\Controller\Result\Forward\Interceptor)) #1 /vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Controller\Product\View\Interceptor->Magento\Framework\Interception{closure}() #2 /generated/code/Magento/Catalog/Controller/Product/View/Interceptor.php(26): Magento\Catalog\Controller\Product\View\Interceptor->___callPlugins('execute', Array, Array) #3 /vendor/magento/framework/App/Action/Action.php(107): Magento\Catalog\Controller\Product\View\Interceptor->execut in /app/code/CompactCode/FixProductBreadcrumbs/Plugin/Product/View.php on line 62