Skip to content

_global_head is being called 3 times - breaks have_fields_and_multi #111

Description

@delicado54

Using WP 4.6.1 and wpalchemy 1.6.1, I find that using have_fields_and_multi produces 3 new groups every time I click add (that is, $('[class*=docopy-]').click(function(e) on line 1354 seems to be being triggered 3 times even though I have only one item with a class of docopy-.... I assumed this was my error but I found it also happens with the out-of-the-box full-meta.php.

If I revert to 1.5.x or earlier, it works again, but I get a bunch of deprecation notices.

After a bit of digging around I realised that the javascript block is being printed out on the page 3 times - so it looks like the function _global_head() is being triggered 3 times.

It looks like I have a temporary fix by inserting e.stopImmediatePropagation(); on line 1356 after e.preventDefault(). But this might cause other issues and obviously isn't a real solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions