Skip to content
This repository has been archived by the owner on Mar 7, 2019. It is now read-only.

Cannot Read Property "Fieldsets" on Drag if External Rich Text Editors #362

Closed
Nicholas-Westby opened this issue May 16, 2016 · 9 comments
Closed

Comments

@Nicholas-Westby
Copy link
Contributor

I get this error when I drag a fieldset and there is an Archetype property in another tab.

console-error

code-error

For the search engines, that error message is:

Uncaught TypeError: Cannot read property 'fieldsets' of undefined

Archetype 1.13.0. Umbraco 7.4.3. Probably related to the nested dragging feature I implemented: #355

I might be able to tackle this in a few days, but thought I'd report it in case you have time and others need a quicker fix.

@Nicholas-Westby
Copy link
Contributor Author

FYI, based on the stack trace, the problem starts here:

origin

@Nicholas-Westby
Copy link
Contributor Author

Now that I think about it, it might be a problem with rich text editors outside of Archetype rather than Archetypes in other tabs. Not sure. Will have to look into further.

@Nicholas-Westby
Copy link
Contributor Author

Yeah, pretty sure it's with rich text editors outside of Archetype rather than Archetypes in other tabs. I bet if we modify the "rteClass" to include a selector to ensure it's a rich text editor inside of an Archetype, that would fix the issue.

@Nicholas-Westby
Copy link
Contributor Author

Note that adding the extra class wouldn't necessarily catch all instances, as there could be a property editor inside of Archetype that itself contains a rich text editor, but it would at least be as effective as the previous implementation prior to 1.13.0.

If interested, you could also add a check to see if the rich text editor is immediately under an Archetype property. Also, some defensive coding could be added so that null is returned from getFieldset() rather than have it throw an error (obviously, code that calls that function would also need to account for the possibility of a null).

@Nicholas-Westby
Copy link
Contributor Author

I'll start working on a pull request for this.

@Nicholas-Westby
Copy link
Contributor Author

Pull request here: #364

@Nicholas-Westby Nicholas-Westby changed the title Cannot Read Property "Fieldsets" on Drag When Archetypes in Multiple Tabs Cannot Read Property "Fieldsets" on Drag if External Rich Text Editors May 19, 2016
@kjac
Copy link
Contributor

kjac commented Feb 15, 2017

@Nicholas-Westby as I recall, this was resolved with your PR. I'm closing the issue now, feel free to reopen it if I'm mistaken.

@kjac kjac closed this as completed Feb 15, 2017
@Nicholas-Westby
Copy link
Contributor Author

@kjac Yep, it's fixed and the PR has been merged, but I don't think it's been released as a new Archetype version yet.

@kjac
Copy link
Contributor

kjac commented Feb 15, 2017

@Nicholas-Westby thanks. We're putting together a new release soon :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants