monoor
Forum Replies Created
-
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceticket number: #836817
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceon my test? No
logout link is like this:
domain.com/account/customer-logout/?_wpnonce=b17a658429
this happens when the nonce is same (not belonging to that user):
the user goes to the my-account user panel page (which is not cached) and logs out after receiving a confirmation.
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceOh, I’m sorry, I didn’t know.
I tested again, it is not usage-valid. Not even time-valid.
For each user, when he logs in, a separate nonce is created.
but do you really have to privatize it ?
So the answer to the question is yesForum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceI don’t understand, what should it be the same with?
I have a menu that has a logout button, the exit link is created by WooCommerce as I showed you.
This logout link is cached and since it creates a different nonce for each user, it does not work properly!
What happens after clicking on the cached logout link? The user goes to the my-account user panel page (which is not cached) and logs out after receiving a confirmation.
There is a question: How can I configure this link to have a private cache with ESI? As I said last time?:
1- so to cache privately, it should be used like this?:
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout noncels log when login user open ?test
I put it and the link of the logout button is still cached and the nonce it displays is the same for everyone
Forum: Plugins
In reply to: [Salt Shaker] login problemThanks, is this problem only on my site? Or on all sites?
If on all sites, then this plugin plays the most destructive role and disrupts the user experience.
So why is it useful?I use my-account WooCommerce login page, If it’s only on my site, do you have any suggestions on how to fix it?
Forum: Plugins
In reply to: [WooCommerce] delete image metadata problemIs there a way to disable WooCommerce image regenerator altogether?
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceWhen I clicked the logout button (and confirmed, because of cache and wrong nonce), this log was generated:
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceAs it is in the log, this role is not an admin:
[Router] get_role: customer
But I don’t know why admin bar is written yes.
And I tested this with a subscriber role, the result was the same as the previous report.
Anyway, isn’t wc_logout_url a function for WooCommerce? Shouldn’t the way its nonce work be the same on all sites?
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout noncels log (click here), log is for a user with the customer role
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceNo I didn’t, please guide me how to do it?
This is the code that creates the menu list and the LOGOUT button link at the end:
<?php foreach ( wc_get_account_menu_items() as $endpoint => $label ) : ?>
<li class="<?php echo wc_get_account_menu_item_classes( $endpoint ); ?>">
<a href="<?php echo esc_url( wc_get_account_endpoint_url( $endpoint ) ); ?>"><?php echo esc_html( $label ); ?></a>
</li>
<?php endforeach; ?>We can also have the LOGOUT button outside the FOREACH like this:
<li class="wc-account-menu-item logout">
<a href="<?php echo esc_url( wc_logout_url() ); ?>">logout</a>
</li>- This reply was modified 8 months ago by monoor. Reason: add alone logout
Forum: Plugins
In reply to: [LiteSpeed Cache] esi and private cache problem with logout nonceThanks, 1- so to cache privately, it should be used like this?:
add_action( 'litespeed_esi_load-my_esi_block', 'my_esi_block_esi_load' );
function my_esi_block_esi_load()
{
do_action( 'litespeed_control_set_private' );
echo "hi";
}2- If we don’t set ttl, the cache will remain indefinitely?:
do_action( 'litespeed_control_set_ttl', 300 );
3- Is there a way to force the content cache of this esi to be cleared during an operation?
(only for that user)Forum: Plugins
In reply to: [LiteSpeed Cache] esi problem for admin barIt worked and the test was successful, thank you
Just a few questions:1- That this will not affect the performance of caching on users?
2- Will the permanent update to fix this problem interfere with this code?
3- Will the time for permanent update to fix this problem come soon or late?
Forum: Plugins
In reply to: [LiteSpeed Cache] esi problem for admin barSo we have to wait for LS C update. Is this a new known problem? Or has it been around for a long time and has not been addressed?
To predict the time to fix the problem…
Forum: Plugins
In reply to: [LiteSpeed Cache] esi problem for admin barThere is no way to turn off ESI for the admin role?
Filter or…?