Update: I just tried to add a new test snippet (to both production and cloned sites), but I can’t add anything to the code box, it doesn’t even let me put a cursor there to paste the code, etc. Please advise on this also, thanks!
Update 2: after deactivating and testing other plugins, I tried updating WordPress to 6.1.1 and it seems to have solved this problem for now. I’ll return to this post if that turns out not to be the case, thanks.
Happened to me after upgrading from 2.14.0 to 3.2.2, while on WP 6.1.1, PHPv 8.0.26. Throws a JS error in console. Would be great if caught and handled more gracefully in plugins/code-snippets/dist/edit.js?ver=3.2.2.
Unfortunately I can’t updload an image with the console, in this editor, but here’s the stack trace:
[Error] TypeError: null is not an object (evaluating 'd.attach')
(anonymous function) (load-scripts.php:155:19375)
Pf (load-scripts.php:155:22492)
Pf (load-scripts.php:155:21653)
fg (load-scripts.php:156:190)
(anonymous function) (code-editor.min.js:2:1991)
(anonymous function) (edit.js:1:2797)
(anonymous function) (edit.js:1:3596)
i (editor.js:1:123415)
(anonymous function) (edit.js:1:7960)
e (editor.js:1:124150)
e
Global Code (edit.js:1:87)
I realise this doesn’t qualify as a “non-coding answer”, but should hopefully help the plugin author to fix the issue.
-
This reply was modified 3 years, 5 months ago by
bogdanh.
I should add that for me reverting the upgrade, back to 2.14.0, fixes the issue, but that’s probably not a long-term option.
It sounds like this is an issue with the code editor itself, not with any of your snippet data being removed.
I have a feeling that another plugin you have installed is causing this conflict. Would it be possible to test this out by temporarily disabling other plugins besides Code Snippets to see whether this issue still occurs?