Skip to content

Conversation

@lipemat
Copy link
Contributor

@lipemat lipemat commented Jul 28, 2017

v2.2.4 as well as tested against trunk.
Tested a few WP versions with same results.

Issue
Using a meta_key (id) for a field that is namespaced with / or | breaks the remove JS (cmb.handleRemoveMedia()) for the file field.

To Recreate:

  1. Add a field with the type of file
  2. Use a / somewhere in the id (e.g. cmb2/meta/featured)
  3. Add a file to this field
  4. Click the remove icon
  5. View the browser console to see the error. Also notice that file is not removed.

@lipemat lipemat changed the title wrap cmb.metbox().find() JS to prevent meta keys with | or / from bre… Fix JS to prevent meta keys with | or / from breaking file fields Jul 28, 2017
@jtsternberg jtsternberg merged commit 4f7c01b into CMB2:master Jul 31, 2017
@jtsternberg
Copy link
Member

thanks!

@jtsternberg
Copy link
Member

In the future, please submit pull requests to the trunk branch.

jtsternberg added a commit that referenced this pull request Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants