You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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"
8
8
---
9
9
10
10
11
+
(upgrading-plone-5.1-to-5.2-label)=
12
+
11
13
# Upgrading Plone 5.1 to 5.2
12
14
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
+
16
17
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).
18
24
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).
23
25
24
26
## Upgrading
25
27
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.
29
34
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.
32
35
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.
34
39
35
-
The following PLIPs (Plone Improvement Proposals) have been implemented for 5.2:
36
40
37
41
(python-3-support)=
38
42
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.
40
46
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).
42
48
43
-
This is [PLIP 2368](https://github.com/plone/Products.CMFPlone/issues/2368).
44
49
45
-
#### For End Users
50
+
#### For end users
46
51
47
52
Nothing changes.
48
53
49
-
#### For Developers
54
+
55
+
#### For developers
50
56
51
57
All custom code and add-ons need to support Python 3.
52
58
Existing databases need to be upgraded as well.
53
59
54
60
The migration to Python 3 follows these steps:
55
61
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.
61
72
62
-
See {ref}`migrating-52-to-python3-label` for details about porting code and database to Python 3.
63
73
64
74
### Zope 4.0
65
75
66
76
Plone runs on top of Zope 4.0 instead of Zope 2.13.x.
67
77
68
78
This is [PLIP 1351](https://github.com/plone/Products.CMFPlone/issues/1351).
69
79
70
-
#### For End Users
71
80
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
73
82
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.
75
85
76
-
There are a lot of changes in Zope. For details please see:
77
86
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
81
88
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.
83
91
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:
85
101
86
102
```python
87
103
# old
@@ -94,7 +110,8 @@ from zope.component import getUtility
94
110
wf_tool = getUtility(IWorkflowTool)
95
111
```
96
112
97
-
The deprecated module `Globals` was removed. Example:
113
+
The deprecated module `Globals` was removed.
114
+
Example:
98
115
99
116
```python
100
117
# old:
@@ -106,87 +123,104 @@ from App.config import getConfiguration
106
123
develoment_mode = getConfiguration().debug_mode
107
124
```
108
125
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
+
110
129
111
130
### WSGI
112
131
113
132
This is a result of the PLIP for Python 3.
114
133
Plone 5.2 by default uses the WSGI-Server [waitress](https://docs.pylonsproject.org/projects/waitress/en/stable/).
115
134
116
-
#### For End Users
135
+
136
+
#### For end users
117
137
118
138
Nothing changes.
119
139
120
-
#### For Developers
121
140
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`.
124
145
125
146
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
+
127
149
128
150
### plone.restapi
129
151
130
152
This is [PLIP 2177](https://github.com/plone/Products.CMFPlone/issues/2177).
131
153
132
-
#### For End Users
154
+
155
+
#### For end users
133
156
134
157
Nothing changes.
135
158
136
-
#### For Developers
137
159
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.
140
166
141
-
See <https://plonerestapi.readthedocs.io/en/latest/> for details.
142
167
143
168
### New navigation with dropdown
144
169
145
170
This is [PLIP 2516](https://github.com/plone/Products.CMFPlone/issues/2516).
146
171
147
-
#### For End Users
148
172
149
-
Site-Administrators can use the navigation control panel (`/@@navigation-controlpanel`) to configure the dropdown-navigation.
173
+
#### For end users
150
174
151
-
#### For Developers
175
+
Site Administrators can use the navigation control panel (`/@@navigation-controlpanel`) to configure the dropdown navigation.
152
176
153
-
For upgraded sites the dropdown-navigation is disabled by default, for new sites it is set to display 3 levels.
154
177
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
157
179
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.
159
182
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
161
190
162
191
This is [PLIP 1486](https://github.com/plone/Products.CMFPlone/issues/1486).
163
192
164
-
#### For End Users
165
193
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.
167
197
168
198
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.
169
199
170
-
#### For Developers
171
200
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.
173
204
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.
174
205
Any alternative URLs (aliases) that you have added manually will be kept.
175
206
207
+
176
208
### New Login
177
209
178
210
This is [PLIP 2092](https://github.com/plone/Products.CMFPlone/issues/2092).
179
211
180
-
#### For End Users
212
+
213
+
#### For end users
181
214
182
215
Nothing changes.
183
216
184
-
#### For Developers
217
+
218
+
#### For developers
185
219
186
220
Overrides of any templates or Python scripts that dealt with login or logout need to be changed.
187
221
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.
190
224
The main code is now in `Products.CMFPlone.browser.login.login.LoginForm`.
191
225
192
226
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:
232
266
This adapter adapts context and request, thus you can modify these according to your needs.
233
267
You can also write similar adapters for `IInitialLogin` and `IForcePasswordChange`.
234
268
269
+
235
270
### Deprecate Archetypes
236
271
237
272
This is [PLIP 2390](https://github.com/plone/Products.CMFPlone/issues/2390).
238
273
239
-
#### For End Users
274
+
275
+
#### For end users
240
276
241
277
Nothing changes.
242
278
243
-
#### For Developers
279
+
280
+
#### For developers
244
281
245
282
In Plone 5.2 Archetypes is only available if you run Python 2.7 and if you add it to your dependencies.
246
283
@@ -257,32 +294,38 @@ eggs =
257
294
```{note}
258
295
Instead of using Archetypes in Plone 5.2, you should consider migrating to Dexterity.
259
296
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.
261
298
```
262
299
300
+
263
301
### Remove support for old style resource registries
264
302
265
303
This is [PLIP 1742](https://github.com/plone/Products.CMFPlone/issues/1742).
266
304
267
-
#### For End Users
305
+
306
+
#### For end users
268
307
269
308
Nothing changes.
270
309
271
-
#### For Developers
272
310
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`.
274
314
275
315
You need to add resources using the new Resource Registry.
276
316
See https://docs.plone.org/adapt-and-extend/theming/resourceregistry.html#resources for detailed instructions.
277
317
278
-
### Restructure CMFPlone static resources
318
+
319
+
### Restructure `CMFPlone` static resources
279
320
280
321
This is [PLIP 1653](https://github.com/plone/Products.CMFPlone/issues/1653).
281
322
282
-
#### For End Users
323
+
324
+
#### For end users
283
325
284
326
Nothing changes.
285
327
286
-
#### For Developers
328
+
329
+
#### For developers
287
330
288
331
All JavaScript related code is now located in `plone.staticresources`.
0 commit comments