plone / Products.CMFPlone

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

Folder contents tree navigation broken in Plone 5.1.2 #2395

Closed tomgross closed 5 years ago

tomgross commented 6 years ago

What I did:

  1. Create a Plone 5.1.2-pending Site.
  2. Create a nested structure with some folders and pages
  3. Navigation within folder_contents to a deeper lever.
  4. Click Edit Button in toolbar.

What I expect to happen:

Edit navigated page

What actually happened:

URL points to the folder the navigation started.

What version of Plone/ Addons I am using:

Plone 5.1.2-pending (minimal) No Addons.

This works with Plone 5.1.1.

tomgross commented 6 years ago

A JavaScript Error is thrown in folder contents:

grafik

gp54321 commented 6 years ago

it's because of this fix for https://github.com/plone/Products.CMFPlone/issues/2322

Since I am now an old hand at using plone-compile-resources I can confirm that reverting the patch fixes the UI bug and the javascript console error (if it was not obvious enough)

Unfortunately I don't understand the original bug report :-(. What's a fc-breadcrumb ? what's the difference with a mere breadcrumb ? It must have been clear for the people reviewing this patch but not for me.

esteele commented 6 years ago

@tomgross Can you confirm this was fixed in the final 5.1.2 release?

tomgross commented 6 years ago

Works OK.

tomgross commented 6 years ago

Unfortunately I tested wrong. The compiled scripts

static/plone-logged-in-compiled.js and static/plone-logged-in-compiled.min.js

of the Products.CMFPlone-5.1.2.1-py2.7.egg still contain the wrong JavaScript. To make it work the plone-logged-in bundle needs to be recompiled.

tomgross commented 6 years ago

There is another issue in this context, which is probably not a blocker but still annoying: The status message is not reloaded on navigation in folder contents.

Steps to reproduce:

  1. Activate plone.app.iterate
  2. Make a nested structure with some folders and documents
  3. Create a working copy on an upper level
  4. Go to the baseline of the working copy -> You will see a banner that this item is locked, which is fine.
  5. Navigate within folder contents -> The banner stays visible, which is annoying.

Here I created a working copy of a-folder and navigated one level down to the child a-page

screen shot 2018-06-19 at 16 22 36
MrTango commented 6 years ago

At least the recompiling TTW does not help :(

MrTango commented 6 years ago

Whats the current status here? We have a new release of CMFPlone out, but the issue still the same :(

gp54321 commented 6 years ago

@MrTango : I don't get it. It was my impression that the fix was already committed in this change and indeed if I recompile bundle as it is as shipped with 5.1.2 it is correct; however your patch seems to apply the change again. Also it does lot of other changes that are unnecessary to fix #2395 so how can it be a matter of recompilation as said in your changelog ???

petschki commented 6 years ago

fixed and merged in #2471 ... hopefully released in 5.1.3(.1) ?

agitator commented 6 years ago

Can someone confirm that this fix actually worked? Just tested it on 5.1 coredev and the actions within the toolbar don't get updated.

Even if I put the loggedin bundle in js dev mode, I got the error from toolbar.js

sunew commented 6 years ago

this problem has many manifestations - see also https://github.com/plone/mockup/pull/858

I am currently recompiling the bundles to include https://github.com/plone/Products.CMFPlone/issues/2512

@agitator I will test after the merge - what is the concrete "error from toolbar.js" you get?

sunew commented 6 years ago

and https://github.com/plone/mockup/issues/857

agitator commented 6 years ago

The error is: TypeError: that.$el.parent.replaceWith is not a function

runyaga commented 5 years ago

This problem is severe. A user can accidentally perform operations on an item unintentionally. e.g. they could enter Folder A, navigation through a buncha folders and end on Folder J, add a piece of content and the content ends up in Folder A instead of the intended context of Folder J. It also appears in 5.1.3-pending

thet commented 5 years ago

Should already be fixed in: https://github.com/plone/Products.CMFPlone/pull/2398 https://github.com/plone/Products.CMFPlone/pull/2399

But for sure in 5.1.5 with: https://github.com/plone/Products.CMFPlone/pull/2563 https://github.com/plone/plonetheme.barceloneta/pull/165

If it's not, it might be a resource caching problem, where @sunew knows more about it and we're investigating it tomorrow.

sunew commented 5 years ago

@agitator @runyaga I can confirm this is fixed on latest 5.1.x