plone / plone.app.theming

Integrates the Diazo theming engine with Plone
https://docs.plone.org/external/plone.app.theming/docs/index.html
Other
21 stars 30 forks source link

how to remove or show an uploaded *invisible* theme? #107

Open tkimnguyen opened 8 years ago

tkimnguyen commented 8 years ago

related to #105, I have a site in which I uploaded a barebones theme but because it is missing manifest.cfg I don't see it in the top-level @@theming-controlpanel and cannot therefore remove it.

...if I retained browser history I can go back to /++theme++MYTHEMEID/@@theming-controlpanel-mapper

davilima6 commented 8 years ago

I think this a duplicate from plone/Products.CMFPlone#1622.

tkimnguyen commented 8 years ago

Yes, @3dogMcNeill and I were trying to figure this out this morning. She filed the software issue and I filed the documentation issue, but now I'm trying to be thorough and cover all the other related problems. This is related to her issue, but not (I think) a duplicate.

tkimnguyen commented 8 years ago

It's only possible to recover from the bug by remembering which URL to browse to. There should be a way for @@theming-controlpanel to show all themes, even if they don't have a manifest.cfg. Or, I guess, fix the bug so it's not possible to upload a theme without manifest.cfg or to auto generate a manifest.cfg, but that still leaves some people in the position of having an invisible theme that prevents them cryptically/silently from uploading a new theme with the same name.

davilima6 commented 8 years ago

The theme is only invisible because manifest.cfg isn't there, so if it gets autogenerated I believe we won't have the silent fail anymore. There's no "invisible theme" concept.

Btw another way to recover is going to /portal_resources and deleting the "theme/YOURTHEME" folder.

tkimnguyen commented 7 years ago

Probably the upload mechanism needs to create a default manifest.cfg if one is not included in the uploaded zip.

tkimnguyen commented 7 years ago

Could replicate this code that creates a rules.xml file if it is missing from the theme, and do the same for manifest.cfg which is also already in the template theme. https://github.com/plone/plone.app.theming/blob/master/src/plone/app/theming/browser/controlpanel.py#L279

VerSooSet commented 7 years ago

There is a template generation of manifest file. This solves the problem? https://github.com/VerSooSet/plone.app.theming/tree/as-rules-manifest This is part of GSoC'17. I'm not sure about pull request.

tkimnguyen commented 7 years ago

I started a PR to do the checking for a manifest.cfg and to add a default one if it is missing. Not sure when I can finish it.