senaite.core
senaite.core copied to clipboard
Error Customizing plone.links.favicon View for ISenaiteCore Interface
Description
Encountered a BadRequest
error when attempting to customize the plone.links.favicon
view associated with senaite.core.interfaces.ISenaiteCore
via portal_view_customizations
in a Plone and SENAITE installation running in Docker on Linux. The system reports that the ID for the customization is already in use, which prevents saving any modifications.
Reproduction guide
- Navigate to
portal_view_customizations
. - Locate
plone.links.favicon (senaite.core.interfaces.ISenaiteCore)
and open it. - Click on the [Customize] button.
- Encounter the
BadRequest
error indicating an ID conflict.
Observed behaviour
Received a BadRequest
error message indicating that the ID "zope.interface.interface-plone.links.favicon" is already in use, which prevents the customization from being completed.
Expected behaviour
The customization interface should allow modifications to the plone.links.favicon
view without any ID conflicts, enabling users to save their changes successfully.
Versions
- OS: Linux
- senaite.core:
master
- senaite.impress:
master
- senaite.core.listing:
master
- senaite.core.supermodel:
master
Traceback
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 176, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 385, in publish_module
Module ZPublisher.WSGIPublisher, line 288, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 63, in call_object
Module plone.app.customerize.browser, line 50, in customizeTemplate
Module plone.app.customerize.registration, line 189, in customizeTemplate
Module plone.app.customerize.tool, line 30, in addTemplate
Module OFS.ObjectManager, line 350, in _setObject
Module OFS.ObjectManager, line 142, in checkValidId
BadRequest: The id "zope.interface.interface-plone.links.favicon" is invalid - it is already in use.
Hi @conroyke56 Maybe you can have a look at and not sure if you got to this point
Click [Customize] and change the two instance of the text $portal_url/+plone+senaite.core.static/images/favicon.ico to point to the favicon in the custom folder, $portal_url/portal_skins/custom/favicon.ico and save
also note if you haven't already default branches are 2.x
default branches are 2.x
Yes, this is a new install, using docker. currently on 2.6.0 for all.
Click [Customize] and change the two instance of the text $portal_url/+plone+senaite.core.static/images/favicon.ico to point to the favicon in the custom folder, $portal_url/portal_skins/custom/favicon.ico and save
that is exactly what i am trying to modify. When I hit customise, i get the error, so no ability to modify it.
I have looked at plone documentation, and there's nothing helpful.
https://4.docs.plone.org/manage/troubleshooting/exceptions.html#badrequest-the-id-xxx-is-invalid-it-is-already-in-use
solution: "Not really sure why this happens." Try portal_catalog rebuild as a fix.
catalog rebuild did not help.
Maybe try on a new site or instance, even new container. It works for me
are you running all 2.6? can you first try changing the plone.links.favicon (senaite.impress.interfaces.ISenaiteImpressLayer)
<tal:favicon define="portal_url view/site_url">
<link rel="shortcut icon" type="image/x-icon" tal:attributes="href string:$portal_url/portal_skins/custom/favicon.ico" />
<link rel="apple-touch-icon" tal:attributes="href string:$portal_url/portal_skins/custom/favicon.ico" />
</tal:favicon>
then going back and seeing if you can customise the core? thats the only modification i have made within zope. Changing it back made no difference, i still get the error.
Our (senaite.impress.interfaces.ISenaiteImpressLayer)
and our (senaite.core.interfaces.ISenaiteCore)
<tal:favicon define="portal_url view/site_url">
<link rel="shortcut icon" type="image/x-icon" tal:attributes="href string:$portal_url/++plone++bika.ui.static/assets/icons/favicon.png" />
<link rel="apple-touch-icon" tal:attributes="href string:$portal_url/++plone++bika.ui.static/assets/icons/favicon.png" />
</tal:favicon>
Just wound up a new instance. And same error for me.
Just to be clear. When you hit customise on the core, you can modify that code?
Yes, I have created a new site and this also saves
<tal:favicon define="portal_url view/site_url">
<link rel="shortcut icon" type="image/x-icon" tal:attributes="href string:$portal_url/++plone++bika.ui.static/assets/icons/analysisservice.png" />
<link rel="apple-touch-icon" tal:attributes="href string:$portal_url/++plone++bika.ui.static/assets/icons/analysisservice.png" />
</tal:favicon>
I've been experimenting further to understand the issue better, and it seems the solution might be simpler than I initially thought, although I could be overlooking something obvious. I initiated another instance and discovered I could modify the favicon without any problems.
However, the issue arises when I attempt to make changes to the favicon using Impress. After making changes there, I'm unable to go back and make any further modifications to the favicon for the core system.
Below are the screenshots illustrating what I'm trying to achieve:
This is what I aim to modify:
Here, I go into the system to modify the core favicon:
After saving these changes and then trying to modify it again via Impress, I encounter the following error:
I suspect this issue might be related to the process of saving changes, which seems to leave the code in a modified state. as per the first screenshot. Is there a way to commit the changes, other than hitting save?