Closed djowett-ftw closed 1 year ago
I'm on a new github account - so don't have permission to add labels it seems
I think the viewletmanager changed to IGlobalStatusMessage
https://github.com/plone/plone.app.layout/blob/master/plone/app/layout/viewlets/configure.zcml#L54
Thanks @ale-rt - it did, but that's been included twice - see below:
(The first one comes through plone/app/registry/browser/controlpanel_layout.pt
)
Simply put.... the global_statusmessage used to be slot in Plone 4 but is now a viewlet in Plone 5
However, when it was converted it also moved from inside of #content
slot to outside it.
That means that anything overriding the #content
slot should not include a global_statusmessage viewlet - but controlpanel continues to do so. It may have been intentional (though I would hazard a guess it wasn't), but if so it should somehow restrict the display of the gsm viewlet outside #content
.
Does that make sense?
@djowett-ftw Related warning, found your issue while searching for duplicates: there is more trouble: I'm looking into a strange case where the status message type is not translated in easyform's. The status message of forms (z3c.form & plone.app.z3cfrm) are included in the content as well and use the css styling, but could also possibly cause duplicates. Check macros.pt in plone.app.z3cform.
I close the issue, because it addresses a Plone version that is no longer supported. If you think this is wrong please reopen the issue and assign a matching milestone.
BUG
We're making ftw.globalstatusmessage plone5 compatible, and as such have put our (non-transient) status message into the plone.globalstatusmessage viewlet manager which was introduced with Plone 5. This works fine in the content tree, but many(most?) of the controlpanels display the status message twice - as shown below.
What I did:
Vanilla Plone install +
ftw.globalstatusmessage
from our development branch:ftw.globalstatusmessage = git https://github.com/4teamwork/ftw.globalstatusmessage.git branch=dj/plone5.1
What I expect to happen:
Only one global status message to be shown
What actually happened:
Two global status messages are shown
What version of Plone/ Addons I am using:
ftw.globalstatusmessage
Theories of cause
This viewlet manager shouldn't be included twice on a single page. We think that Plone might have got away with this until now, because i) not many things use this new Viewlet Manager ii) normal status messages are transient and therefore after the viewlet in one viewlet manager consumes the message for display, the viewlet in the other viewlet manager won't find it.