Skip to content

Commit

Permalink
Added upgrade step to reload the theming registry.
Browse files Browse the repository at this point in the history
Otherwise when you upgrade from Plone 5.2.1, and try to save the theming control panel, you get an error:

```
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 359, in publish_module
  Module ZPublisher.WSGIPublisher, line 262, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module plone.app.theming.browser.controlpanel, line 65, in __call__
  Module plone.app.theming.browser.controlpanel, line 215, in update
  Module plone.registry.recordsproxy, line 59, in __setattr__
AttributeError: custom_css_timestamp
```
  • Loading branch information
mauritsvanrees committed Jun 11, 2020
1 parent 5cb479c commit a360731
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions src/plone/app/theming/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@
provides="Products.GenericSetup.interfaces.EXTENSION"
/>

<gs:upgradeStep
title="Update registry"
source="*"
destination="1000"
handler=".upgrade.update_registry"
sortkey="1"
profile="plone.app.theming:default"
/>

<gs:upgradeStep
title="Combine Theming control panels"
source="1000"
Expand All @@ -44,6 +35,14 @@
profile="plone.app.theming:default"
/>

<gs:upgradeStep
title="Update registry"
source="1001"
destination="1002"
handler=".upgrade.update_registry"
profile="plone.app.theming:default"
/>

<!-- Transform order 8850 - apply theme transform -->
<adapter
name="plone.app.theming.transform"
Expand Down
2 changes: 1 addition & 1 deletion src/plone/app/theming/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<metadata>
<version>1001</version>
<version>1002</version>
<dependencies>
<dependency>profile-plone.app.registry:default</dependency>
</dependencies>
Expand Down

0 comments on commit a360731

Please sign in to comment.