-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All links in cached page appended with ?stage=Live in v4.11.11 of framework #150
Comments
Hi Olly, Your issue is also referenced here -> symbiote/silverstripe-queuedjobs#361 Can you elaborate a bit on how to replicate this ? I'm running the staticpublisher in production (from cli) and do not have this problem. |
After digging a bit more, I found that "?stage=Live" is only appended to page links when static publishing via the “StaticCacheFullBuildJob”, but not “GenerateStaticCacheJob”. The latter being used to refresh the cache when edits to a page are published. I am developing on a windows environment (XAMPP) and can't seem to get the build tasks to run on the command line with sake. So I use the "/dev/tasks/SilverStripe-StaticPublishQueue-Task-StaticCacheFullBuildTask?flush=1" in the browser to queue a full build and then run this in the QueuedJob section. On a side note, the browser outputs "SilverStripe\StaticPublishQueue\Job\StaticCacheFullBuildJob added to the queue for immediate processing", yet the job is just queued and needs to be manually run. I hope that helps track down the cause, but let me know if you need anything else. To others that are also need a quick fix, I worked around this by overriding urlsToCache() on Page.php so publishing any page adds a full build using the "GenerateStaticCacheJob" which doesn't append the stage:
Cheers, |
I dot not see this issue in V5.3.0. Oddly enough, for me the problem is that the StaticCacheFullBuild job adds a couple of ?stage=Stage urls to the list of urls to process. In my case, out of 182 url's in total, 7 of them have the stage added to the URL. This results in the task being paused and stuck on 175 (182-7) correctly published pages. @ollyradford , can you try reproducing this with a the latest versions of all modules ? |
@lars-lemon8 is there something special about those 7 pages? Custom extensions? Redirector pages? Something else? |
@michalkleiner , They are included in a urlsToCache() method. I created a related ticket for the issue -> #159 |
As reported in issue #102 (for SS v3), cached links still have the stage appended when static publishing in SS v4.
Tested with silverstripe v4.11.11 and staticpublishqueue v5.2.
Did anyone figure out the cause?
The text was updated successfully, but these errors were encountered: