sebastienvercammen
Forum Replies Created
-
Forum: Reviews
In reply to: [Shortcodes Finder] Works as intended@scribit weForms shortcodes now work. I’ve updated my review (see score + text at the top). Thanks for being responsive.
Forum: Reviews
In reply to: [Shortcodes Finder] Works as intendedHey @scribit – a review is a personal opinion about an experience. I think it’s reasonable to give it 1 star when just installing it can cause the admin dashboard to no longer work at all. I’m lucky to be technical enough to get involved, but others might not be, so that’s why I find a 1-star review reasonable. Reviews are something they see before installing, support tickets in progress are not.
Now, what I’ve done since then to try to help you out:
var_dump
of thedelete_option
to make sure it was succeeding. It was, no problem found.- Installed a brand new website w/ a clean WordPress from scratch + installed all the same versions (all latest) of the exact same plugins, including caching layers and Let’s Encrypt SSL certificate. The tried installing Shortcodes Finder. The problem did not reoccur.
- Then I went back to the original website on which the problem occurred to reinstall Shortcodes Finder and see the error in action again.
And here’s the thing…
The problem went away.
The original website can now install and use Shortcodes Finder without any issue at all. Reinstalling does not make the problem go away.
For reference, I’m the hoster, so I can guarantee there have been no changes whatsoever except my manual debugging tests.
I did some more digging:
- WordPress source code of add_option shows that they call wp_cache_set on line 675 here. This is the mechanism that adds the option.
- wp_cache_set source code calls the global object cache.
- Remember my original post: I’m using Redis Object Cache. So I dove into that source code.
- Which brings us to a custom set() for the global cache instance. Followed by a set() on the redis instance. Which is using PhpRedis, in which we can find a reference to set() in the PHP stub that’s implemented in set() in the C code. This maps to Redis’ (the actual cache engine) SET operation.
At this point, the documentation mentions that a key can only exist once, so that’s validated.
Then I did the reverse, for WordPress’ delete_option:
- Calls wp_cache_delete
- Calls $wp_object_cache->delete
- Calls Redis Object Cache’s delete
- Calls PhpRedis’ del
- Calls Redis’ DEL operation, which we can find in the Redis docs here
And all of it seems straightforward. I didn’t find anything suspicious at first sight.
So I’ve updated my review to 4 stars. I couldn’t find the source of the problem, but that doesn’t mean it didn’t (or won’t) happen – and it’s still unfortunate that it doesn’t recognize the weForms shortcodes. If those things were solved, it would get 5 stars.