collective / uwosh.snippets

Adds dynamically-updated rich text snippets to Plone. Update a snippet to display the change everywhere the snippet is used (pages, news items, events, anywhere rich text and TinyMCE appear).
4 stars 3 forks source link

compatibility with Plone 5.1.x #19

Open tkimnguyen opened 6 years ago

tkimnguyen commented 6 years ago

@rileydog filed "in 5.1, snippets appears to generate error (even after uninstalling it)"

Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.z3cform.layout, line 66, in call
Module plone.z3cform.layout, line 50, in update
Module plone.dexterity.browser.add, line 130, in update
Module plone.z3cform.fieldsets.extensible, line 59, in update
Module plone.z3cform.patch, line 30, in GroupForm_update
Module z3c.form.group, line 145, in update
Module plone.app.z3cform.csrf, line 21, in execute
Module z3c.form.action, line 98, in execute
Module z3c.form.button, line 315, in call
Module z3c.form.button, line 170, in call
Module plone.dexterity.browser.add, line 105, in handleAdd
Module z3c.form.form, line 265, in createAndAdd
Module plone.dexterity.browser.add, line 80, in add
Module plone.dexterity.utils, line 182, in addContentToContainer
Module Products.BTreeFolder2.BTreeFolder2, line 461, in _setObject
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module uwosh.snippets.linkintegrity, line 132, in modifiedDexterity
Module uwosh.snippets.linkintegrity, line 85, in checkSnippetReferences
Module lxml.html, line 867, in fromstring
Module lxml.html, line 755, in document_fromstring
ParserError: Document is empty
cdw9 commented 6 years ago

I have not seen this error, and I am able to use Snippets in Plone 5.1.0.1.

But when used in Plone 5.1.2, it breaks TinyMCE with a seemingly unrelated JS error: TypeError: editor.getDoc(...) is undefined[Learn More] plone-logged-in-compiled.js:14566:14. Removing snippets from TinyMCE's custom plugins allows the editor to work again.

tkimnguyen commented 6 years ago

Thanks @cdw9 ... and weren't we were just talking about TinyMCE versions yesterday? :/