Skip to content

Commit c2c0fbc

Browse files
committed
Tidy upgrade-addons-to-52.md
Backport sentence from 52 to 51.
1 parent 8b06e6d commit c2c0fbc

File tree

2 files changed

+120
-77
lines changed

2 files changed

+120
-77
lines changed

docs/backend/upgrading/version-specific-migration/upgrade-to-51.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ If you want to upgrade add-ons to Plone 5.1, please see {doc}`upgrading-addons-t
2727

2828
## Upgrading
2929

30-
To run the upgrade to 5.1, follow the links on top of the control panel, or in the ZMI visit `/@@plone-upgrade`.
30+
To run the upgrade to 5.1, follow the links at the top of the control panel or visit the ZMI for your site at `/@@plone-upgrade`.
3131

3232

3333
## Changes between Plone 5.0 and 5.1
Lines changed: 119 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,103 @@
11
---
22
myst:
33
html_meta:
4-
"description": "Upgrading to Plone 5.2"
5-
"property=og:description": "Upgrading to Plone 5.2"
6-
"property=og:title": "Upgrading to Plone 5.2"
7-
"keywords": "Upgrading, Plone 5.2"
4+
"description": "Upgrading to Plone 5.1 to 5.2"
5+
"property=og:description": "Upgrading to Plone 5.1 to 5.2"
6+
"property=og:title": "Upgrading to Plone 5.1 to 5.2"
7+
"keywords": "Upgrading, Plone, 5.2, 5.1"
88
---
99

1010

11+
(upgrading-plone-5.1-to-5.2-label)=
12+
1113
# Upgrading Plone 5.1 to 5.2
1214

13-
```{admonition} Description
14-
Instructions and tips for upgrading to Plone 5.2.
15-
```
15+
This chapter provides instructions and tips for upgrading to Plone 5.2.
16+
1617

17-
## General Information
18+
## General information
19+
20+
- Before you upgrade read {doc}`../intro` and {doc}`../preparations`.
21+
- Always upgrade from the latest version of 5.1.x to the latest version of 5.2.x.
22+
This will resolve many migration-specific issues.
23+
- If you have problems, ask for help in the [Plone Community Forum](https://community.plone.org).
1824

19-
- Before you upgrade read {doc}`../intro` and {doc}`../preparations`.
20-
- Always upgrade from the latest version of 5.1.x to the latest version of 5.2.x.
21-
This will resolve many migration-specific issues.
22-
- If you have problems, do not be afraid to ask for help on [Plone Community](https://community.plone.org).
2325

2426
## Upgrading
2527

26-
This upgrade is different from previous upgrades because Plone 5.2 supports Python 2 and Python 3.
27-
The upgrade to 5.2 needs to be done in Python 2.7 and is not different that previous migrations.
28-
To run the upgrade to 5.2, follow the links on top of the control panel or the ZMI to the form `/@@plone-upgrade`.
28+
This upgrade is unique because Plone 5.2 supports both Python 2 and Python 3.
29+
The upgrade to 5.2 needs to be done in Python 2.7, and is not different from previous migrations.
30+
To run the upgrade to 5.2, follow the links at the top of the control panel or visit the ZMI for your site at `/@@plone-upgrade`.
31+
32+
If you also want to upgrade from Python 2 to 3 with an existing database, you need to run an additional database migration while the site is not running.
33+
See the section {ref}`python-3-support` below for details.
2934

30-
If you also want to upgrade from Python 2 to 3 with a existing database, you need to run a additional database migration while the site is not running.
31-
See the section {ref}`python-3-support` below for details about that.
3235

33-
## Changes Between Plone 5.1 And 5.2
36+
## Changes between Plone 5.1 and 5.2
37+
38+
The following PLIPs (Plone Improvement Proposals) have been implemented for 5.2.
3439

35-
The following PLIPs (Plone Improvement Proposals) have been implemented for 5.2:
3640

3741
(python-3-support)=
3842

39-
### Python 3 Support
43+
### Python 3 support
44+
45+
Plone 5.2 supports Python 3.6, 3.7, and 3.8, as well as Python 2.7.
4046

41-
Plone 5.2 supports Python 3.6 and 3.7 as well as Python 2.7.
47+
This is [PLIP 2368](https://github.com/plone/Products.CMFPlone/issues/2368) and [PLIP 2890](https://github.com/plone/Products.CMFPlone/issues/2890).
4248

43-
This is [PLIP 2368](https://github.com/plone/Products.CMFPlone/issues/2368).
4449

45-
#### For End Users
50+
#### For end users
4651

4752
Nothing changes.
4853

49-
#### For Developers
54+
55+
#### For developers
5056

5157
All custom code and add-ons need to support Python 3.
5258
Existing databases need to be upgraded as well.
5359

5460
The migration to Python 3 follows these steps:
5561

56-
1. Upgrade add-ons and code to Plone 5.2 while running Python 2.7.
57-
2. Upgrade the Database to Plone 5.2 while running Python 2.7. To run that upgrade follow the links on top of the control panel or the ZMI to the form `/@@plone-upgrade`
58-
3. Drop any remaining Archetypes-dependencies. Migrate these to Dexterity instead.
59-
4. Port add-ons and custom code to Python 3 without the existing database.
60-
5. Migrate the database using `zodbupdate`. If you are working on a new project (i.e. without a existing database) you can skip the last step.
62+
1. Upgrade add-ons and code to Plone 5.2 while running Python 2.7.
63+
2. Upgrade the Database to Plone 5.2 while running Python 2.7.
64+
To run that upgrade, follow the links at the top of the control panel or visit the ZMI for your site at `/@@plone-upgrade`.
65+
3. Drop any remaining Archetypes dependencies.
66+
Migrate these to Dexterity instead.
67+
4. Port add-ons and custom code to Python 3 without the existing database.
68+
5. Migrate the database using `zodbupdate`.
69+
If you are working on a new project without an existing database, you can skip this step.
70+
71+
See {doc}`upgrade-to-python3` for details about porting code and a database to Python 3.
6172

62-
See {ref}`migrating-52-to-python3-label` for details about porting code and database to Python 3.
6373

6474
### Zope 4.0
6575

6676
Plone runs on top of Zope 4.0 instead of Zope 2.13.x.
6777

6878
This is [PLIP 1351](https://github.com/plone/Products.CMFPlone/issues/1351).
6979

70-
#### For End Users
7180

72-
This has no changes for Editors. Admins will notice that the ZMI has a new bootstrap-based theme and some control panels have moved.
81+
#### For end users
7382

74-
#### For Developers
83+
This has no changes for Editors.
84+
Admins will notice that the ZMI has a new Twitter Bootstrap-based theme, and some control panels have moved.
7585

76-
There are a lot of changes in Zope. For details please see:
7786

78-
- [What’s new in Zope 4.0](https://zope.readthedocs.io/en/latest/zope4/news.html)
79-
- [Changelog for alpha-versions](https://github.com/zopefoundation/Zope/blob/4.0a6/CHANGES.rst)
80-
- [Changelog for beta-versions](https://zope.readthedocs.io/en/latest/changes.html)
87+
#### For developers
8188

82-
Many of the changes in Zope had effects on Plone that had been addressed. For most add-ons though the changes have little to no effect.
89+
There are a lot of changes in Zope.
90+
For details please see the following documents.
8391

84-
Some tools from CMFCore are now utilities and can also be accessed as such. Example:
92+
- [What's new in Zope 4.0](https://zope.readthedocs.io/en/latest/zope4/news.html)
93+
- [Changelog for alpha versions](https://github.com/zopefoundation/Zope/blob/4.0a6/CHANGES.rst)
94+
- [Changelog for beta versions](https://zope.readthedocs.io/en/latest/changes.html)
95+
96+
Many of the changes in Zope had effects on Plone that have been addressed.
97+
For most add-ons, though, the changes have little to no effect.
98+
99+
Some tools from `CMFCore` are now utilities and can also be accessed as such.
100+
Example:
85101

86102
```python
87103
# old
@@ -94,7 +110,8 @@ from zope.component import getUtility
94110
wf_tool = getUtility(IWorkflowTool)
95111
```
96112

97-
The deprecated module `Globals` was removed. Example:
113+
The deprecated module `Globals` was removed.
114+
Example:
98115

99116
```python
100117
# old:
@@ -106,87 +123,104 @@ from App.config import getConfiguration
106123
develoment_mode = getConfiguration().debug_mode
107124
```
108125

109-
Functional tests using the zope.testbrowser now use `WebTest` instead of `mechanize`. That means that tests that used interal methods of mechanize need to be updated.
126+
Functional tests using the `zope.testbrowser` now use `WebTest` instead of `mechanize`.
127+
That means that tests that used internal methods of `mechanize` need to be updated.
128+
110129

111130
### WSGI
112131

113132
This is a result of the PLIP for Python 3.
114133
Plone 5.2 by default uses the WSGI-Server [waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/).
115134

116-
#### For End Users
135+
136+
#### For end users
117137

118138
Nothing changes.
119139

120-
#### For Developers
121140

122-
By default Plone uses `waitress` instead of `ZServer` as a HTTP-server since `ZServer` will not ported to Python 3.
123-
Only when running on Python 2 you can still decide to use `ZServer` by setting `wsgi = off` in the buildout-part that configures the instance with `plone.recipe.zope2instance`.
141+
#### For developers
142+
143+
By default, Plone uses `waitress` instead of `ZServer` as an HTTP server because `ZServer` will not be ported to Python 3.
144+
Only when running on Python 2, you can still use `ZServer` by setting `wsgi = off` in the buildout part that configures the instance with `plone.recipe.zope2instance`.
124145

125146
Some options that used to configure `ZServer` are no longer available in `plone.recipe.zope2instance` when running on `WSGI`.
126-
Check <https://pypi.org/project/plone.recipe.zope2instance> for details.
147+
Check https://pypi.org/project/plone.recipe.zope2instance for details.
148+
127149

128150
### plone.restapi
129151

130152
This is [PLIP 2177](https://github.com/plone/Products.CMFPlone/issues/2177).
131153

132-
#### For End Users
154+
155+
#### For end users
133156

134157
Nothing changes.
135158

136-
#### For Developers
137159

138-
You can now use a RESTful hypermedia API for Plone to build modern JavaScript front-ends on top of Plone.
139-
Also, the REST-api can be used to import or export data.
160+
#### For developers
161+
162+
You can now use a RESTful hypermedia API for Plone to build modern JavaScript frontends on top of Plone.
163+
Also, the REST API can be used to import or export data.
164+
165+
See https://plonerestapi.readthedocs.io/en/latest/ for details.
140166

141-
See <https://plonerestapi.readthedocs.io/en/latest/> for details.
142167

143168
### New navigation with dropdown
144169

145170
This is [PLIP 2516](https://github.com/plone/Products.CMFPlone/issues/2516).
146171

147-
#### For End Users
148172

149-
Site-Administrators can use the navigation control panel (`/@@navigation-controlpanel`) to configure the dropdown-navigation.
173+
#### For end users
150174

151-
#### For Developers
175+
Site Administrators can use the navigation control panel (`/@@navigation-controlpanel`) to configure the dropdown navigation.
152176

153-
For upgraded sites the dropdown-navigation is disabled by default, for new sites it is set to display 3 levels.
154177

155-
The code for the global navigation has moved to `plone.app.layout.navigation.navtree.NavTreeProvider` and the template `plone.app.layout/plone/app/layout/viewlets/sections.pt` has changed.
156-
Overrides of the previous navigation may no longer work and need to be updated.
178+
#### For developers
157179

158-
Developers who used add-ons or custom code for a dropdown-navigation should consider migrating to the new navigation since it is extremely fast, accessible and implemented almost entirely with css and html.
180+
For upgraded sites, the dropdown navigation is disabled by default.
181+
For new sites, it is set to display 3 levels.
159182

160-
### Merge Products.RedirectionTool into core
183+
The code for the global navigation has moved to `plone.app.layout.navigation.navtree.NavTreeProvider`, and the template `plone.app.layout/plone/app/layout/viewlets/sections.pt` has changed.
184+
Overrides of the previous navigation may no longer work and may need to be updated.
185+
186+
Developers who used add-ons or custom code for a dropdown navigation should consider migrating to the new navigation since it is extremely fast, accessible, and implemented almost entirely with CSS and HTML.
187+
188+
189+
### Merge `Products.RedirectionTool` into core
161190

162191
This is [PLIP 1486](https://github.com/plone/Products.CMFPlone/issues/1486).
163192

164-
#### For End Users
165193

166-
Site-Administrators can use the {guilabel}`URL Management` control panel (`/@@redirection-controlpanel`) to manage and add alternative URLs including bulk upload of alternative urls.
194+
#### For end users
195+
196+
Site Administrators can use the {guilabel}`URL Management` control panel (`/@@redirection-controlpanel`) to manage and add alternative URLs, including bulk upload of alternative URLs.
167197

168198
As an Editor, you can see the {guilabel}`URL Management` link in the {guilabel}`actions` menu of a content item, and add or remove alternative URLs for this specific content item.
169199

170-
#### For Developers
171200

172-
Since the add-on `Products.RedirectionTool` has been merged into Plone, you should remove it.
201+
#### For developers
202+
203+
Since the add-on `Products.RedirectionTool` has been merged into Plone core, you should remove it.
173204
You can either uninstall it before upgrading to Plone 5.2, or remove the product from the eggs and let the upgrade code from Plone remove it.
174205
Any alternative URLs (aliases) that you have added manually will be kept.
175206

207+
176208
### New Login
177209

178210
This is [PLIP 2092](https://github.com/plone/Products.CMFPlone/issues/2092).
179211

180-
#### For End Users
212+
213+
#### For end users
181214

182215
Nothing changes.
183216

184-
#### For Developers
217+
218+
#### For developers
185219

186220
Overrides of any templates or Python scripts that dealt with login or logout need to be changed.
187221

188-
The login has moved from skin-based system to browser views.
189-
You can use `z3c.jbot` to override templates and use the component architecture to override the views.
222+
The login has moved from a skin-based system to browser views.
223+
You can use `z3c.jbot` to override templates, and use the component architecture to override the views.
190224
The main code is now in `Products.CMFPlone.browser.login.login.LoginForm`.
191225

192226
You can customize the location to which a user will be redirected after login with an adapter.
@@ -232,15 +266,18 @@ Then register the adapter through ZCML:
232266
This adapter adapts context and request, thus you can modify these according to your needs.
233267
You can also write similar adapters for `IInitialLogin` and `IForcePasswordChange`.
234268

269+
235270
### Deprecate Archetypes
236271

237272
This is [PLIP 2390](https://github.com/plone/Products.CMFPlone/issues/2390).
238273

239-
#### For End Users
274+
275+
#### For end users
240276

241277
Nothing changes.
242278

243-
#### For Developers
279+
280+
#### For developers
244281

245282
In Plone 5.2 Archetypes is only available if you run Python 2.7 and if you add it to your dependencies.
246283

@@ -257,32 +294,38 @@ eggs =
257294
```{note}
258295
Instead of using Archetypes in Plone 5.2, you should consider migrating to Dexterity.
259296
Dexterity is also a hard requirement to be able to use Python 3.
260-
See [plone.app.contenttypes documentation on Migration](https://github.com/plone/plone.app.contenttypes#migration) for details on the migration from Archetypes to Dexterity.
297+
See [`plone.app.contenttypes` documentation on Migration](https://github.com/plone/plone.app.contenttypes#migration) for details on the migration from Archetypes to Dexterity.
261298
```
262299

300+
263301
### Remove support for old style resource registries
264302

265303
This is [PLIP 1742](https://github.com/plone/Products.CMFPlone/issues/1742).
266304

267-
#### For End Users
305+
306+
#### For end users
268307

269308
Nothing changes.
270309

271-
#### For Developers
272310

273-
Support for old-style resource registries (`cssregistry.xml` and `jsregistry.xml`) was removed completely along with the tools `portal_css` or `portal_javascript`.
311+
#### For developers
312+
313+
Support for old-style resource registries (`cssregistry.xml` and `jsregistry.xml`) was removed completely, along with the tools `portal_css` or `portal_javascript`.
274314

275315
You need to add resources using the new Resource Registry.
276316
See https://docs.plone.org/adapt-and-extend/theming/resourceregistry.html#resources for detailed instructions.
277317

278-
### Restructure CMFPlone static resources
318+
319+
### Restructure `CMFPlone` static resources
279320

280321
This is [PLIP 1653](https://github.com/plone/Products.CMFPlone/issues/1653).
281322

282-
#### For End Users
323+
324+
#### For end users
283325

284326
Nothing changes.
285327

286-
#### For Developers
328+
329+
#### For developers
287330

288331
All JavaScript related code is now located in `plone.staticresources`.

0 commit comments

Comments
 (0)