Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to insert image/internal link into Easynewsletter Issue with CKEditor #13

Open
richardtc opened this issue Jan 25, 2013 · 1 comment

Comments

@richardtc
Copy link

HI,

Please could anyone help in resolving the following problem when I attempt to insert an image (also an internal link) into a Newsletter Issue. This occurs after clicking on the 'Browse server' button. I can however, insert an image into the Newsletter item.

Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module collective.ckeditor.browser.ckeditorfinder, line 46, in call
Module collective.plonefinder.browser.finder, line 276, in call
Module collective.plonefinder.browser.finder, line 502, in finderResults
Module collective.plonefinder.browser.finder, line 59, in finderTopicsQueryCatalog
Module Products.ATContentTypes.content.topic, line 370, in buildQuery
TypeError: 'NoneType' object is not iterable

It was suggested at EasyNewsletter GitHub that it was a ckeditor or collective.plonefinder issue. However, I don't have this problem with other content types.

Thanks,
Richard
Plone 4.1.5
EasyNewsletter 2.6.11
collective.ckeditor 3.6.6

I've also tried Kupu, which works fine, so it looks like an issue related to CKEditor?

@MordicusEtCubitus
Copy link

I think the issue comes from ATContenTypes itself.
I have the same issue:

Traceback (innermost last):

Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module collective.ckeditor.browser.ckeditorfinder, line 48, in __call__
Module collective.plonefinder.browser.finder, line 276, in __call__
Module collective.plonefinder.browser.finder, line 502, in finderResults
Module collective.plonefinder.browser.finder, line 59, in finderTopicsQueryCatalog
Module Products.ATContentTypes.content.topic, line 370, in buildQuery

TypeError: 'NoneType' object is not iterable

In fact it appears that ENLIssue.py inherits from ATTopic
But if no topic is created in the newsletter issue, the topic object is None and the line result.update below
generates an 'Type Error' above.

Thus the try/Except from ATContentTypes/content/topic.py:370 miss the case : except (AttributeError, Unauthorized): # oh well, can't find parent, or it isn't a Topic. and should be:

except (TypeError, AttributeError, Unauthorized)
or just
except:

    if acquire:
        try:
            # Tracker 290 asks to allow combinations, like this:
            # parent = aq_parent(self)
            clear_start = True
            parent = aq_parent(aq_inner(self))
            result.update(parent.buildQuery())
        except (*TypeError*, AttributeError, Unauthorized):  # oh well, can't find parent, or it isn't a Topic.
            pass

If adding TypeError it just works fine.

Posted proposed solution to: plone/Products.ATContentTypes#6

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

No branches or pull requests

2 participants