Skip to content

Conversation

@mattheu
Copy link
Contributor

@mattheu mattheu commented Jun 3, 2015

Bug introduced here: c575c65

Problem - the shortcode property on the view was not getting set correctly. Caused the following error when trying to edit a shortcode.

Uncaught TypeError: Cannot read property 'attributes' of undefined

Why? In recent versions of Backbone - you cannot pass arbitrary properties to a view. This wasn't an issue before - because we just weren't using it.

This problem only affects the inner_content field - because for all other fields, we set the shortcode property after instantiating - which works OK.

The fix - set properties in the same way for inner_content field view that they are for all other fields to ensure it is actually set.

@mattheu mattheu added the bug label Jun 3, 2015
@danielbachhuber
Copy link
Contributor

Thanks @mattheu !

@danielbachhuber danielbachhuber added this to the v0.4.0 milestone Jun 3, 2015
@danielbachhuber
Copy link
Contributor

cc @goldenapples

danielbachhuber pushed a commit that referenced this pull request Jun 3, 2015
@danielbachhuber danielbachhuber merged commit efae1e1 into master Jun 3, 2015
@danielbachhuber danielbachhuber deleted the set-edit-field-view-shortcode branch June 3, 2015 23:32
@goldenapples
Copy link
Contributor

Ah, thanks for the fix @mattheu. I didn't see that issue... guess I didn't test with a shortcode containing inner content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants