cptjump
Forum Replies Created
-
Forum: Plugins
In reply to: [Default Post Author] Error creating new article as user with author roleHi,
probably I didn’t explain myself clearly the first time.I do want to set a default author automatically — that’s exactly why I’m using this plugin.
The issue is that when a user with the “Author” role creates a post, the plugin immediately tries to assign the default author, and this results in a permission error, because Authors are not allowed to assign posts to other users.So at the moment, the plugin breaks post creation for non-admin users.
What I was suggesting is an option to assign the default author on publish (or only for users who don’t have permission), instead of during post creation.
Hope this clarifies the actual problem.
Forum: Plugins
In reply to: [App for Cloudflare®] 1.9.4.2 slower than 1.9.4 on post save/publishThanks a lot for the quick and very helpful fix… the new approach of collecting unique URLs and purging once during shutdown sounds excellent.
Just to clarify, Action Scheduler doesn’t require disabling WP-Cron. The reason many site owners end up disabling WP-Cron is simply that it’s notoriously unreliable, especially under load or on certain hosting setups. Still, I understand your approach about adding code related to 3rd party plugins.
In any case, really appreciate the fast turnaround and the solid improvement you’ve figured out!
- This reply was modified 9 months ago by cptjump.
Forum: Plugins
In reply to: [App for Cloudflare®] 1.9.4.2 slower than 1.9.4 on post save/publishJust to follow up after more tests: the slowdown happens consistently every time I enable version 1.9.4.2 (and disappears when I roll back to 1.9.4).
To understand what was going on, I enabled debug logging of the Cloudflare API calls. Here’s what I’m seeing:
- 1.9.4 → saving a post triggers 2 purge requests (same payload).
- 1.9.4.2 → the same save triggers 4 purge requests (identical payloads, just duplicated).
This lines up with the delay I observed — the extra API calls are likely what cause the overall slowdown, so doubling the number of requests readily explains the regression.
Looking at the code, I noticed that in 1.9.4.2 there’s a new hook:
add_action('post_updated', [$this, 'purgeCacheByPostIds'], 1048576, 3);in addition to the existing one:
add_action('transition_post_status', [$this, purgeCacheOnPostStatusChange'], 1048576, 3);My guess is that in some situations (like a post update) both hooks are firing and causing duplicate purge calls for the same set of URLs. That seems to match what my debug traces show.
Your idea of moving the purge into a
register_shutdown_functionwhenDISABLE_WP_CRONis set is solid; if that hides the latency from the user, I think it would be great.
As a side note, if I may, rather than exploring every third-party cron replacement, it might be more pragmatic to simply check whether Action Scheduler is available. It’s widely used by many plugins and fairly common across WP sites, and would give you a reliable async queue without depending on WP-Cron.Forum: Plugins
In reply to: [App for Cloudflare®] 1.9.4.2 slower than 1.9.4 on post save/publishThanks (as always) for taking the time to look into this!
A couple of clarifications on my setup that line up with what you suspected:
- I do have
DISABLE_WP_CRONset totrue, but WordPress cron is still being triggered reliably via a proper system cron job. I also have Action Scheduler installed to run various tasks. - There are also several other background jobs firing on
save_post(search indexing, sitemap updates, etc.), so my save times are probably higher than what you’d see on other instances.
One thought: it might be worth considering a tweak so that when a real system cron (or Action Scheduler) is present, the purge could still be queued instead of always running inline when
DISABLE_WP_CRONis set.Forum: Plugins
In reply to: [App for Cloudflare®] Changing post status won’t purge cacheGreat, yet another time… thanks! 😉
Forum: Plugins
In reply to: [App for Cloudflare®] Ignore query stringI agree with you that what Facebook adds is basically garbage. I considered implementing a redirect rule, but I was worried it might annoy them somehow—since we get a LOT of traffic from FB—if we did it systematically on every shared link.
I think (though I definitely don’t have your level of experience or expertise) that, like some other caching plugins, having an option to “remove query strings” could make sense for many users because their goal is probably to achieve the best possible performance. That said, I understand your reservations… Thanks 😉
Forum: Plugins
In reply to: [App for Cloudflare®] Sitemap not purged on post update…and apparently they won’t 😂
Thanks for looking into it!Forum: Plugins
In reply to: [App for Cloudflare®] Sitemap not purged on post updateNot directly tied to this but “similar”. I also encountered some issues with REST endpoints (they kept serving cached content) so i ended up adding to the CF Rule URI PATH does not contain “/wp-json” to exclude both default and custom one. Maybe an option for this exclusion could be useful in the future?
Forum: Plugins
In reply to: [App for Cloudflare®] Sitemap not purged on post updateTotally agree, having this filter (noticed later) it’s amazing. Maybe, in the future, you could consider adding an area in the plugin settings to allow users to put urls to “force purge” there (e.g. one per line) but for sure it’s not a priority. Thanks again!
Forum: Plugins
In reply to: [App for Cloudflare®] Post Update, old URL not getting purgedAmazing, thank you so much for looking into it this fast! Looking forward to the update 😉
Forum: Plugins
In reply to: [App for Cloudflare®] Post Update, old URL not getting purgedI usually edit a post content, sometimes the title. I don’t change the slug but wordpress will if the date differs from the original post, since the permalink structure is like this (/news/%year%/%monthnum%/%day%/%postname%)
Just to be sure, i also tried directly changing the slug but (at least in my case) the old URL is not being purged.
Thanks!
Totally agree. They destroyed a great plugin without any explanation. Awful behaviour.
Forum: Fixing WordPress
In reply to: Duplicated Images in v6.2Hey @impressao3d, I’ve given up trying to “debug” this with RunCloud since I had no luck.
I’m trying with LiteSpeed team, they can reproduce the issue on my site (running on Upcloud server via RunCloud) but not on their sites.
It appears the issue is server / configuration related and has something to do with the new set_imagick_time_limit() function added with 6.2 (commenting out that, stops the issue) -> https://core.trac.ww.wp.xz.cn/ticket/52569
Forum: Fixing WordPress
In reply to: Duplicated Images in v6.2@impressao3d I’ve also reached out to Runcloud but they’re supposing the issue is on the WordPress side. I’m not really sure about that, maybe something litespeed related?
Forum: Fixing WordPress
In reply to: Duplicated Images in v6.2@impressao3d i’m experiencing the same, the issue is runcloud or litespeed related (i’m also using both). Can confirm what @threadi said, can’t replicate on a freshly installed WP 6.2 on nginx. But it’s not related to the Litespeed plugin, it also happens with that turned off.