hernan2022
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] Rating problem in Extra ThemeI have failed miserably. While automatic purging made it more likely that the correct version would be displayed, it failed again
I had not understood the nature of the problem. What actually happens is that it always works fine UNTIL someone reviews the post that already rated it again. At that moment the server verifies that the user has already given a rating and shows the rating that was given
So far so good, but the server is going to cache the version it showed to the person who revisited its own rating. The post will appear with a given rating for everyone else, that’s why it had so many inconsistencies and I didn’t know why it was due
Due to a date issue I am disabling this functionality, I prefer to show simplicity rather than show errors or failures. But in the medium or long term I would like to consider implementing it again
An idea or path for the future would be ideal, in any case thanks
Forum: Plugins
In reply to: [LiteSpeed Cache] Rating problem in Extra ThemeThanks for the push, I already solved the problem (with the help of Elegant Themes support, to be fair they finally helped me too). The final code is something similar to this:
function custom_purge_rating($approved, $comment_data) { // Check if the comment is approved (status '1' means approved) if ($approved == '1') { $post_id = $comment_data['comment_post_ID']; do_action('litespeed_purge_post', $post_id); } return $approved; } add_filter('pre_comment_approved', 'custom_purge_rating', 10, 2);
It was too difficult to get the post id from the theme’s functions or attributes. In this code we would be using attributes from the WordPress core
Thank you very much, regards
Forum: Plugins
In reply to: [LiteSpeed Cache] Rating problem in Extra ThemeMy code is wrong, I’ve done debug testing and I’m not actually capturing the post id
I see it logical but it is not correct
Forum: Plugins
In reply to: [LiteSpeed Cache] Rating problem in Extra ThemeIt is difficult to me modify the file in Child Theme (parent defines it as a core file)
So I am transforming the idea into a snippet to copy into functions.php. I have come to this:
function custom_purge($commentdata) { if (defined('LSCWP_V')) { $post_id = $commentdata['comment_post_ID']; do_action('litespeed_purge_post', $post_id); } } add_action('pre_comment_approved', 'custom_purge', 10, 1);
But it still doesn’t work, I sense that I must be close to the solution. For example, I visit the website from my phone and see the rating already selected (bug). I manually purge the cache of everything, refresh on my phone and can vote rating
I see the correct code snippet, it is consistent with the information managed by ratings.php I think
I don’t know what to do
Forum: Plugins
In reply to: [LiteSpeed Cache] Rating problem in Extra ThemeYes, I can confirm that the problems go away when I disable LiteSpeed
I have once again insisted on Elegant Themes, they are very reluctant to speculate on the causes or alternatives to follow. However, after insisting, they explained to me that the rating information is stored in template-tags.php and that it is finally stored in a database with core WordPress functions. I attach this file also in dropbox
The truth is I’m a little stunned. Maybe the problem is simpler and I would just have to ensure that that page is purged when someone leaves a rating (that is, the same as when a comment is approved in wordpress)
The ratings.php file apparently has an approval function (extra_rating_pre_comment_approved) (ratings are approved automatically) even a little further down there is a php filter already created(pre_comment_approved). Maybe with this I could create a purge function to the page that received rating?
I’m a little overwhelmed any advice is very welcome, thank you very much
Forum: Plugins
In reply to: [LiteSpeed Cache] Rating problem in Extra ThemeThanks for answering. It is a simple rating system, the visitor who enters for the first time should see the 5 gray stars, once a preference has been marked this decision should be maintained. When a post is bugged, the news visitor sees a marked star already (for example, in the image capture the new devices saw 4 stars marked without having marked them themselves)
My level is very basic, I wouldn’t know if there are cookies involved. Reviewing the ratings.php file (the dropbox file) I have also come to think that it is a problem in the function that rescues the visitor’s IP. I think I’m going to insist on Elegant Themes, they can’t leave me with nothing, at least they should help me understand the problem I think
It would be great if you can implement compatibility with webp images, they are images that are increasing in popularity and use ??
https://gamipress.com/add-ons/gamipress-buddypress-notifications/
Sorry for the mess, I can’t edit the previous posts I have done many tests and I am pretty sure that there is a compatibility problem with that addon or with gamipress itself
When the same trigger is used as gamipress points next to its notification in BuddyPress the action can only contain one buddypress action, the second buddypress action will fail
For example, I have created an automation if the user creates a topic in a specific forum the user will change profile type (wordpress) join a group (buddypress) but if I put change profile type (buddypress) I will have a problems
Edit: I have done more tests and the truth is if I use the same trigger as in gamipress I will still have problems with the buddypress actions, be it one or two additional actions, I have tried chaining actions to vary the trigger but it is not a solution either, some action from buddypress is going to fail anyway
- This reply was modified 2 years, 2 months ago by hernan2022.
I have done more tests, it is not a problem with tildes (the name of the group has a tilde) the problem occurs only when more than 2 actions of buddypres are performed on the same trigger (remember that I would like to use the same trigger to reward and notify by notification buddypress)
- This reply was modified 2 years, 2 months ago by hernan2022.
The truth is quite disappointing, it is expected that the people who use GamiPress prefer AutomatorWP hoping for good compatibility as it is the same developer
What I finally did is automate what I can run without error and do the final adjustments in BuddyPress manually.
So that you have all the information summarized and ordered:
– There is a GamiPress paid addon that allows you to automate BuddyPress notification when you win or lose points
– When using the same trigger in AutomatorWP, the actions in BuddyPress will conflict, especially if more than one action is planned in BuddyPress. For example, I would like in this trigger to change the type of profile and join a group. What is not possible, in the log the trigger can appear and maybe complete one buddypress action but not two actions (so in the final log it will not count as completed automation)
– The action that I can never really complete is join a group
- This reply was modified 2 years, 2 months ago by hernan2022.
- This reply was modified 2 years, 2 months ago by hernan2022.
- This reply was modified 2 years, 2 months ago by hernan2022.
Oh anyway I’ve been having problems, I think I know where the problem is
I think it is an incompatibility with GamiPress when using BuddyPress (I have the paid addon that allows sending buddypress notifications when points are won or lost). The notifications are triggered in the same trigger that I am using for the other automations
I had forgotten these items, my installation is more complex than I had first considered
Although it is truly difficult to analyze my case, it may be another factor. Right now I have separated the automations that involve buddypress. So if they fail you won’t be interrupted by other automations
The solution was too simple, I feel so ashamed
I fixed it by grouping all actions into a single automation. I can’t explain why I had it separated into separate automations. When someone creates a topic in that forum, they also receive points for Gamipress, a notification is even triggered
There were too many events, it was expected that at some point something would go wrong. But now everything works fine, thank you very much!
Gracias, es horrible recibir esos mensajes. Específicamente en mi caso los pude superar deshabilitando minificación y combinación de CSS. Los volveré a habilitar en la próxima update del plugin
Aunque cabe la posibilidad que en realidad Google tuvo un problema y envió esos mensajes destruyendo los nervios a las demás personas. Es difícil saber con certeza
Pero muchas gracias por el consejo, si volviera a tener problemas de visibilidad móvil hago downgrade de version en lite
Saludos !
Forum: Plugins
In reply to: [NSFW] [LiteSpeed Cache] Browser cache problem (according to wordpress)Thank you !
From what I’ve been able to find out, it’s most likely unrelated to LiteSpeed. For prevention I have disabled minification and combination of CSS styles, at least until the verification is complete and that warning is released.
Anyway, any advice is welcome
Thank you