Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plone 5.2.2 - Navigating within the folder contents does not update the URL of the actions in the toolbar #3191

Closed
mcasagrande18 opened this issue Oct 6, 2020 · 7 comments

Comments

@mcasagrande18
Copy link

mcasagrande18 commented Oct 6, 2020

In Plone 5.2.2 when you navigation using the folder contents view through a hierarchy of documents then URL of the toolbar's view, edit, content and other action does not relate to the URL of the current folder of the folder contents view.

Is related to: #2395 and #2531

@fredvd
Copy link
Sponsor Member

fredvd commented Oct 23, 2020

I can confirm this. Noticed it in a project with a customised theme, my colleague @mauritsvanrees tested and sees the same in in coredev-plone5.2

@fredvd
Copy link
Sponsor Member

fredvd commented Oct 23, 2020

Did some more 'black box testing in buildout.coredev 5.2.3.dev0 with creating a folder1/subfolder2/subsubfolder3/subsubsubfolder4 hierarchy.

What happens is that only the FIRST navigation action in the folder_contents is pushed to the toolbar. subsequent navigation actions in the folder contents by clicking on an item in the main table or the breadcrumbs is not.

So when you enter folder_contents in subsubfolder3 and navigate to subfolder2 using the folder_contents breadcrumbs, the view action in the toolbar is updates to /folder1/subfolder2, but after this it stays stuck on folder1/subfolder2

@fredvd
Copy link
Sponsor Member

fredvd commented Oct 23, 2020

Fix: plone/mockup#1028

@fredvd
Copy link
Sponsor Member

fredvd commented Oct 31, 2020

Fixed in pending Plone 5.2.3 in mockup 3.2.3./plone.staticresources 1.3.0 . Pull request for Plone 6 mockup: plone/mockup#1030

@fredvd fredvd closed this as completed Oct 31, 2020
@fredvd
Copy link
Sponsor Member

fredvd commented Nov 3, 2020

Unfortunately this doesn't seem fixed in the releases plone.staticresources 1.4.0 It's even worse now: the toolbar doesn't even get updated the first time. I've tested this in a customer project on a testing environment where I pinned plone.staticresources to 1.4.0 which should contain the fix from mockup 3.2.3 .

Will investigate further, something is def. different with the javascript when being served from source files vs being served from bundles or metabundled for production.

@mauritsvanrees I cheered too early for a fix in 5.2.3 :-(

@fredvd fredvd reopened this Nov 3, 2020
@fredvd
Copy link
Sponsor Member

fredvd commented Nov 3, 2020

I found the cause why the toolbar-updating completely broke in one of our customer projects. We are using backend.xml there to switch the theme to barceloneta on edit/control panel pages.

About two years ago @thet updated the main rules.xml in barceloneta to copy #edit-bar from the content and not the content-children of edit bar. But he forgot to update the backend.xml version::
plone/plonetheme.barceloneta@8beb307

both in plonetheme.barceloneta 2.2 and master when you add backend.xml, the div with #edit-bar disappears.

When I tried to fix the navigation/toolbar sync issue last week I worked with buildout-coredev 5.2 and included a dependency on #edit-bar to be sure to find the correct edit-zone to replace:

https://github.com/plone/mockup/blob/2a7c5707ecebbf601ed13d5b2ab12485870949a8/mockup/patterns/toolbar/pattern.js#L511-L522

At the moment releasing Plone 5.2.3 is going to break toolbar/folder_contents in projects who are using the backend.xml system from plonetheme.barceloneta. As what I saw in my project, the toolbar isn't updated at all because #edit-bar doesn't exist.

To avoid this, replacing #edit-bar with body in

https://github.com/plone/mockup/blob/2a7c5707ecebbf601ed13d5b2ab12485870949a8/mockup/patterns/toolbar/pattern.js#L520

Fixes the issue for backend.xml not copying #edit-bar. Will need a new mockup/plone.staticresources release. And we should fix backend.xml in plonetheme.barceloneta.

@mauritsvanrees
Copy link
Sponsor Member

It took a few tries, but AFAIK all folder contents issues like this were fixed somewhere in the 5.2.x series.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants