Rating problem in Extra Theme
-
Hello, I have a cache problem in Extra Theme (it is a theme from Elegant Themes, the same developers of DIVI). My programming level is quite basic. The project is not “live” yet, so I can test freely
This theme has an integrated rating system, visitors can give 1 or 5 stars to each post. I would very much like to maintain the rating system, the theme shows this information in various sections of the website and it would also help me a lot to evaluate if the entries really help or add value
When I installed LiteSpeed I noticed that many times visitors see the rating marked without having voted. For example, some devices enter in a post and immediately see this, without being able to vote themselves:
I have carried out the tests on many devices without sharing Wi-Fi (to ensure that the IPs are completely different). The weird thing is that sometimes it works as expected (even adding up the total vote and calculating an average) But eventually it gets stuck until the next cache purge
I have contacted Elegant Themes, they can’t really explain why, they simply apologize and offer me another caching plugin. But I can comment that the file for this functionality, located in extra/includes/ratings.php, looks something like this:
Apparently the operation of the rating system is very similar to that of the comments. With this code snippet I can see the ratings in the WordPress backend as regular comments:
add_action('init', 'ebc_show_ratings_comments'); function ebc_show_ratings_comments() { if (is_admin()) { remove_filter( 'pre_get_comments', 'et_pre_get_comments_filter' ); } }
Here I have introduced the bug in a post (basically I vote on several different devices, it usually fails after the third). But depending on the duration of the cache they may see it functional, but eventually it gets stuck again:
https://brevenoticia.cl/nacional/15-09-2023/making-bug-for-support/
Sometimes I can “speed up” the problem by rating while logged in, this action causes a bug in the post instantly (unfortunately it also gets stuck among disconnected visitors) Where could the problem be? What I can do?
Any advice or help is very welcome
Report Number: SSCTMWME
Thank you so much !
Greetings
The page I need help with: [log in to see the link]
- The topic ‘Rating problem in Extra Theme’ is closed to new replies.