plone / Products.CMFPlone

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

Revert revision breaks in Plone 5.1.2 #2463

Closed tomgross closed 6 years ago

tomgross commented 6 years ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

What I expect to happen:

What actually happened:

Traceback (innermost last):
  Module ZPublisher.Publish, line 138, in publish
  Module ZPublisher.mapply, line 77, in mapply
  Module ZPublisher.Publish, line 48, in call_object
  Module Products.CMFCore.FSPythonScript, line 127, in __call__
  Module Shared.DC.Scripts.Bindings, line 322, in __call__
  Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 344, in _exec
  Module script, line 4, in revertversion
   - <FSPythonScript at /Plone/de/die-fhnw/hochschulen/ph/medien-und-oeffentlichkeit/events/revertversion>
   - Line 4
  Module AccessControl.ZopeGuards, line 305, in guarded_import
Unauthorized: import of 'six' is unauthorized

What version of Plone/ Addons I am using:

tomgross commented 6 years ago

The problem was introduced here: https://github.com/plone/Products.CMFEditions/commit/a8c0b41c5ca6fcc0e7d76d0b5a5cf4b9512627fb#diff-248dc9cf5dc608a5c25bf6363bd06585R13

tomgross commented 6 years ago

A workaround is to customize the revertversion script in portal_skins and copy the old version in:

https://github.com/plone/Products.CMFEditions/blob/f02745c856d51b2e63dbc720cadee93a42cb5fe3/Products/CMFEditions/skins/CMFEditions/revertversion.py

tomgross commented 6 years ago

A good solution for 5.2 would to migrate the skins to Browserviews. Didn't we want to get rid of portal_skins for Plone 5.0 already 😉

hvelarde commented 6 years ago

IMO, removal of portal_skins is a breaking change that must be done only in 6.0

tomgross commented 6 years ago

I agree, but shipping with an empty portal_skins was an agreement long ago.