I’ve partially solved the main issue where the link does not “insert into post”. There still are errors where after inserting, a javascript error will pop up. And I’m a bit concern about the function being called frequently, as this will hit the database quite often.
Anyway, the partial fix is to edit the core file for the plugin:
Insert this function call in index.php at line 345:
update_active_field_type();
Final result should look like this:
if ( !function_exists( 'xydac_loadfields' ) ) { function xydac_loadfields() {
update_active_field_type();
global $xydac_fields;
—-
Just a follow up on what is happening to cause this issue, basically the plugin checks for an “active field” and inserts a javascript code asssociated with the field.
But the problem is the “active field” is not being updated, the function responsible for this is in cptfields.php (line 3). This function does not seem to be called anywhere in the plugin.
So basically what I did is to force this function to be called on init of plugin.