Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plone.app.tiles #186

Open
1letter opened this issue Apr 24, 2023 · 8 comments
Open

plone.app.tiles #186

1letter opened this issue Apr 24, 2023 · 8 comments

Comments

@1letter
Copy link
Contributor

1letter commented Apr 24, 2023

collective.collectionfilter.tiles needs a profile dependency-profile "profile-plone.app.tiles:default", which does not exist.

perhaps, in setup.py section "mosaic" is a dependency required.

@petschki
Copy link
Member

petschki commented Jun 2, 2023

If you need tiles support, you have to install with the extra_require mosaic then all the dependencies are pulled. Also the package collective.collectionfilter.tiles is only included if plone.tiles is installed. For completeness: the geolocation profiles are only registered, when you install with geolocation extra... So my buildout always says:

eggs += collective.collectionfilter[mosaic,geolocation]

@1letter
Copy link
Contributor Author

1letter commented Jun 2, 2023

I'm not using mosaic or geolocation, just the default package and I see the following error message in the add-on control panel. I don't mind, but it's an issue:

Bildschirmfoto vom 2023-06-02 10-01-46

@petschki
Copy link
Member

petschki commented Jun 2, 2023

Ah sure ... as I've never installed it without mosaic, I didn't see the issue - now its clear. Seems that the zcml:condition for registering the profile should check for plone.app.tiles instead of plone.tiles ... but I can check that as I'm cleaning up some things here and adding the ajax geojson feature to plone 6 right now ...

@petschki
Copy link
Member

petschki commented Jun 2, 2023

hm. I cannot reproduce this on coredev 6.0 when collectionfilter 5.0a2 is installed.

Bildschirmfoto 2023-06-02 um 11 00 26

So reading the code this can only happen if your site has plone.tiles installed but not plone.app.tiles

@1letter
Copy link
Contributor Author

1letter commented Jun 2, 2023

@petschki i will check it next week.

the setup.py of my addon has install_requires

install_requires=[
         ....
        "plone.app.blocks",
    ],

Perhaps this is the mistake. I don't need this. i will comment out this package and check the installation. plone.app.blocks pulls plone.tiles

@1letter
Copy link
Contributor Author

1letter commented Jun 5, 2023

if i remove the requirements, then the instance start it ends with a traceback:

Traceback (most recent call last):
  File "/opt/development/plone6/venv/bin/runwsgi", line 8, in <module>
    sys.exit(main())
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/Startup/serve.py", line 251, in main
    return command.run()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/Startup/serve.py", line 189, in run
    app = self.loadapp(app_spec, name=app_name, relative_to=base,
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/Startup/serve.py", line 220, in loadapp
    return loadapp(app_spec, name=name, relative_to=relative_to, **kw)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/paste/deploy/loadwsgi.py", line 248, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/paste/deploy/loadwsgi.py", line 273, in loadobj
    return context.create()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/paste/deploy/loadwsgi.py", line 741, in create
    return self.object_type.invoke(self)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/paste/deploy/loadwsgi.py", line 200, in invoke
    app = context.app_context.create()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/paste/deploy/loadwsgi.py", line 741, in create
    return self.object_type.invoke(self)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/paste/deploy/loadwsgi.py", line 138, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/paste/deploy/util.py", line 61, in fix_call
    val = callable(*args, **kw)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/Startup/run.py", line 61, in make_wsgi_app
    starter.prepare()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/Startup/starter.py", line 38, in prepare
    self.startZope()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/Startup/starter.py", line 94, in startZope
    Zope2.startup_wsgi()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/__init__.py", line 36, in startup_wsgi
    _startup()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/App/startup.py", line 126, in startup
    load_zcml()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/App/startup.py", line 41, in load_zcml
    load_site()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/Zope2/App/zcml.py", line 45, in load_site
    _context = xmlconfig.file(site_zcml)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 663, in file
    include(context, name, package)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 560, in include
    processxmlfile(f, context)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 409, in processxmlfile
    parser.parse(src)
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.9/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 459, in EndElement
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 381, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 395, in endElementNS
    self._handle_exception(ex, info)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 393, in endElementNS
    self.context.end()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 703, in end
    self.stack.pop().finish()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 873, in finish
    actions = self.handler(context, **args)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/OFS/metaconfigure.py", line 47, in loadProducts
    xmlconfig.include(_context, zcml, package=product)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 560, in include
    processxmlfile(f, context)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 409, in processxmlfile
    parser.parse(src)
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.9/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 459, in EndElement
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 381, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 395, in endElementNS
    self._handle_exception(ex, info)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 393, in endElementNS
    self.context.end()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 703, in end
    self.stack.pop().finish()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 873, in finish
    actions = self.handler(context, **args)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/plone/autoinclude/zcml.py", line 39, in includePluginsDirective
    loader.load_configure(context, filename, dists)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/plone/autoinclude/loader.py", line 180, in load_configure
    load_zcml_file(context, module_name, package, filename)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/plone/autoinclude/loader.py", line 173, in load_zcml_file
    include(context, filename, package)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 560, in include
    processxmlfile(f, context)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 409, in processxmlfile
    parser.parse(src)
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 111, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "/usr/lib/python3.9/xml/sax/xmlreader.py", line 125, in parse
    self.feed(buffer)
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 217, in feed
    self._parser.Parse(data, isFinal)
  File "../Modules/pyexpat.c", line 459, in EndElement
  File "/usr/lib/python3.9/xml/sax/expatreader.py", line 381, in end_element_ns
    self._cont_handler.endElementNS(pair, None)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 395, in endElementNS
    self._handle_exception(ex, info)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 237, in _handle_exception
    reraise(exc, None, sys.exc_info()[2])
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/_compat.py", line 31, in reraise
    raise value.with_traceback(tb)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/xmlconfig.py", line 393, in endElementNS
    self.context.end()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 703, in end
    self.stack.pop().finish()
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 872, in finish
    args = toargs(context, *self.argdata)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 1702, in toargs
    args[str(name)] = field.fromUnicode(s)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/fields.py", line 173, in fromUnicode
    value = self.context.resolve(name)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/zope/configuration/config.py", line 245, in resolve
    __import__(moname)
  File "/opt/development/plone6/venv/lib/python3.9/site-packages/collective/collectionfilter/tiles/__init__.py", line 6, in <module>
    from plone.app.blocks.layoutbehavior import ILayoutAware
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/opt/development/plone6/venv/lib/python3.9/site-packages/collective/collectionfilter/configure.zcml", line 12.2-12.69
    File "/opt/development/plone6/instance/etc/site.zcml", line 19.2-19.23
    File "/opt/development/plone6/venv/lib/python3.9/site-packages/Products/CMFPlone/configure.zcml", line 128.2-132.8
    ModuleNotFoundError: No module named 'plone.app.blocks'

@petschki
Copy link
Member

petschki commented Jun 5, 2023

So plone.tiles is still in your path, otherwise the module collective.collectionfilter.tiles would not get configured. I quickly tried cloning this package, removed [test] in requirements.txt and do a make run -> instance is up and running, without plone.tiles and plone.app.blocks ... you also may try plone.versioncheck in your buildout and run it with bin/versioncheck -rbo versions.html which generates a HTML page showing all packages and why they are installed ...

EDIT: ah I think you do not use buildout...

@1letter
Copy link
Contributor Author

1letter commented Jun 5, 2023

@petschki yes, you are right, its a pip install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants