Permalink
Browse files

Fixed AttributeError when using inline editing.

AttributeError: 'ATDocumentFieldsView' object has no attribute 'absolute_url'.
Inline editing then still does not work though (checked on Plone 4.2 dev).
  • Loading branch information...
mauritsvanrees committed Jan 13, 2012
1 parent c4c4ab4 commit de8a2b6087eed50fe87bff462e3a7dba7210de18
Showing with 6 additions and 6 deletions.
  1. +5 −0 CHANGES.txt
  2. +1 −6 Products/TinyMCE/utility.py
View
@@ -5,6 +5,11 @@ HISTORY
1.2.10 (unreleased)
-------------------
+- Fixed AttributeError: 'ATDocumentFieldsView' object has no attribute
+ 'absolute_url' when using inline editing. Inline editing then still
+ does not work though (checked on Plone 4.2 dev).
+ [maurits]
+
- Fixed a few test failures in combination with five.pt.
[maurits]
@@ -5,11 +5,6 @@
import simplejson as json
from types import StringTypes
from zope.component import getUtility, queryUtility
-try:
- from zope.component.hooks import getSite
- getSite #Pyflakes
-except ImportError:
- from zope.app.component.hooks import getSite
from zope.i18n import translate
from zope.i18nmessageid import MessageFactory
from zope.interface import classProvides
@@ -754,7 +749,7 @@ def getConfiguration(self, context=None, field=None, request=None):
else:
results['contextmenu'] = False
- portal = getSite()
+ portal = getToolByName(self, 'portal_url').getPortalObject()
results['portal_url'] = aq_inner(portal).absolute_url()
nav_root = getNavigationRootObject(context, portal)
results['navigation_root_url'] = nav_root.absolute_url()

0 comments on commit de8a2b6

Please sign in to comment.