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

Ticket #23965 - AMP not showing products on category and product pages


I am working on mobile version of the website and I noticed that AMP is not showing products on category and product pages.
How can I resolve this issue?



Fred 21 Nov 2022, 07:11

Hi, Alhemitzar Studio.
Please check out troubleshooting page here https://alysum5.promokit.eu/promokit/documentation/amp/troubleshooting.html it covers 99% of problems

Alhemitzar Studio 21 Nov 2022, 09:40

Hi Fred,

I’ve checked the link you’ve sent me, and I have already went through this list and I can not find what is wrong.
Homepage works just fine, the issue is with category and product pages. Category pages are blank (without products) while product pages are not opening (if you click on the product on the homepage you’ll get error 500 page).

Can you please help me to solve this issue?

Fred 21 Nov 2022, 12:25

I see strange error there - 412 Precondition Failed
it means your server blocks the request. I see the issue first time, so I assume that could depend on your server security configuration.
Do you have some specific security modules/settings?

Alhemitzar Studio 21 Nov 2022, 13:21

Hi Fred,
I just checked mod_security settings and I disabled rules which were triggering server response.
Now I can see products in the category, but I still have issues with single product page. There I get HTTP ERROR 500 (as you can see in the attachment).
I checked again on server to see if something is blocking the page, but I dont find any rules which are being blocked, so I activated error reports on the website and here is what I get as Error report:

Whoops, looks like something went wrong.
(1/1) FatalThrowableError
Call to a member function get() on null

in productcomments.php line 936
at ProductComments→hookFilterProductContent(array(’object’ ⇒ object(ProductLazyArray), ‘cookie’ ⇒ object(Cookie), ‘cart’ ⇒ object(Cart), ‘altern’ ⇒ 1))
in Hook.php line 1007

at HookCore::coreCallHook(object(ProductComments), ‘hookFilterProductContent’, array(’object’ ⇒ object(ProductLazyArray), ‘cookie’ ⇒ object(Cookie), ‘cart’ ⇒ object(Cart), ‘altern’ ⇒ 1))
in Hook.php line 431

at HookCore::callHookOn(object(ProductComments), ‘filterProductContent’, array(’object’ ⇒ object(ProductLazyArray), ‘cookie’ ⇒ object(Cookie), ‘cart’ ⇒ object(Cart), ‘altern’ ⇒ 1))
in Hook.php line 944

at HookCore::exec(’filterProductContent’, array(’object’ ⇒ object(ProductLazyArray), ‘cookie’ ⇒ object(Cookie), ‘cart’ ⇒ object(Cart), ‘altern’ ⇒ 1), null, false, true, false, null, true)
in ampProductController.php line 64

at PkampProductController→getCustomizations()
in product.php line 97

at PkampProductModuleFrontController→initContent()
in Controller.php line 306

at ControllerCore→run()
in Dispatcher.php line 518

at DispatcherCore→dispatch()
in index.php line 28

Can you please guide me how to resolve this problem?
Thank you for your time.

Alhemitzar Studio 21 Nov 2022, 19:53

Hi Fred,

I removed product comments from the hooks and it was still not working. Only when I disabled product comments module - it worked.
Now it is working fine, but for sure there is an issue between AMP module and product comments module.

Thank you for help!
Best regards

Fred 21 Nov 2022, 20:35

Yes, that was a conflict, but it’s already resolved and will be available in the next update