@gabbsmo please send a report to Litespeed.
This can be done from LSC => Toolbox => Report => Click on “Send to Litespeed”
And share the ID generated.
Thank you
@litetim report number: ZKYGXKPT
@gabbsmo
I see you have a stage site.
Please add this code https://pastebin.com/3ETU1kBL
You can make it as a plugin or simply add to functions.php
Instead of the blank no referer page, a full request dump + diagnosis. Please paste these logs(maybe use pastebin too).
@litetim Here is the dump: https://pastebin.com/6cJK4bEK
It says that the referrer header is missing and that you need to purge manually from the dashboard. Is this expected? If yes, where can I post a feature request?
It would be good if the ‘purge this page’ functions and possible others were not dependent on the referrer header. There are many things that can interfer with it. Something less error prone like a query parameter would be nice. Example: /wp-admin/admin.php?LSCWP_CTRL=purge&LSCWP_NONCE=[REDACTED]&litespeed_type=purge_front&litespeed_redirect_to=/path/to/purged/page
PS
I suspected that my browser’s ad blocker or my site’s cookie consent plugins could interfer but the error reproduces with these disabled as well. Maybe it is the browser itself messing with the headers.
The debug script had a syntax error. Here is the version I used in the end: https://pastebin.com/wew0dLsN
@gabbsmo
Please remove the test code.
browser ad blocker => it should not interfeer
cookie consent => is it loading in admin? usually is JS running and does not modify header
ONE thing you can do is disable them one by one and see what is happening
The Dynamics 365 form embed is the likely source, but a security-headers or consent plugin could also set it per-page. I also see Cloudflare in front of the site — if DevTools shows Referer being sent but the server doesn’t receive it, check Cloudflare → Rules → Transform Rules for a Modify Request Header rule.
Meanwhile, Toolbox → Purge → Purge by URL works regardless and will purge that page fine. We’re also looking at making “Purge this page” not depend on the referrer at all.
@litetim
I meant that I already tested disabling cookie consent and ad blocking.
> We’re also looking at making “Purge this page” not depend on the referrer at all.
Thank you for confirming that this is already on your radar. I will mark this resolved. Please let me know if there is public link where I can track this issue.
@gabbsmo until we look into. Are you able to narrow down where the issue come from?
Start with forms first.
Thank you
@litetim I tested removing the form from the page and that made purging work. Does that answer your question?
@gabbsmo yes.
Please send me the link of plugin, WP plugins link and let me look into(from here: https://wordpress.org/plugins/ ).
Or how do you load the forms?
I cannot figure out which is the plugin you are using.
@gabbsmo One thing I would like to change from my previous messages:
We’re also looking at making “Purge this page” not depend on the referrer at all.
I spoke with devs and there will no be changes to this part. Referer is used to identify which page to clear. Adding a query string with link is a security issue and will add more problems than it solves.
Please reopen the issue and let’s figure out what happens and try to fix this.
@litetim I see. Unfortunately this support form does not seem to allow for reopening resolved threads from what I can see. Is it OK if continue discussing here?
It is a custom plugin – though a very simple one: https://pastebin.com/m5S3gSmq
It puts Dynamics 365’s form script in <head> and registers a shortcode that can be used to embed forms on pages. It only works in domains that are verified by our Dynamics 365 tenant so unfortunately it is not usable for testing outside our sites.
To narrow down the issue I tried removing <script>function disableCookiesUsage(){return true;}</script> (that enables the privacy-first mode for Dynamics 365) but did not have any effect on our issue.
Our issue goes away if I remove the shortcode content. So it seems that it is not enough to just embed the script on the page to reproduce the issue.
@litetim I think I found the culprit. The script from Dynamics 365 will add this tag on the page: <meta name="referrer" content="never">. The issue with cache purging reproduces by just adding this to the page in a custom HTML block.
@gabbsmo but something is strange from get go: the forms should run only in frontend, not in admin area. Try using: https://developer.wordpress.org/reference/functions/is_admin/ to wrap the code
@litetim Thank for the suggestion. I will consider that as a workaround.
@litetim If removing the reliance on the Referrer header is not possible – can you make the error message more user friendly? It should let the user know whether the page was purged or not and that redirect back was not possible and why. Now it just says “no referrer” in plain text.