Home › Forums › WoodMart support forum › Warning on php does not load the products in shop page
Warning on php does not load the products in shop page
- This topic has 9 replies, 2 voices, and was last updated 1 year, 2 months ago by
Artem Temos.
-
AuthorPosts
-
February 22, 2024 at 11:16 am #542696
supp0rtParticipantHello,
I am using Woodmart and for some reason, I see a warning on the server logs that does not let the products load on the shop page. Can you please assist me with that, as I can not find the source of the problem? I have pasted below the message.
Best Regards
February 22, 2024 at 11:34 am #542708
Artem TemosKeymasterHello,
Please, disable all plugins that are not related to our theme and provide us with your admin access. We will log in and check what is wrong there. You can leave only the following plugins that are required for our theme:
WoodMart core
WooCommerce
Elementor/WPBakery page builderThank you in advance
February 22, 2024 at 1:45 pm #542796
supp0rtParticipantI have created a staging site, provided temporary access and disabled all the plugins.
In case the problem does not show up, please check the live site URL I provided.
Let me know if there is anything else you need to know.
Best Regards
February 22, 2024 at 3:14 pm #542844
Artem TemosKeymasterWe just opened the shop page but don’t see any errors. Could you please clarify how to reproduce the problem?
February 22, 2024 at 4:28 pm #542882
supp0rtParticipantI can see what you are saying. The problem can be seen on the live site on mobile devices.
So I will try to find how this is reproduced:
Here are some thoughts and let me know if you can assist:
AH01071: Got error 'PHP message: PHP Warning: Attempt to read property "post_count" on null in ../wp-content/plugins/woocommerce/includes/widgets/class-wc-widget-price-filter.php on line 80 PHP message: PHP Warning: Attempt to read property "query_vars" on null in .../wp-content/plugins/woocommerce/includes/class-wc-query.php on line 873
These are the errors included on the server logs. The list goes on for about 10 to 12 lines on /class-wc-query.php
I use WP-rocket to page cache the content. Exclusions have been added to the exclusion list but this error pops up after some time. I also use AJAX on the shop pages.
Is there any query or is there any other file/option or something, that must be excluded, so that the post_count to finish the process of WC()->query->get_main_query() or be to be initialized properly?
This is like going in blind, as I do not have some standard info on how to reproduce it.
Any help would be appreciated. I have also posted the link below from the live site, where I can see the shop page empty of products, but on mobiles. This might happen as I use a separate cache for mobile devices, and it might not be flashed yet.
Any help or guidelines would be appreciated as most of the above might be some wrong guesses.
Best Regards
February 22, 2024 at 6:22 pm #542942
Artem TemosKeymasterAs far as we can see, this error is not related to our theme at all. That is why we need to be able to reproduce it and then check why it appears and if it is caused by WoodMart or not.
Kind Regards
February 23, 2024 at 12:40 pm #543127
supp0rtParticipantI understand what you say. Can you please provide me with information regarding the AJAX call for the products on the shop pages so I can try to exclude it from the delay or defer the js list on wp-rocket?
As I can not give you proper feedback on how you can reproduce it let me know about the information that you can provide, because If I can not find what is causing the problem, every support will claim that is not the plugin that fails on something.
Let me know your thoughts.
Best Regards
February 23, 2024 at 3:02 pm #543194
Artem TemosKeymasterHere is a file responsible for the AJAX shop page functionality
/js/scripts/wc/ajaxFilters.min.js
Kind Regards
March 11, 2024 at 4:56 pm #548110
supp0rtParticipantExcuse my late response, but I was monitoring the site’s behaviour.
@admin. Thank you for your response. It helped me to narrow down the problem.It seems that the culprit was an option inside the Plesk panel and under the security tab.
“Disable PHP execution in cache directories.” This was preventing the cached scripts from running properly, including woocommerce init. So if a widget was asking for a price tag in all products, the query was returning null.It might be something else in another case, but for this one, when I disabled this, the error disappeared on the same setup, with no updates occurring on the plugin.
Appreciate the help that you provided on the matter. You may close the ticket.
Best Regards
-
This reply was modified 1 year, 2 months ago by
supp0rt.
March 11, 2024 at 6:31 pm #548152
Artem TemosKeymasterWe are glad that you sorted it out! Feel free to contact us if you have any further questions.
-
This reply was modified 1 year, 2 months ago by
-
AuthorPosts
The topic ‘Warning on php does not load the products in shop page’ is closed to new replies.
- You must be logged in to create new topics. Login / Register