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

IBrowserDefault fix #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arterrey
Copy link
Member

on older version of plone (in this case Plone 4.1) the comment content type declares it implementes IBrowserDefault, however, getLayout() is not implemented and returns a bad value (from the parent) which causes an attribute error such as the folloing from TinyMCE 1.3.5

    template = None
    if IBrowserDefault.providedBy(context):
        template = context.unrestrictedTraverse(context.getLayout())

This results in a attribute error in the unrestrictedTraverse:
*** AttributeError: conversation_browserview

this update returns a sain value for getLayout() in newer versions of Plone the comment doesn't seem to inherit this IBrowserDefault interface so this is more of a backwards compatibility fix.

@sureshvv
Copy link
Contributor

Can you describe the steps for reproducing this error?

Date: Thu, 27 Feb 2014 20:59:19 -0800
From: [email protected]
To: [email protected]
Subject: [Products.Ploneboard] IBrowserDefault fix (#39)

on older version of plone (in this case Plone 4.1) the comment content type declares it implementes IBrowserDefault, however, getLayout() is not implemented and returns a bad value (from the parent) which causes an attribute error such as the folloing from TinyMCE 1.3.5

template = None
if IBrowserDefault.providedBy(context):
    template = context.unrestrictedTraverse(context.getLayout())

This results in a attribute error in the unrestrictedTraverse:

*** AttributeError: conversation_browserview

this update returns a sain value for getLayout() in newer versions of Plone the comment doesn't seem to inherit this IBrowserDefault interface so this is more of a backwards compatibility fix.

You can merge this Pull Request by running
git pull https://github.com/pretaweb/Products.Ploneboard ibrowser-default-fix
Or view, comment on, or merge it at:

#39

Commit Summary

Tagging 3.2
added getLayout method to make IBrowserDefault interface work

File Changes

M
Products/Ploneboard/content/PloneboardComment.py
(5)

Patch Links:

https://github.com/collective/Products.Ploneboard/pull/39.patch
https://github.com/collective/Products.Ploneboard/pull/39.diff


Reply to this email directly or view it on GitHub.

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