Products.PloneFormGen
Products.PloneFormGen copied to clipboard
BadRequest after adding a new thanks page if link integrity checking is enabled
It would be nice, if someone could confirm this:
- enable link integricy checking on your site
- add new form folder
- add new thanks page onto that folder
- get this
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFPlone.FactoryTool, line 438, in __call__
Module Products.CMFPlone.FactoryTool, line 202, in __getitem__
Module Products.CMFPlone.FactoryTool, line 68, in _createObjectByType
Module Products.CMFCore.TypesTool, line 560, in _constructInstance
Module zope.event, line 31, in notify
Module zope.component.event, line 24, in dispatch
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module zope.component.event, line 32, in objectEventNotify
Module zope.component._api, line 136, in subscribers
Module zope.component.registry, line 321, in subscribers
Module zope.interface.adapter, line 585, in subscribers
Module plone.app.linkintegrity.handlers, line 83, in modifiedArchetype
Module plone.app.linkintegrity.handlers, line 57, in getObjectsFromLinks
Module plone.app.linkintegrity.handlers, line 34, in findObject
Module OFS.Traversable, line 256, in unrestrictedTraverse
__traceback_info__: ([], '.')
Module Products.CMFPlone.FactoryTool, line 202, in __getitem__
Module Products.CMFPlone.FactoryTool, line 68, in _createObjectByType
Module Products.CMFCore.TypesTool, line 554, in _constructInstance
Module Products.PloneFormGen.content.thanksPage, line 4, in addFormThanksPage
Module OFS.ObjectManager, line 323, in _setObject
Module Products.CMFCore.PortalFolder, line 313, in _checkId
Module OFS.ObjectManager, line 98, in checkValidId
BadRequest: The id "." is invalid because it is not traversable.
-
Products. PloneFormGen == 1.7.0
-
plone.app.linkintegrity == 1.4.4
What happens
-
plone.app.linkintegrity.handlers.modifiedArchetype
gets fired byzope.lifecycleevent.IObjectCreatedEvent
for new thanks page still under portal factory - it founds
<a title="Test Folder" href=".">visit the form</a>
fromnoSubmitMessage
- it tries to traverse
.
under portal factory - triggering it to try to create a yet another thanks page with id
.
(and failing)
If this can be confirmed, a quick fix would be to modify the default noSubmitMessage
to be linkintegrity-safe, but eventually, I think, this should be fixed in plone.app.linkintegrity (I wonder, why it subscribes IObjectCreatedEvent for Archetypes instead of IObjectInitializedEvent).
+1 Got that too...
+1 got that too
Fixed in 0c8da42..7a948ac. Will be in 1.7.1.
I'm reopening this. The earlier fix takes care of new thank you pages, but doesn't cover copy/paste or import of old one that have relative links.