Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install plone.app.caching when it is not available on site creation #139

Open
3 tasks
mauritsvanrees opened this issue Jun 19, 2024 · 0 comments
Open
3 tasks

Comments

@mauritsvanrees
Copy link
Sponsor Member

  1. Create a Plone 6 site with only Products.CMFPlone.
  2. Add plone.app.caching to the packages and restart.
  3. You cannot install it from the Add-ons control panel.

Workaround: go the portal_setup in the ZMI and install it there.

So:

  • Remove plone.app.caching from the hidden products in Products/CMFPlone/factory.py.
  • Create an uninstall profile.
  • For good measure change the custom import step into a post_handler for the default profile. That is a separate point, but can easily be handled at the same time.

Best do this only for Plone 6.1, so this would need a branch 3.x to use on Plone 6.0.

mauritsvanrees added a commit to plone/Products.CMFPlone that referenced this issue Sep 11, 2024
It is a core add-on, so you should be able to activate it if you add the package later.

This is part of plone/plone.app.caching#139
mauritsvanrees added a commit that referenced this issue Sep 11, 2024
mauritsvanrees added a commit that referenced this issue Sep 11, 2024
Removed the `plone.app.caching.txt` Generic Setup flag file that was needed by the import step.

This is part of #139
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 12, 2024
Branch: refs/heads/master
Date: 2024-09-12T01:11:33+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/Products.CMFPlone@58988ac

No longer hide plone.app.caching from Add-ons control panel.

It is a core add-on, so you should be able to activate it if you add the package later.

This is part of plone/plone.app.caching#139

Files changed:
A news/139.bugfix
M Products/CMFPlone/factory.py
Repository: Products.CMFPlone

Branch: refs/heads/master
Date: 2024-09-12T10:11:16+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@py76.be>
Commit: plone/Products.CMFPlone@ab8166e

Merge pull request #4014 from plone/maurits-do-not-hide-plone-app-caching

No longer hide plone.app.caching from Add-ons control panel.

Files changed:
A news/139.bugfix
M Products/CMFPlone/factory.py
mister-roboto pushed a commit to plone/buildout.coredev that referenced this issue Sep 12, 2024
Branch: refs/heads/master
Date: 2024-09-12T01:18:47+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.caching@0dbafff

Add uninstall profile.

Part of plone/plone.app.caching#139

Files changed:
A news/139.breaking.1
A plone/app/caching/profiles/uninstall/controlpanel.xml
A plone/app/caching/profiles/uninstall/registry/basesettings.xml
A plone/app/caching/profiles/uninstall/registry/moderate.xml
A plone/app/caching/profiles/uninstall/registry/strong.xml
A plone/app/caching/profiles/uninstall/registry/terse.xml
A plone/app/caching/profiles/uninstall/registry/weak.xml
M plone/app/caching/profiles.zcml
M plone/app/caching/setuphandlers.py
Repository: plone.app.caching

Branch: refs/heads/master
Date: 2024-09-12T01:18:47+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.caching@399b64b

Replace plone.app.caching import step with a post handler.

Removed the `plone.app.caching.txt` Generic Setup flag file that was needed by the import step.

This is part of plone/plone.app.caching#139

Files changed:
A news/139.breaking.2
M plone/app/caching/profiles.zcml
M plone/app/caching/setuphandlers.py
D plone/app/caching/profiles/default/plone.app.caching.txt
Repository: plone.app.caching

Branch: refs/heads/master
Date: 2024-09-12T01:25:24+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.caching@f9cf730

Renamed importVarious to post_handler.

The previous code gave an error:

```
...
  File ".../plone/app/caching/setuphandlers.py", line 28, in importVarious
    site = context.getSite()
AttributeError: 'RequestContainer' object has no attribute 'getSite'
```

The code needed more changes when going from import step to post handler.

Since it can no longer be used as import step, anyone using this will need to change their code, so it feels safe to rename the function without leaving a backwards compatibility layer.
The import step was meant for internal use only anyway.

Files changed:
M plone/app/caching/profiles.zcml
M plone/app/caching/setuphandlers.py
Repository: plone.app.caching

Branch: refs/heads/master
Date: 2024-09-12T10:11:18+02:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: plone/plone.app.caching@c5165d4

Merge pull request #142 from plone/maurits-uninstall-profile

Add uninstall profile

Files changed:
A news/139.breaking.1
A news/139.breaking.2
A plone/app/caching/profiles/uninstall/controlpanel.xml
A plone/app/caching/profiles/uninstall/registry/basesettings.xml
A plone/app/caching/profiles/uninstall/registry/moderate.xml
A plone/app/caching/profiles/uninstall/registry/strong.xml
A plone/app/caching/profiles/uninstall/registry/terse.xml
A plone/app/caching/profiles/uninstall/registry/weak.xml
M plone/app/caching/profiles.zcml
M plone/app/caching/setuphandlers.py
D plone/app/caching/profiles/default/plone.app.caching.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant