Plone 6.0.0a4 released

Release notes for Plone 6.0.0a4

Released: Friday April 8, 2022.

Highlights

Changes since 6.0.0a3:

  • Use zc.buildout 3.0.0rc3 and setuptools 62.0.0 by default.
  • Update waitress to version 2.1.1 to mitigate a vulnerability in that package.
  • Zope 5.5.1: Enhance cookie support.
  • plone.staticresources: The big one: Updated JavaScript for Plone Classic, using ES6 modules. No more through-the-web compiling of JavaScript. See PLIP 3211.
  • Products.CMFPlone:
    • Remove RequireJS.
    • Remove default resource jQuery. It is added to the global namespace via the bundle.
    • Remove support for conditional comments in script and style tags. It's not supported since IE10.
    • Remove dependency on mockup. Mockup is now a npm package only and as such a dependency of plone.staticresources.
    • New resource registry to simplify CSS/JS registration.
    • Only "bundles" are registered - support of "resources" and "bundle resources" is removed.
    • Removed TTW compilation of bundles via r.js and less.js.
    • Property merge_with is no longer needed in HTTP/2 times and merging here unsupported.
    • Unique key for delivery is based on hash of bundle file, last_compilation property is deprecated.
    • PLIP #3279: Implement modern images scales. Add huge (1600px), great (1200px), larger (1000px), teaser (600px). Amend preview and mini (remove height constraint).
    • Add TinyMCE template plugin to the plugins vocabulary.
    • Add TinyMCE alignment classes, to avoid style usage.
  • plone.volto is now a dependency of the Plone package.
  • PLIP 2780: Move features of collective.dexteritytextindexer to core.
  • plone.app.dexterity:
    • Remove JavaScript from this package and move it to Mockup.
    • Modeleditor: Use pat-code-editor from Patternslib instead ACE. Make the model editing form usable without JavaScript. Allow editing the form even with XML errors to be able to fix the problem.
  • plone.recipe.zope2instance: by default do not create a temporary storage.
  • plone.scale: Removed deprecated factory argument from scale method.
  • plone.app.linkintegrity: Track link integrity of referenced PDFs and other site objects in IFRAME SRC references.
  • plone.outputfilters: Resolve UIDs in SRC= attribute of of SOURCE and IFRAME elements.
  • plone.app.querystring: Add lazy attribute to vocabularies to prevent fetching any results.
  • plone.app.theming:
    • Deactivate copy button and modal in theming control panel.
    • Remove all thememapper functionality from theming control panel, including Inspect/Modify theme and the Preview.
  • plone.app.users: Show unfiltered member fields for manager in user profile page.
  • plone.app.widgets:
    • Remove implicit dependency on Mockup. Mockup is no longer a Python package, only an npm package.
    • Update datetime pattern options for Patternslib pat-date-picker/pat-datetime-picker.
  • plone.autoform:
    • Fixes for latest z3c.form.
    • Reimplementation of ObjectSubForm and ISubformFactory, backported from older z3c.form.
  • plone.app.z3cform:
    • Use better types for inputs.
    • Use browser native date and datetime-local input together with patternslib date-picker.
    • Implement TimeWidget which renders <input type="time" />.
    • Use pat-validation in forms.
    • Fixed for latest z3c.form
  • plone.z3cform: compatibility with latest z3c.form.
  • plone.namedfile: Register AnnotationStorage as IImageScaleStorage multi adapter, both from plone.scale. Use this adapter in our scaling functions when we store or get an image scale.
  • Products.PlonePAS: Add separate GenericSetup profile to switch the Zope root /acl_users to use a simple cookie login form. Useful when Zope root login and logout need to synchronize authentication state between multiple plugins, which is not possible with HTTP Basic authentication.
  • plone.app.layout:
    • Restructure global sections and searchbox markup for mobile navigation as offcanvas sidebar.
    • LiveSearch with support for images in search results.
  • plonetheme.barceloneta: sticky footer.

Note that changes may be mentioned only once, even when they involve multiple packages.

Installation

Some documentation about installation:

If you use Docker, we have some images:

  • plone/plone-backend (5.2 and 6.0)
  • plone/plone-frontend (Volto)
  • plone/plone-haproxy

If you don't do Docker, you will have to do the backend by hand.
The links above should give you information on how to install the prerequisites, like Python, also on Windows.
Here, we will focus on Unix-like systems (Linux, Mac OSX), but Windows should work as well.
The steps are:

  • Install the Plone (Classic) backend with buildout or pip.
  • Create the Plone Site in the browser.
  • Install the Plone frontend (Volto) with node.

Install backend with buildout

Change to a new directory and put a file buildout.cfg in it:

[buildout]
extends = https://dist.plone.org/release/6.0.0a4/versions.cfg
parts = instance

[instance]
recipe = plone.recipe.zope2instance
eggs =
    Plone
user = admin:admin

Install it with:

python3.9 -m venv .
bin/pip install -r https://dist.plone.org/release/6.0.0a4/requirements.txt
bin/buildout
bin/instance fg

Install backend with pip

If you don't want to use buildout, you can install the Plone Python packages with pip.
Change to a new directory and then:

python3.9 -m venv .
bin/pip install -U pip setuptools wheel
bin/pip install Plone -c https://dist.plone.org/release/6.0.0a4/constraints.txt
bin/mkwsgiinstance -u admin:admin -d .
bin/runwsgi -v etc/zope.ini

