Pat-contentbrowser broken in multilingual sites

Hello everyone!

I have some sites with multilingual support installed (plone 6.1) and for those sites the new pat-contentbrowser is not working.

As you can see bellow, the first image is a site without plone.app.multilingual and the second is a site with plone.app.multilingual.


Even though it loads the results if I click in any of the itens it makes a wrong GET request like this:

@@getSource?query={"criteria":[{"i":"path","o":"plone.app.querystring.operation.string.path","v":"/Plone/graduacao::1"}],"sort_on":"getObjPositionInParent","sort_order":"ascending"}&attributes=["UID","Title","Description","portal_type","path","getURL","getIcon","is_folderish","review_state","created","modified"]&batch={"page":1,"size":20}

The source of the problem is this: "v":"/Plone/graduacao::1" this should be /Plone/pt-br/graduacao since is a Brazilian Portuguese site.

The only place where this works is the site root.

Does anyone can reproduce this?

I have a p.a.m. Site without any issues 6.1.1rc2

Ok, I was wrong the problem is not with pat-contentbrowser, but with the navigation portlet. When I add a navigation portlet and try to set it's root folder the navigation is broken.

I just tested with fresh docker container like this:

docker run --rm -p 8080:8080 plone/plone-backend:6.1 start
  1. Install p.a.multilingual
  2. Add other languages
  3. Add a folder at any language root
  4. Add a Navigation Portlet to the created folder and try to set root folder

In that last step I can't navigate using the content browser.

@petschki looks like a bug in pat-contentbrowser ?

I recently fixed browsing on multilingual installations here Add multilanguage container types to `browseableTypes` by petschki · Pull Request #1448 · plone/mockup · GitHub ... this was released in plone.staticresources==2.2.5

But the described effect doesn't look like it has something to do with it.

@lyralemos Regarding navigation portlet: can you reproduce that on Welcome to Plone — English anf file a bug on GitHub · Where software is built ?

I can reproduce this effect in my live sites. i think in plone.app.portlets the widget is not explicit set or the definition via catalog_source is the problem. this should be investigated.
@lyralemos can you open an issue please?

I alread tried with plone.staticresources==2.2.5 with the same results.

Here the same problem in Welcome to Plone — English.

Where should I open the ticket: plone.app.portlets or mockup?

The source lookup URL looks like this:

https://classic.demo.plone.org/en/test-for-navigationportlet/++contextportlets++plone.leftcolumn/my-nav/edit/++widget++form.widgets.root_uid/@@getSource?query={"criteria":[{"i":"path","o":"plone.app.querystring.operation.string.path","v":"/Plone/en/test-for-navigationportlet/++contextportlets++plone.leftcolumn::1"}],"sort_on":"getObjPositionInParent","sort_order":"ascending"}&attributes=["UID","Title","Description","portal_type","path","getURL","getIcon","is_folderish","review_state","created","modified"]&batch={"page":1,"size":20}

So we should investigate, how the path criteria was handled in the relateditems_options before the switch to contentbrowser.

@lyralemos please open an issue in plone.app.portlets

Done!

2 Likes