Open davilima6 opened 8 years ago
It looks like for some reason orderedselect_input.js is not being loaded (should it be inside the popover?). But then again I don't see it in Site Setup > Dexterity > Fields > Settings
either.
@davilima6 . Did you find out more? I'm running into the same copyDataForSubmit error on a collective.cover settings form where an overlay should pop up. This is also after upgrading the project to Plone 4.3.9 . Might be related to z3.form updates in Plone.
@fredvd, nothing else so far.
@davilima6 As a work around: you can try to add ++resource++orderedselect_input.js to the portal_javascripts.js so that it is always loaded. This works for our collective.cover similar issue.
The problem seems to indicate that plone.app.jquerytools .prepOverlay copies only part of the XHR loaded popup form and for some reason the part of the ordered_select_input.pt html is never found or loaded by the browser.
The annoying part is that I tried to reason about which change/version update in the stack is responsible for this change in behaviour, but so far not a single package stands out as having fixes or updates in this area. I've pinned back several packages to their Plone 4.3.7 state or before, but nothing so far, except for this workaround.
I have the same issue in the babel_view of plone.app.multilungual.
The problem is that jquery does stript script
tags if you use load
with a selector:
This is from the jquery documentation:
Script Execution
When calling .load() using a URL without a suffixed selector expression, the content is passed to .html() prior to scripts being removed. This executes the script blocks before they are discarded. If .load() is called with a selector expression appended to the URL, however, the scripts are stripped out prior to the DOM being updated, and thus are not executed. An example of both cases can be seen below:
Here, any JavaScript loaded into #a as a part of the document will successfully execute.
- $( "#a" ).load( "article.html" );
However, in the following case, script blocks in the document being loaded into #b are stripped out and not executed:
- $( "#b" ).load( "article.html #target" )
This needs to be integrated somehow.
By subscribe the onLoad method, or prepOverlay loads the orderedselect_input.js too?
@maethu Thank you very much for figuring this out! We've been chasing this issue in collective.cover as well and there are probably other add'ons where this happens. (i.e. any form in Plone with complex widgets loading in a .prepoverlay'ed screen.
It's at least something that could hopefully be added to .prepOverlay from plone.app.jquerytools. I can use a bit of javascript, but cannot develop for it.
Tested in latest release, 1.0.3, with shipped Plone 4.3.9 buildout.
Steps to reproduce:
[parts]
section because of outdated pins.copyDataForSubmit('form-widgets-IFieldExtender-validators');
as used in++resource++plone.app.jquery.js%20line%202%20%3E%20eval:1:1a
:Not sure if related but I also fail when trying to add a custom field in Site Setup > Dexterity Content Types. I do get the popover but after filling the fields and clicking
Add
I always get the same traceback regardless of the chosenField type
:The Site Setup > Dexterity instance of plone.schemaeditor works flawlessly when I use my own (mr.bob-generated) Plone 4.3.9 buildout. Still, Easyform's
Settings
links don't.Does anyone confirm this issue? Is there any fix available?