Fixed where snipperChooser gets it URL from#69
Conversation
Since wagtail 2.11.1 the snippetChooser gets its URL from a data-attribute and longer from chooserUrls in the global scope. This should fix the issue and be backwards compatible.
|
any advancement in this fix? |
|
@murray3k do you have an idea when they will merge your PR? I really need this fix, were you able to resolve it? |
|
@BertrandBordage is there any possibility to add this PR? thank you |
|
For people interested in this for Wagtail 2.11 compatibility, @kedmundson has made a branch including the fix from this PR and committing the project’s static files to git, so the fix can be installable without publishing to pypi. I have just un-archived this project and pushed the branch here so it’s easier to find: https://github.com/wagtail/wagtail-react-streamfield/tree/pr-69-wagtail-2.11-snippetchooser-fix. With pip, you can install this from GitHub’s ZIP archives of branches: I would only recommend this for people still using Wagtail 2.11 and unable to upgrade at this time. Otherwise the I’ll archive this again now – people still using this can discuss further on the Wagtail Slack in |
Since wagtail 2.11.1 the snippetChooser gets its URL from a data-attribute and longer from chooserUrls in the global scope.
This should fix the issue and be backwards compatible, by checking if
snippetChooserexists inwindow.chooserUrlsor else getting it from the data-attribute.