Hi,
I have encountered another issue related to caching with Litespeed cache.
When users fill out the fields on the submit listing page and click on submit, the form reloads without submitting. On reload, this happens:
- The title and the description fields “look” empty: they are visually empty but sometimes, reloading manually automatically submits the form with the correct data. Most times you reload manually and nothing happens, they stay empty.
- After the automatic reload, you fill in the title and description again, click on submit, and get an error message “The Region field contains an invalid value”
After much testing, the issue is with Litespeed cache (again!), and specifically the Object cache. Turning it OFF solves all problems.
I can confirm, for one, that the Region error keeps appearing after each submit try, until the object cache TTL expires (currently 6 minutes), because if I set the Object cache to 1 second, the Region error does not appear (effectively it is like turning Object cache OFF). So it all points to Object cache.
The Litespeed cache settings are as recommended by Hivepress tutorial, except:
- All CSS and JS optimizations are OFF, due to other issues in my case
Cache logged in users is OFF. Cache REST API is OFF (as per recommendations).
Only when object cache is OFF, all works fine, forms submit, and no error messages are shown. No other settings help. I have been close to 20 hours trying different settings, also according to different A.I. answers. Excluding URIs (including the hivepress submit listing URI and hivepress wp-json URIs), adding DO Not Cache groups, etc, don’t work. Forcing reloads doesn’t work either. I have also deactivated ALL other plugins, except Litespeed and Woocommerce, and the issues remained. I also rolled back Hivepress versions and Litespeed versions, with no luck.
However, adding “transient” to the Do Not Cache groups seems to solve the “Region” error (not the reloading issue). I think it is not a good idea to add transient to this group, although it might point in the good direction for a solution.
I can only think there are conflicts related to:
- Hivepress API calls and object cache
- AJAX reload (after category selection) and object cache
- Transients and object cache
- A combination of all of the above
The issues don’t happen in the edit listing form.
I hope someone had the same issues and found a solution…