• Closed by: Anonymous Submitter
  • Closed on:
  • Reason: Not a bug

Ticket #23627 - Problem with AMP product and category pages

When I’m reaching category page via AMP I’m getting below PHP fatal error:

2022/08/01 12:32:17 [error] 1793753#1793753: *167 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Cannot use object of type Category as array in /usr/share/nginx/modules/revsliderprestashop/revsliderprestashop.php:180
Stack trace:
#0 /usr/share/nginx/classes/Hook.php(1007): RevsliderPrestashop->hookOverrideLayoutTemplate()
#1 /usr/share/nginx/classes/Hook.php(431): HookCore::coreCallHook()
#2 /usr/share/nginx/classes/Hook.php(944): HookCore::callHookOn()
#3 /usr/share/nginx/classes/controller/FrontController.php(1367): HookCore::exec()
#4 /usr/share/nginx/classes/controller/FrontController.php(702): FrontControllerCore->getLayout()
#5 /usr/share/nginx/classes/controller/Controller.php(326): FrontControllerCore->display()
#6 /usr/share/nginx/classes/Dispatcher.php(518): ControllerCore->run()
#7 /usr/share/nginx/index.php(28): DispatcherCore->dispatch()
#8 {main}
  thrown in /usr/share/nginx/modules/revsliderprestashop/revsliderprestashop.php on line 180" while reading response header from upstream, client: 62.133.140.186, server: _, request: "GET /amp/category/10-bizuteria-medyczna HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "giorre-med.com"

When I’m reaching product page via AMP I’m getting another PHP fatal error:

It works when I disable productcomments module but I’m not sure if I want to disable it…

2022/08/01 12:38:52 [error] 1793753#1793753: *443 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /usr/share/nginx/modules/productcomments/productcomments.php:936
Stack trace:
#0 /usr/share/nginx/classes/Hook.php(1007): ProductComments->hookFilterProductContent()
#1 /usr/share/nginx/classes/Hook.php(431): HookCore::coreCallHook()
#2 /usr/share/nginx/classes/Hook.php(944): HookCore::callHookOn()
#3 /usr/share/nginx/modules/pkamp/controllers/front/ampProductController.php(64): HookCore::exec()
#4 /usr/share/nginx/modules/pkamp/controllers/front/product.php(97): PkampProductController->getCustomizations()
#5 /usr/share/nginx/classes/controller/Controller.php(306): PkampProductModuleFrontController->initContent()
#6 /usr/share/nginx/classes/Dispatcher.php(518): ControllerCore->run()
#7 /usr/share/nginx/index.php(28): DispatcherCore->dispatch()
#8 {main}
  thrown in /usr/share/nginx/modules/productcomments/productcomments.php on line 936" while reading response header from upstream, client: 62.133.140.186, server: _, request: "GET /amp/product/70-naszyjnik-zab-z-krysztalem HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "giorre-med.com", referrer: "https://giorre-med.com/amp

Can you tell me what is wrong? What should I do?

Comments

Maciej Strączkowski 01 Aug 2022, 13:29

Attaching prestashop informations

Attachments:

info.jpg (210.9 KiB)
Fred 01 Aug 2022, 13:51
Maciej Strączkowski 01 Aug 2022, 14:11

Hi Fred,

This solution helped me with the error on the product page.

But the problem on the category page related to the revslider still exists.
Should I do the same with

overrideLayoutTemplate

and module

revsliderprestashop

? Isn’t it important? :)

Fred 02 Aug 2022, 01:41

Please fill out all necessary fields in your profile https://support.promokit.eu/index.php?do=myprofile to access to your Back-office and FTP Server