plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
254 stars 191 forks source link

Wrong title in folder_contents (Plone Classic) #4011

Closed verena-rh closed 1 month ago

verena-rh commented 2 months ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

In Plone Classic folder_contents I found the following problem: If you change to another folder via the breadcrumbs above the table in folder_contents, the title of the previous folder is still displayed as content title.

What I did:

What I expect to happen:

The title of folder2 is displayed as content title.

What actually happened:

The title of folder1 is still displayed as content title.

What version of Plone/ Addons I am using:

Plone Classic 6.0.13

rohnsha0 commented 2 months ago

confirmed... also the title doesnt change in the root_contents when navigating back using breadcrumbs

petschki commented 2 months ago

This is because the pattern pat-structure-updater isn't loaded anymore which has been responsible for updateing the title and description on the context-info-loaded event (triggered by pat-structure) ... see https://github.com/plone/mockup/blob/master/src/pat/structure-updater/structure-updater.js

rohnsha0 commented 2 months ago

then this should better be handled in repo: mockups?

petschki commented 2 months ago

Its ok to create the issue here ... I'll reference to it when fixing it in mockup ...

stevepiercy commented 2 months ago

@rohnsha0 this repo is the default when you don't know in which repo the issue should be created. Someone will help identify in which of the dozens of repos that make up Plone the actual change and pull request should be made.

And I just realized that we don't document this practice in Contributing to Plone. I created an issue for that in https://github.com/plone/documentation/issues/1699.

petschki commented 2 months ago

I've enabled the responsible pattern here https://github.com/plone/mockup/pull/1393

But the configured selectors need to be updated here: https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/patterns/settings.py#L41-L56

In my tests these selectors seemed to work:

{
    "titleSelector": "header > h1",
    "descriptionSelector": "p.lead",
}