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

Calendar portlet navigation problem #2215

Closed
claytonc opened this issue Nov 16, 2017 · 5 comments
Closed

Calendar portlet navigation problem #2215

claytonc opened this issue Nov 16, 2017 · 5 comments

Comments

@claytonc
Copy link
Member

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

  1. added a folder in the site, for example "Folder 1";
  2. added a calendar portlet inside the folder created;
  3. view the portlet in the site, hit the button for next month and back month.

Adding a calendar portlet to the root of the site works well.

What I expect to happen:

Calendar portlet showing next or previous month

What actually happened:

KeyError: u'Cannot find object at path folder-1'

What version of Plone/ Addons I am using:

Plone 4.3.14 no addons.

The error occurs from the version of Plone 4.3.12 and using plone.portlets == 2.3.

Debugging I discovered that the error occurs because the path is being passed as string unicode:
u'/Plone/folder-1'. [1]

For example [2]:
context.restrictedTraverse(u'/Plone/folder-1') ==> *** KeyError: u '/'

[1] https://github.com/plone/plone.portlets/blob/2.3/plone/portlets/utils.py#L66
[2] https://github.com/plone/plone.app.portlets/blob/2.5.6/plone/app/portlets/utils.py#L55

@claytonc claytonc added this to the Plone 4.3 milestone Nov 16, 2017
@claytonc
Copy link
Member Author

[1] https://github.com/plone/plone.portlets/blob/2.3/plone/portlets/utils.py#L66

I didn't fix because I don't know why did they use "decode()" at line 66.

@claytonc
Copy link
Member Author

@hvelarde
Copy link
Member

@idgserpro
Copy link

I didn't fix because I don't know why did they use "decode()" at line 66.

Using "blame" it seems to be Python 3 support https://github.com/plone/plone.portlets/blame/2.3/plone/portlets/utils.py#L66. Maybe @davisagli can give us a hint here.

@mauritsvanrees
Copy link
Member

Confirmed.
Plone 5.0 is using plone.portlets 2.3.3 and branch 2.2.x. See plone/buildout.coredev#284.
We should do the same should happen on 4.3: it is currently using a newer plone.portlets than 5.0, which is of course silly. I will fix that.

Summary: you can fix this in individual projects by pinning plone.portlets = 2.2.3.

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

No branches or pull requests

4 participants