-
Notifications
You must be signed in to change notification settings - Fork 2
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
Issue 5 - Add class blacklist #6
Conversation
@@ -23,3 +23,13 @@ class ILazySizesSettings(form.Schema): | |||
value_type=schema.Choice( | |||
vocabulary=u'collective.lazysizes.ImageScales'), | |||
) | |||
|
|||
form.widget('blacklist', cols=80, rows=10) | |||
blacklist = schema.Text( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
must use schema.Set()
instead; that takes care of the data conversion
@@ -25,6 +25,13 @@ | |||
handler="..cook_javascript_resources" | |||
/> | |||
|
|||
<genericsetup:upgradeDepends |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rodfersou @winstonf88 @idgserpro this is an alternative way of running an upgrade step that I just learned with @pcdummy.
in this case, we are re-importing registry.xml
without any Python code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @hvelarde!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hvelarde I just found that if you have two packages with same import_steps
option you get a ZCML conflict:
Traceback (most recent call last):
File "/srv/brasil2016.portal/parts/instance/bin/interpreter", line 378, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 92, in prepare
self.startZope()
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/Startup/__init__.py", line 268, in startZope
Zope2.startup()
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/__init__.py", line 47, in startup
_startup()
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 118, in startup
load_zcml()
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/startup.py", line 52, in load_zcml
load_site()
File "/srv/cache/eggs/Zope2-2.13.24-py2.7.egg/Zope2/App/zcml.py", line 46, in load_site
_context = xmlconfig.file(site_zcml)
File "/srv/cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/xmlconfig.py", line 651, in file
context.execute_actions()
File "/srv/cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 620, in execute_actions
for action in resolveConflicts(self.actions):
File "/srv/cache/eggs/zope.configuration-3.7.4-py2.7.egg/zope/configuration/config.py", line 1527, in resolveConflicts
raise ConfigurationConflictError(conflicts)
zope.configuration.config.ConfigurationConflictError: Conflicting configuration actions
For: ('upgradeDepends', '2', '3', None, "[u'plone.app.registry']", 0)
File "/srv/brasil2016.portal/src/brasil2016/portal/upgrades/v3/configure.zcml", line 22.4-27.10
<genericsetup:upgradeDepends
title="Add new tile"
description="Reload registration to add new tile."
import_steps="plone.app.registry"
run_deps="false"
/>
File "/srv/cache/eggs/collective.texttospeech-1.0rc1-py2.7.egg/collective/texttospeech/upgrades/v3/configure.zcml", line 28.4-33.10
<genericsetup:upgradeDepends
title="Add CSS class blacklist field to registry"
description="Reload registration of configlet registry to add new field."
import_steps="plone.app.registry"
run_deps="false"
/>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this just happen when the upgrade step has the same from/to number (in this case from 2 to 3)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
open an issue here: https://github.com/zopefoundation/Products.GenericSetup/issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way to fix this problem: add import_profile
to the upgradeDepends
directive
zopefoundation/Products.GenericSetup#7 (comment)
Plone 5 uses `<article id=content>` instead of `<div id=content>`.
Issue 5 - Add class blacklist
closes #5