-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Fix Folder contents default page marker and upload context. #1039
Conversation
…ove the eventlistener on this scope before re-adding, the others are then also removed.
See plone/mockup#1039 This is after running `nvm use stable` and `yarn` in mockup.
Problem is how to review this. When I use the 3.x branch, put the resource registries in development mode, and click Develop Javascript for the plone-logged-in bundle, it already works. So this is without your changes. Then I reset the resource registry changes, so we are back in production mode. I run steps 1-4 as outlined in the Here is my branch in case you want to try with a fresh Plone Site: BTW, when running When I do the same in branch 3.x, I have no failures:
(In both cases I have to press O, never mind: when I retry on your branch, the tests pass... |
@fredvd @mauritsvanrees I encountered the same problem (wondering why this wasn't an issue until now). I'll take care of this PR! |
@thet I looked at it with Fred. Problem why with his PR it was working for him and not for me, was because the real change is in the plone-editor-tools bundle and not in the plone-logged-in bundle that I built on my plone.staticresources branch. |
@thet But maybe you have a different solution in mind in |
@thet When I 'fixed' the context update problems in the toolbar a few months ago I noticed that the body tag accumulated events when navigating in the folder contents. In several places. Hence I added the But in case of 'context-info-loaded' there are 3 listeners: the toolbar add menu, the title/description updater and setContextInfo for pathbar and default-page. The nasty part: when you 'develop javascript' for plone-editor-tools, the problem seems to go away, also with the current Plone 5.2.3 bundled static resources. But with a compiled bundle `.off('context-info-loaded').on('context-info-loaded') I think the .off() removes one or both of the other 2 listeners. So you can only test the issue and fix by running plone-compile-resources to update the bundle on filesystem or building the bundle ttw and test. :-/ And making sure not any previous version lurks in portal_resources, which could have been the cause of why Maurits didn't see any improvement at first. |
@fredvd your fix here is the right catch! I'm preparing a PR which does actually unset the events before re-setting them, otherwise we might en up having the same event handler running multiple times. |
Superseeded by this PR: #1041 |
Don't remove the eventlistener on this scope before re-adding, the others are then also removed.