-
Notifications
You must be signed in to change notification settings - Fork 125
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
SS4 Orderablew Rows js error: this.sortable is not a function #246
Comments
Can you please provide the version of gridfieldextensions you're using? |
Im using version 3.1.1 |
I looked into this using version 3.1.1 and closely following the sample provided in https://github.com/symbiote/silverstripe-gridfieldextensions/blob/master/docs/en/index.md#orderable-rows. It works as expected without any jQuery errors arising. I will close this issue for now, but please feel free to open it again @chtombleson with details on how to reproduce it, if it's still an issue for you, thanks. |
Reproduced using:
I've created a userform page with two page breaks and a variety of fields. I've added a radio group field to the second page, and going in to edit that field triggers this error on the Options tab. |
Can't reproduce any more. This seems to be reliant on something in the global state to reproduce |
I'm getting this error too. Also getting a similar error when using Uncaught TypeError: this.getGridField is not a function
at init.onclick (GridFieldExtensions.js?m=1518386927:206)
at one (jquery.entwine-dist.js?m=1523535699:1011)
at HTMLDocument.prxy (jquery.entwine-dist.js?m=1523535699:1504)
at HTMLDocument.dispatch (jquery.js?m=1523535699:3332)
at HTMLDocument.eventHandle (jquery.js?m=1523535699:2941) Also using ss4.1 and gridfield extensions 3.1.1. Happens when clicking the Add button. |
Ran into this issue today. I checked which modules are installed and tried some modifications; Even https://github.com/UndefinedOffset/SortableGridField throws a JS error. It seems like |
For what it’s worth I’ve experienced this in an environment without that module in it |
@wernerkrauss Disabled jonoms module and However it seems Orderable Rows doesnt save to my manymanyExtraFields atm... |
@robbieaverill I'm using the SS4.1.0, UserForm 5.1.1 and GridfieldExtensions 3.1.1, still not working when selecting the 'Add' button in the Options tab for dropdown, checkbox and radio fields. Am i doing something wrong? is there something i've missed? |
@buffy999 you aren't doing anything wrong. Hopefully this will get fixed soon 😄 we had a hard time reproducing it consistently while testing a while ago |
@robbieaverill, Just want to follow up on this one, i know you are busy with other issues. When will this be fixed? :) |
Here's the bug fix: jonom/silverstripe-text-target-length#17 |
@a2nt do you think that this bug only occurs when using that module? |
@robbieaverill well I have a lot of modules installed and the only issue I have found was silvestripe-text-target-length. Also it's clear that SS CMS bundles jquery, jquery.ui (sortable function), entwine into /resources/vendor/silverstripe/admin/client/dist/js/vendor.js and extra module specific js files. So the CMS requires vendor.js with jquery.ui and the other stuff. It's silvestripe-text-target-length specific bug which will break any module that will use jquery.ui or will extend jquery functionality before silvestripe-text-target-length will be loaded
|
I've merged @a2nt's fix in to silverstripe-text-target-length. It sounds like other modules may have the same issue, so if you're experiencing this problem without text-target-length installed maybe try searching for lines like this in your installed modules: Requirements::javascript('silverstripe/admin:thirdparty/jquery/jquery.js');
Requirements::javascript('silverstripe/admin:thirdparty/jquery-entwine/dist/jquery.entwine-dist.js'); |
I don't know what the build/dist process is like for JS in SilverStripe core, but it would be cool if the Requirements API could recognise that a JS file had been bundled and shouldn't be included again if requested subsequently. |
@jonom I think it will be nice to have an option to bundle all modules into one CMS js file using composer script. Just like vendor-expose, but with bundling option |
I've spent a while trying to reproduce this issue using all the combinations given here. Still haven't had any success reproducing it. I'm closing this issue as it seems as though people have had some success disabling or fixing bugs in other modules so it's not apparent the issue is with this module. If this is still happening for you, and a clear cache (Windows: ctrl-f5 or Mac: ⌘-shift-R) does not resolve the issue then please let us know what modules you have installed (copy the output of |
I'm getting this issue on CWP 4.2.1 (on Steps to reproduce:
|
CheckboxSetField and RadioGroup seem to be unaffected. |
This keeps coming up, so I'm going to reopen it. There are some decent steps to reproduce it here, which will hopefully help. |
Can someone please re-test with the latest version of silverstripe/admin? (1.3.3 I think). There was a change made in how SilverStripe handles loading a chain of JavaScript files - previously if one had dodgy content it would stop loading the rest of the files, where it now ignores it and continues through the rest of the chain. |
I got the same error just now on CWP 2.2.0, SS 4.3.0, Userforms 5.3.0, GridfieldExtensions 3.2.1 |
The orderable rows extension is not working.
SilverStripe version: 4.0.3
I get this javascript error:
The text was updated successfully, but these errors were encountered: