Looks like a bug – the table schema for the previous version (1.3.8) had three extra columns (insertionMethod, insertionLocation and insertionLocationType), all of which have been removed in 1.4, but the PHP code (or at least some of it) doesn’t seem to have been updated accordingly.
Hi @nexbridge @cipielle @davidsjptimoney
In version 1.4, we introduced three new columns, including insertionMethod. The error occurs because the database structure did not update automatically during the upgrade.
To fix this, please:
- Deactivate the Insert PHP Code Snippet plugin.
- Reactivate the plugin (this will trigger the DB structure update).
- Clear the plugin cache, if applicable.
This should resolve the issue. Let us know if you need any further assistance!
Yes that seems to work now, thanks
The recommended fix works in two sequences: 1) update, deactivate and activate, and 2) deactivate, update and activate.
Most users won’t deactivate first because plugins do not typically require this, so it would make sense to fix the 1.4 update package so that it alters the table without this extra step.
NB: the 1.4 version introduces another issue. It adds a “Click to copy” image to the snippets admin list page (I don’t know whether this is for all placements types as we only use Short Codes). Unfortunately, this is 512px square, which makes a mess of the layout. I have changed the referenced .png file to 16px square as a temporary fix.
I’ll mark this ticket as resolved as the image issue is aesthetic rather than functional.
Hello @davidsjptimoney
Thank you for your feedback and for confirming the fix worked.
1. Update Process & Database Changes
The plugin is designed to trigger database updates through an associated hook during the update process. However, in some cases, this may not execute as expected, leading to the issues reported. We will report this to our development team for further investigation and improvements.
2. “Click to Copy” Image Issue
This is a CSS-related issue—a class is already in the CSS file to limit the image size, but it may not be rendering correctly. We’ll review and ensure the fix is properly applied in an upcoming update.
Also the click to copy os only for the manual shortcodes.
We appreciate your input and will work on refining the update experience.
Thanks
Thanks for the prompt reply, Anjali.