Note: you may need to edit etc/zope.conf to add a blob-dir.
See issue 3345

Create Plone backend

After you have installed the backend with buildout or pip, open a browser and go to http://localhost:8080/.
Click 'Create a new Plone site' to prepare for the new Volto frontend.
If you want Plone Classic instead, click 'Create Classic Plone site'.
(If this button is not available, then you did not install plone.volto with buildout or pip. 'Create a new Plone site' will create a Classic site then.)

Note: For Volto, make sure the Path identifier is Plone. You can change this, but then you need to change some Volto frontend configuration as well.

Submit the form and your backend is ready.
If you want Classic Plone, you are done.
If you want the full Plone 6 with Volto, read on.

Frontend with node

You should probably read one of documentation pages linked above.
But the following gives you the general idea.

First install nvm, the Node Version Manager

  • On Linux: apt-get install nvm
  • On Mac: brew install nvm
  • Or use the installation procedure detailed in the nvm documentation

Create a Volto project:

nvm install --lts
npm install --global yarn
npm init yo @plone/volto

This will take long, and then ask for a project name.
It will create a directory with this name.
Go to that directory and start the frontend:

yarn start

In your browser go to http://localhost:3000.

You are done. Welcome to Plone 6!

8 Likes

I get this error with a simple browser view which renders this error:

Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 167, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 376, in publish_module
  Module ZPublisher.WSGIPublisher, line 271, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 68, in call_object
  Module zope.browserpage.simpleviewclass, line 41, in __call__
  Module Products.Five.browser.pagetemplatefile, line 126, in __call__
  Module Products.Five.browser.pagetemplatefile, line 58, in __call__
  Module zope.pagetemplate.pagetemplate, line 133, in pt_render
  Module Products.PageTemplates.engine, line 365, in __call__
  Module z3c.pt.pagetemplate, line 176, in render
  Module chameleon.zpt.template, line 302, in render
  Module chameleon.template, line 215, in render
  Module chameleon.utils, line 53, in raise_with_traceback
  Module chameleon.template, line 192, in render
  Module 10525b04ab1d1b3d0a1a7b572b650dcb, line 429, in render
  Module dbaa5a3c00a1ff01203641497ecd6e04, line 892, in render_master
  Module zope.contentprovider.tales, line 76, in __call__
  Module zope.viewlet.manager, line 155, in update
  Module zope.viewlet.manager, line 161, in _updateViewlets
  Module plone.app.layout.viewlets.common, line 611, in update
  Module plone.volto.browser.breadcrumbs, line 49, in breadcrumbs
  Module zope.deferredimport.deferredmodule, line 70, in __getattr__
AttributeError: isDefaultPage

 - Expression: "provider:plone.abovecontent"
 - Filename:   ... egg/Products/CMFPlone/browser/templates/main_template.pt
 - Location:   (line 75: col 59)
 - Source:     ... :content="structure provider:plone.abovecontent" />
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Expression: "context/main_template/macros/master"
 - Filename:   ... /src/zopyx.surveyjs/src/zopyx/surveyjs/browser/viewer.pt
 - Location:   (line 5: col 23)
 - Source:     ... etal:use-macro="context/main_template/macros/master">
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 - Arguments:  template: <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x7efd098ad6a0>
               options: {}
               args: ()
               nothing: None
               modules: <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter object at 0x7efd0cea7a00>
               request: <WSGIRequest, URL=http://dev2.zopyx.de:8080/Plone2/xx/viewer>
               view: <Products.Five.browser.metaconfigure.SimpleViewClass from /home/ajung/src/zopyx.surveyjs/src/zopyx/surveyjs/browser/viewer.pt object at 0x7efd044f19d0>
               context: <Survey at /Plone2/xx>
               views: <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x7efd04547760>
               here: <Survey at /Plone2/xx>
               container: <Survey at /Plone2/xx>
               root: <Application at >
               traverse_subpath: []
               user: <PropertiedUser 'admin'>
               default: <DEFAULT>
               repeat: <Products.PageTemplates.engine.RepeatDictWrapper object at 0x7efd04528440>
               loop: {}
               target_language: None
               translate: <function BaseTemplate.render.<locals>.translate at 0x7efd04647820>
               macroname: 'master'
               attrs: {}

Products.CMFPlone.utils.isDefaultPage was deprecated since Plone 5.0 (2015).
Replace it with Products.CMFPlone.defaultpage.check_default_page_via_view

@zopyx not your fault. it seems that in plone.volto there is another use of utils.isDefaultPage (plone.volto/breadcrumbs.py at main · plone/plone.volto · GitHub). We should get a fixed release of plone.volto out soon.

1 Like

Released plone.volto 4.0.0a4 plone.volto · PyPI

3 Likes

I have updated versions.cfg and constraints.txt to plone.volto 4.0.0a4.
That is not what we usually do. But well: the change is within a day and very much needed, and we are still in the alpha phase.

The files on dist.plone.org are cached, so you might still get the previous version. In your browser a refresh may help. Or as a trick add something like ?yourname=1 to the url.

2 Likes

Question is, why was this not picked up by our Jenkins? All been green there.

Well, there is no test in plone.volto that renders a page.