All add-ons currently require PHP 7.4 or greater.
On July 4th 2024 PHP 8.2 will be the new minimum requirement for all add-ons. Expect any add-on released after that date to require 8.2 or greater. Some releases may not immediately take advantage of 8.x specific features in PHP, which means you might, be able to continue using new releases in PHP 7.4, however, if you experience an error the first thing you should do is update to PHP 8.2 then create a support ticket if the error persists.
Please read about the changes to BoldMinded add-on licensing.
Ticket: Speedy Cache Displaying Instead of Publisher Lite Draft Entry
Status | Resolved |
Add-on / Version | Speedy 1.7.0 |
Severity | |
EE Version | 7.4.9 |
Lucas Nicely
Jul 17, 2024Description of the problem An install of both Speedy and Publisher Lite can cause content conflicts. When using the Speedy Static Cache Driver and the draft entry functionality of Publisher Lite, an entry can display out of date content when viewed via the draft link.
We have an entry (Grease Control Program) that has both a published version, and a modified draft version (supported via Publisher Lite). When the draft link is first viewed, we see the new content. If the published version of the entry is visited, Speedy creates a cached version of this. Visiting the draft link after visiting the published version will show the published content on both the published and draft links, resulting in out of date content on the draft link.
Regenerating a draft link (saving the entry) fires off the cache clearing rules, which temporarily fixes the problem, but only until someone visits the published page.
I’ve attached a screen recording of this behavior.
https://file.io/ay2LWQLfGMiy (valid for 8 weeks)
Access to our site is not available, but I am open to doing a screen share if needed.
How To Reproduce Steps to reproduce the behavior: With Publisher Lite enabled and Speedy with the static cache driver enabled: 1. Create an entry and publish it. 2. Create a draft entry. Capture the preview link from Publisher. 3. Visit the draft link. View the draft content. 4. Visit the published link. View the published content. 5. Visit the draft link again. View the published content, when it should be the draft content.
Screenshots / Videos / Template Code https://file.io/ay2LWQLfGMiy
Possible Solution Could we ensure that Publisher URLs take precedence over Speedy’s cache? If we could ignore cache for entries that have publisher_status=draft in them, that would work.
BoldMinded (Brian)
Sounds like you’re describing the same problem as this? https://boldminded.com/support/ticket/2921
BoldMinded (Brian)
Comment has been marked private.
BoldMinded (Brian)
never mind, you’re using static caching so that won’t help.
BoldMinded (Brian)
What cache driver are you using? Redis or File system with Static caching?
Lucas Nicely
File system static caching
BoldMinded (Brian)
If you’re using static file caching, then you’ll need to make a rewrite rule in your htaccess or nginx config to not serve static files if
?publisher_status
is in the URL. There isn’t anything I can do if you’ve configured your htaccess/nginx to completely bypass EE if using static file caching.Lucas Nicely
We’ve not made any modifications to our .htaccess file. I can give that a try though to see if I’m able to specify a rewrite rule to not serve from the /static directory if that query param is there. I’ll try it and report back.
Lucas Nicely
Maybe something like this?
RewriteCond %{QUERY_STRING} ^(.?)publisher_status=.$ [NC] RewriteRule ^/static/(.*) /index.php?q=$1 [L]
BoldMinded (Brian)
Perhaps, but I can’t assist htaccess or nginx config beyond what I’ve mentioned in the docs.
Lucas Nicely
That did the trick (with one modification).
Thanks for the idea! I’d forgotten as part of Speedy set up we’d added in those changes to the .htaccess file. All seems to be working now.
BoldMinded (Brian)
What was the modification?
Lucas Nicely
Because the URL of the statically cached file doesn’t actually include a reference to /static (it just uses the url_title from EE)
BoldMinded (Brian)
Seems simple enough. I added that to the docs incase someone else runs into the same issue.