-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
portal_registry.get fails for anonymous user in skin templates #1292
Comments
mauritsvanrees
added a commit
to plone/Products.ATContentTypes
that referenced
this issue
Dec 21, 2015
This only happened for anonymous users. Fixes issue plone/Products.CMFPlone#1292
mauritsvanrees
added a commit
to plone/buildout.coredev
that referenced
this issue
Dec 21, 2015
Branch: refs/heads/master Date: 2015-12-21T15:30:44+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.ATContentTypes@b6d667a Fixed Unauthorized error causing a redirect loop in old style Topics. This only happened for anonymous users. Fixes issue plone/Products.CMFPlone#1292 Files changed: M CHANGES.rst M Products/ATContentTypes/skins/ATContentTypes/atct_topic_pdf.pt M Products/ATContentTypes/skins/ATContentTypes/atct_topic_subtopics.pt M Products/ATContentTypes/skins/ATContentTypes/atct_topic_view.pt
mauritsvanrees
added a commit
that referenced
this issue
Dec 21, 2015
mauritsvanrees
added a commit
to plone/buildout.coredev
that referenced
this issue
Dec 21, 2015
Branch: refs/heads/master Date: 2015-12-21T15:37:55+01:00 Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org> Commit: plone/Products.CMFPlone@2eded98 Fixed Unauthorized error in folder_full_view for anonymous users. Fixes issue plone/Products.CMFPlone#1292 Files changed: M CHANGES.rst M Products/CMFPlone/skins/plone_content/folder_full_view_item.pt
I have released Products.ATContentTypes 2.2.10 with fixes. |
i think we can close this one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Several browser view templates use
context.portal_registry.get
and this works fine, for example Products/CMFPlone/browser/templates/contact-info-email.pt.But in old style skin templates it fails for anonymous users. In core Plone 5 this is for these templates:
ATContentTypes/skins/ATContentTypes/atct_topic_pdf.pt
ATContentTypes/skins/ATContentTypes/atct_topic_subtopics.pt
CMFPlone/skins/plone_content/folder_full_view_item.pt
@topiaruss This is the problem you reported in irc, caused by the second template. The offending code looks like this:
Workaround: change this to
context.portal_registry['plone.types_use_view_action_in_listings']
and it works. You don't get the benefit of the more gracious fallback when this registry setting does not exist, but so be it. I think I will commit this.Question I have is: should we allow access to
portal_registry.get
in these kinds of templates? But for now it seems easier to fix these three templates.For reference a way to reproduce the error:
on-error
in the template you get redirected, but the url is the same page, so you get redirected again. And again. Etcetera.Another way to reproduce a similar error, due to the use of
.get
infolder_full_view_item.pt
:portal_registry.get
.The text was updated successfully, but these errors were encountered: