Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Commit

Permalink
Fixed AttributeError when using inline editing.
Browse files Browse the repository at this point in the history
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 de8a2b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Expand Up @@ -5,6 +5,11 @@ HISTORY
1.2.10 (unreleased) 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. - Fixed a few test failures in combination with five.pt.
[maurits] [maurits]


Expand Down
7 changes: 1 addition & 6 deletions Products/TinyMCE/utility.py
Expand Up @@ -5,11 +5,6 @@
import simplejson as json import simplejson as json
from types import StringTypes from types import StringTypes
from zope.component import getUtility, queryUtility 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.i18n import translate
from zope.i18nmessageid import MessageFactory from zope.i18nmessageid import MessageFactory
from zope.interface import classProvides from zope.interface import classProvides
Expand Down Expand Up @@ -754,7 +749,7 @@ def getConfiguration(self, context=None, field=None, request=None):
else: else:
results['contextmenu'] = False results['contextmenu'] = False


portal = getSite() portal = getToolByName(self, 'portal_url').getPortalObject()
results['portal_url'] = aq_inner(portal).absolute_url() results['portal_url'] = aq_inner(portal).absolute_url()
nav_root = getNavigationRootObject(context, portal) nav_root = getNavigationRootObject(context, portal)
results['navigation_root_url'] = nav_root.absolute_url() results['navigation_root_url'] = nav_root.absolute_url()
Expand Down

0 comments on commit de8a2b6

Please sign in to comment.