Skip to content

Commit a83ac53

Browse files
committed
Merge remote-tracking branch 'upstream/6.0' into plone_to_zope_name_change_#1751
2 parents 49ca1a1 + b256a8e commit a83ac53

30 files changed

+362
-88
lines changed

.github/boring-cyborg.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ firstIssueWelcomeComment: >
7373
Also please follow the issue template, as it helps both you and other community members contribute more effectively.
7474
7575
<br>If your issue is a feature request, others may raise its prominence through
76-
[feature voting](https://6.docs.plone.org/contributing/documentation/index.html#github-menu).
76+
[feature voting](https://github.com/plone/documentation/issues?q=is%3Aissue%20state%3Aopen%20sort%3Areactions-%2B1-desc%20).
7777
7878
<br>Welcome to the Plone community! :tada:
7979

.github/workflows/build_deploy.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ jobs:
4545

4646
- name: Enable corepack
4747
shell: bash
48-
run: corepack enable
48+
run: |
49+
npm i -g corepack@latest
50+
corepack enable
4951
5052
- name: Get pnpm store directory
5153
shell: bash

.readthedocs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# .readthedocs.yaml
22
# Read the Docs configuration file
3-
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
# See https://docs.readthedocs.com/platform/stable/config-file/v2.html for details
44

55
# Required
66
version: 2

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ livehtml: deps ## Rebuild Sphinx documentation on changes, with live-reload in
208208
cd "$(DOCS_DIR)" && ${SPHINXAUTOBUILD} \
209209
--ignore "*.swp" \
210210
--port 8050 \
211+
--watch volto \
212+
--watch plone.api \
213+
--watch plone.restapi \
211214
-b html . "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
212215

213216
.PHONY: rtd-pr-preview

docs/_inc/_install-browser-reqs-volto.md

-10
This file was deleted.

docs/_static/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"[markdown]": {
3+
"editor.formatOnSave": false
4+
}
5+
}

docs/admin-guide/export-import.md

+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "Export and import Plone site data with plone.exportimport"
5+
"property=og:description": "Export and import Plone site data with plone.exportimport"
6+
"property=og:title": "Export and import Plone site data with plone.exportimport"
7+
"keywords": "Plone 6, plone.exportimport, export, import, site, data, Content, Principals, Relations, Translations, Discussions, Redirects"
8+
---
9+
10+
(exportimport)=
11+
12+
# Export and import site data
13+
14+
The `plone.exportimport` package provides support to export and import all kinds of data from and to Plone sites using an intermediate JSON format.
15+
16+
Most features use {doc}`plone.restapi <../plone.restapi/docs/source/index>` to serialize and deserialize data.
17+
18+
19+
## Command line utilities
20+
21+
This package provides two command line utilities, `plone-exporter` and `plone-importer`.
22+
23+
### `plone-exporter`
24+
25+
Export content from a Plone site to a directory in the file system.
26+
You can call `plone-exporter` as shown.
27+
28+
```shell
29+
plone-exporter [--include-revisions] <path-to-zopeconf> <site-id> <path-to-export-data>
30+
```
31+
32+
The following command shows typical usage.
33+
34+
```shell
35+
plone-exporter instance/etc/zope.conf Plone /tmp/plone_data/
36+
```
37+
38+
By default, the revisions history (older versions of each content item) are not exported.
39+
If you do want them, add `--include-revisions` on the command line.
40+
41+
42+
### `plone-importer`
43+
44+
Import content from a file system directory into an existing Plone site.
45+
46+
You can call `plone-importer` as shown.
47+
48+
```shell
49+
plone-importer <path-to-zopeconf> <site-id> <path-to-import-data>
50+
```
51+
52+
The following command shows typical usage.
53+
54+
```shell
55+
plone-importer instance/etc/zope.conf Plone /tmp/plone_data/
56+
```
57+
58+
59+
## Supported data
60+
61+
- Content (Dexterity content items)
62+
- Ordering
63+
- Local roles
64+
- Versions (when using the `--include-revisions` command line option)
65+
- Default pages
66+
- Principals (members and groups)
67+
- Relations (relationships between content items)
68+
- Translations (translation groups)
69+
- Discussions (content comments)
70+
- Redirects (redirect information)
71+
72+
73+
## Exported data structure
74+
75+
Some goals of the new data structure are to:
76+
77+
- support diff of exported data, and
78+
- have blob files near the content item that uses it.
79+
80+
After exporting content, at the top level directory, the following objects exist.
81+
82+
| Name | Description |
83+
| --- | --- |
84+
| `content` | Directory containing content item information exported from the site |
85+
| `discussions.json` | JSON File with discussions (comments) exported from the site |
86+
| `principals.json` | JSON File with members and groups exported from the site |
87+
| `redirects.json` | JSON File with redirect information exported from the site |
88+
| `relations.json` | JSON File with content relations exported from the site |
89+
| `translations.json` | JSON File with translation groups exported from the site |
90+
91+
92+
### Content directory structure
93+
94+
The {file}`content` directory contains all content items exported from the site.
95+
Each content item has its own subdirectory, named with the UID of the content, including the serialized data and all blob files related to this content.
96+
97+
One special case is the directory for the `Plone Site` object, which is named `plone_site_root`.
98+
99+
| Name | Description |
100+
| --- | --- |
101+
| `content/__metadata__.json` | JSON File with metadata information about the exported content |
102+
| `content/<content uid>` | Directory with serialization for a content item |
103+
| `content/plone_site_root` | Directory with serialization for the Plone Site Root |
104+
105+
106+
#### Content item directory structure
107+
108+
Consider a File content item with UID `3e0dd7c4b2714eafa1d6fc6a1493f953` and a PDF file named {file}`plone.pdf` (added in the `file` field), the exported directory will have the following structure.
109+
110+
| Name | Description |
111+
| --- | --- |
112+
| `content/3e0dd7c4b2714eafa1d6fc6a1493f953/data.json` | JSON File with serialized representation of a content item |
113+
| `content/3e0dd7c4b2714eafa1d6fc6a1493f953/file/plone.pdf` | Blob file stored in the `file` field in the content item |

docs/admin-guide/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@ install-pip
3030
3131
run-plone
3232
add-site
33+
zope-manager-users
3334
configure-zope
3435
add-ons
36+
export-import
3537
override-core
3638
/upgrade/index
3739
```

docs/admin-guide/install-buildout.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ For other installation options, see {ref}`get-started-install-label`.
3131

3232
## Prerequisites for installation
3333

34-
- For Plone 6.0, Python {{SUPPORTED_PYTHON_VERSIONS_PLONE60}}
35-
% TODO: These instructions install Plone 6.0.x. Uncomment next line and change the subsequent include when Plone 6.1 is released and "latest".
36-
% - For Plone 6.1, Python {{SUPPORTED_PYTHON_VERSIONS_PLONE61}}
34+
- For Plone 6.1, Python {{SUPPORTED_PYTHON_VERSIONS_PLONE61}}
3735

3836

3937
### Python
4038

41-
```{include} /_inc/_install-python-plone60.md
39+
```{include} /_inc/_install-python-plone61.md
4240
```
4341

4442

docs/admin-guide/install-pip.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,12 @@ For other installation options, see {ref}`get-started-install-label`.
3131

3232
## Prerequisites for installation
3333

34-
- For Plone 6.0, Python {{SUPPORTED_PYTHON_VERSIONS_PLONE60}}
35-
% TODO: These instructions install Plone 6.0.x. Uncomment next line and change the subsequent include when Plone 6.1 is released and "latest".
36-
% - For Plone 6.1, Python {{SUPPORTED_PYTHON_VERSIONS_PLONE61}}
34+
- For Plone 6.1, Python {{SUPPORTED_PYTHON_VERSIONS_PLONE61}}
3735

3836

3937
### Python
4038

41-
```{include} /_inc/_install-python-plone60.md
39+
```{include} /_inc/_install-python-plone61.md
4240
```
4341

4442

@@ -60,7 +58,7 @@ python3 -m venv venv
6058
Install Plone and a helper package, {term}`pipx`.
6159

6260
```shell
63-
venv/bin/pip install -c https://dist.plone.org/release/6.0-latest/constraints.txt Plone pipx
61+
venv/bin/pip install -c https://dist.plone.org/release/6-latest/constraints.txt Plone pipx
6462
```
6563

6664

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
myst:
3+
html_meta:
4+
"description": "How to create a Zope manager user in an existing Zope instance"
5+
"property=og:description": "How to create a Zope manager user in an existing Zope instance"
6+
"property=og:title": "Zope manager users"
7+
"keywords": "Plone, Zope, users, admin user, emergency user, administration, pip, buildout"
8+
---
9+
10+
(admin-guide-zope-manager-user-label)=
11+
12+
# Zope manager users
13+
14+
This guide explains how to add a Zope user with the "manager" role—called a "Zope manager user"—to an existing Zope instance.
15+
16+
Zope manager users have full access to the whole Zope instance.
17+
18+
Some installation methods automatically create a Zope manager user named `admin` for you already.
19+
20+
There are multiple reasons why you might need to add a Zope manager user, including the following.
21+
22+
- Your installation method did not create one.
23+
- You lost access to your instance.
24+
- You inherited a project without proper documentation.
25+
26+
```{note}
27+
If you need to regain access to your instance, this user is also referred to as an "emergency user" in this context only.
28+
29+
The emergency user is a superuser with full access to the Zope instance.
30+
It is not limited to a specific Plone site.
31+
Please be aware of the security implications.
32+
Consider changing the passwords of the existing Zope manager users after you regain access to your instance.
33+
```
34+
35+
(admin-guide-add-a-new-zope-manager-user-label)=
36+
37+
## Add a new Zope manager user
38+
39+
There are multiple methods to create a Zope manager user.
40+
The method depends on how you created and manage your Zope instance, either via {term}`buildout` or {term}`pip`.
41+
42+
```{important}
43+
If you are running a standalone instance, you must stop it before adding the user.
44+
```
45+
46+
(admin-guide-adduser-instance-command-label)=
47+
48+
### `adduser` instance command
49+
50+
If your site was installed with `buildout` and `plone.recipe.zope2instance`, you can add a Zope manager user via the instance script.
51+
52+
Run the following command.
53+
54+
```shell
55+
bin/instance adduser username password
56+
```
57+
58+
The name of the instance script might vary based on your installation.
59+
Replace `username` and `password` with the desired values.
60+
61+
If the command is successful, then it will return the following console output.
62+
63+
```console
64+
Created user: username
65+
```
66+
67+
When you run the script, if the user already exists:
68+
69+
- No user will be created.
70+
- The password will not be changed.
71+
- The command will return a message such as the following.
72+
73+
```console
74+
Created user: None
75+
```
76+
77+
(admin-guide-addzopeuser-command-label)=
78+
79+
### `addzopeuser` script
80+
81+
For `pip` based installations, you will have a script called `addzopeuser` in the {file}`bin` directory of your virtual environment.
82+
The `addzopeuser` script might also be available in `buildout` based installations.
83+
84+
Run the following command.
85+
86+
```shell
87+
$ .venv/bin/addzopeuser -c path/to/etc/zope.conf username password
88+
```
89+
90+
The `addzopeuser` script and {file}`zope.conf` locations might vary based on your installation.
91+
Replace `username` and `password` with the desired values.
92+
93+
If the command is successful, then it will return the following console output.
94+
95+
```console
96+
User username created.
97+
```
98+
99+
When you run the script, if the user already exists:
100+
101+
- No user will be created.
102+
- The password will not be changed.
103+
- The command will return a message such as the following.
104+
105+
```console
106+
Got no result back. User creation may have failed.
107+
Maybe the user already exists and nothing is done then.
108+
Or the implementation does not give info when it succeeds.
109+
```

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Some may require changes in your setup.
1717

1818
## Drop Python 3.8 and 3.9
1919

20-
We only support Python 3.10, 3.11, and 3.12.
20+
We only support Python {{SUPPORTED_PYTHON_VERSIONS_PLONE61}}.
2121

2222

2323
## TinyMCE upgraded in Classic UI

docs/classic-ui/mockup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Alternatively you can implement it in your own templates by adding the CSS class
137137

138138
## References
139139

140-
- [`bobtemplates.plone` documentation](https://bobtemplatesplone.readthedocs.io/en/latest/)
140+
- [`bobtemplates.plone` documentation](https://bobtemplatesplone.readthedocs.io/)
141141
- [`mr.bob` documentation](https://mrbob.readthedocs.io/en/latest/)
142142
- [Plone CLI documentation](https://plonecli.readthedocs.io/en/latest/)
143143
- [`bobtemplates.plone` repository](https://github.com/plone/bobtemplates.plone)

docs/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
r"https://browsersl.ist/#",
106106
# Ignore unreliable sites
107107
r"https://web.archive.org/",
108+
r"https://www.gnu.org/", # Consider removal when upgrading Sphinx
108109
r"http://z3c.pt", # fluke where Sphinx interprets this as a URL
109110
]
110111
linkcheck_allowed_redirects = {
@@ -440,7 +441,7 @@ def source_replace(app, docname, source):
440441

441442
# Dict of replacements.
442443
source_replacements = {
443-
"{PLONE_BACKEND_MINOR_VERSION}": "6.0",
444+
"{PLONE_BACKEND_MINOR_VERSION}": "6.1",
444445
}
445446

446447
# Finally, configure app attributes.

0 commit comments

Comments
 (0)