plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
268 stars 194 forks source link

Tests fails with Plone 4.3.5 Products.CMFDynamicViewFTI 4.1.0 #591

Closed vincentfretin closed 9 years ago

vincentfretin commented 9 years ago

With Plone 4.3.5 which includes Products.CMFDynamicViewFTI 4.1.0, I get the following error when executing my project tests:

Tear down plone.testing.z2.ZServer in 1.868 seconds.
Tear down plone.app.robotframework.remote.AutoLoginRemoteLibrary:RobotRemote in 0.006 seconds.
Set up rdt.enterprisedata.testing.FIXTURE Traceback (most recent call last):
File "/home/vincentfretin/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 366, in run_layer
  setup_layer(options, layer, setup_layers)
File "/home/vincentfretin/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 628, in setup_layer
  setup_layer(options, base, setup_layers)
File "/home/vincentfretin/.buildout/eggs/zope.testing-3.9.7-py2.7.egg/zope/testing/testrunner/runner.py", line 633, in setup_layer
  layer.setUp()
File "/home/vincentfretin/.buildout/eggs/plone.app.testing-4.2.5-py2.7.egg/plone/app/testing/helpers.py", line 343, in setUp
  self.setUpPloneSite(portal)
File "/home/vincentfretin/workspace/astride/src/rdt.enterprisedata/rdt/enterprisedata/testing.py", line 115, in setUpPloneSite
  applyProfile(portal, 'rdt.enterprisedata:testing')
File "/home/vincentfretin/.buildout/eggs/plone.app.testing-4.2.5-py2.7.egg/plone/app/testing/helpers.py", line 113, in applyProfile
  setupTool.runAllImportStepsFromProfile(profileId)
File "/home/vincentfretin/.buildout/eggs/Products.GenericSetup-1.7.5-py2.7.egg/Products/GenericSetup/tool.py", line 365, in   runAllImportStepsFromProfile
  blacklisted_steps=blacklisted_steps)
 - __traceback_info__: profile-rdt.enterprisedata:testing
File "/home/vincentfretin/.buildout/eggs/Products.GenericSetup-1.7.5-py2.7.egg/Products/GenericSetup/tool.py", line 1119, in   _runImportStepsFromContext
  message = self._doRunImportStep(step, context)
File "/home/vincentfretin/.buildout/eggs/Products.GenericSetup-1.7.5-py2.7.egg/Products/GenericSetup/tool.py", line 1030, in _doRunImportStep
  return handler(context)
 - __traceback_info__: rdt-enterprisedata-final
File "/home/vincentfretin/workspace/astride/src/rdt.enterprisedata/rdt/enterprisedata/setuphandlers.py", line 77, in importFinalSteps
  site.invokeFactory(type_name="EnterpriseBase", id=enterprise_base_id, title="Base entreprises")
File "/home/vincentfretin/.buildout/eggs/Products.CMFCore-2.2.9-py2.7.egg/Products/CMFCore/PortalFolder.py", line 292, in invokeFactory
  return pt.constructContent(type_name, self, id, RESPONSE, *args, **kw)
File "/home/vincentfretin/.buildout/eggs/Products.CMFCore-2.2.9-py2.7.egg/Products/CMFCore/TypesTool.py", line 833, in constructContent
  ob = info.constructInstance(container, id, *args, **kw)
File "/home/vincentfretin/.buildout/eggs/Products.CMFCore-2.2.9-py2.7.egg/Products/CMFCore/TypesTool.py", line 311, in constructInstance
  return self._constructInstance(container, id, *args, **kw)
File "/home/vincentfretin/.buildout/eggs/Products.CMFCore-2.2.9-py2.7.egg/Products/CMFCore/TypesTool.py", line 560, in _constructInstance
  notifyContainerModified(container)
File "/home/vincentfretin/.buildout/eggs/zope.container-3.11.2-py2.7-linux-x86_64.egg/zope/container/contained.py", line 334, in notifyContainerModified
  notify(ContainerModifiedEvent(object, *descriptions))
File "/home/vincentfretin/.buildout/eggs/zope.event-3.5.2-py2.7.egg/zope/event/__init__.py", line 31, in notify
  subscriber(event)
File "/home/vincentfretin/.buildout/eggs/zope.component-3.9.5-py2.7.egg/zope/component/event.py", line 24, in dispatch
  zope.component.subscribers(event, None)
File "/home/vincentfretin/.buildout/eggs/zope.component-3.9.5-py2.7.egg/zope/component/_api.py", line 136, in subscribers
  return sitemanager.subscribers(objects, interface)
File "/home/vincentfretin/.buildout/eggs/zope.component-3.9.5-py2.7.egg/zope/component/registry.py", line 321, in subscribers
  return self.adapters.subscribers(objects, provided)
File "/home/vincentfretin/.buildout/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
  subscription(*objects)
File "/home/vincentfretin/.buildout/eggs/zope.component-3.9.5-py2.7.egg/zope/component/event.py", line 32, in objectEventNotify
  zope.component.subscribers((event.object, event), None)
File "/home/vincentfretin/.buildout/eggs/zope.component-3.9.5-py2.7.egg/zope/component/_api.py", line 136, in subscribers
  return sitemanager.subscribers(objects, interface)
File "/home/vincentfretin/.buildout/eggs/zope.component-3.9.5-py2.7.egg/zope/component/registry.py", line 321, in subscribers
  return self.adapters.subscribers(objects, provided)
File "/home/vincentfretin/.buildout/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 585, in subscribers
  subscription(*objects)
File "/home/vincentfretin/.buildout/eggs/Products.CMFDynamicViewFTI-4.1.0-py2.7.egg/Products/CMFDynamicViewFTI/browserdefault.py", line 247, in check_default_page
  default_page_id = container.getDefaultPage()
File "/home/vincentfretin/.buildout/eggs/Products.CMFDynamicViewFTI-4.1.0-py2.7.egg/Products/CMFDynamicViewFTI/browserdefault.py", line 92, in getDefaultPage
  return plone_utils.getDefaultPage(self)
File "/home/vincentfretin/.buildout/eggs/Products.CMFPlone-4.3.5-py2.7.egg/Products/CMFPlone/PloneTool.py", line 713, in getDefaultPage
  request = self.REQUEST
AttributeError: REQUEST

It appears to be related to @gotcha changes which add new subscribers related to default page. It worked fine with Plone 4.3.4 (Products.CMFDynamicViewFTI 4.0.5)

gotcha commented 9 years ago

@vincentfretin Can you test if https://github.com/plone/Products.CMFDynamicViewFTI/tree/fix_plone_591 fixes your issue ?

vincentfretin commented 9 years ago

@gotcha This fixes my issue, indeed. Thanks.

gotcha commented 9 years ago

@vincentfretin released as Products.CMFDynamicViewFTI==4.1.2