diff --git a/CHANGES.txt b/CHANGES.txt index 4d8f289..6606e8e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,12 @@ Changelog 1.0b8 (unreleased) ------------------ +- Revert r35608 since this was breaking the comment moderation bulk actions. + The BulkActionsView expects the absolute path of the comments without the + portal url (e.g. '/plone/doc1/++conversation++default/1285346769126020'). + This fixes https://dev.plone.org/plone/ticket/11156. + [timo] + - Use "(function($) { /* some code that uses $ */ })(jQuery)" instead of "$(document).ready(function(){ /* some code that uses $ */ });" to invoke jQuery code. diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index 67b2666..e70ed72 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -96,7 +96,7 @@ class="noborder" name="paths:list" id="#" value="#" - tal:attributes="value python:view.item_path(item); + tal:attributes="value item/getPath; id string:cb_${item/id}; checked item/checked|nothing; alt string:Select ${item/Title}; diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index 0803b2e..a4c4e86 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -48,11 +48,6 @@ class View(BrowserView): self.request.set('disable_border', True) context = aq_inner(self.context) - - # Help for path mangling - portal_url = getToolByName(context, 'portal_url') - self.portal_url = portal_url() - self.portal_path = portal_url.getPortalPath() catalog = getToolByName(context, 'portal_catalog') @@ -76,11 +71,6 @@ class View(BrowserView): return True else: return False - - def item_path(self, item): - # Path mangling to support virtual hosting - path = item.getPath()[len(self.portal_path):] - return self.portal_url + path class DeleteComment(BrowserView):