wagtail-deprecated / wagtail-react-streamfield

Powerful field for inserting multiple blocks with nesting. (NO LONGER MAINTAINED - See Wagtail 2.13 Release Notes)
https://wagtail.github.io/react-streamfield/public/
BSD 3-Clause "New" or "Revised" License
74 stars 23 forks source link

Fixed where snipperChooser gets it URL from #69

Open murray3k opened 3 years ago

murray3k commented 3 years ago

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 snippetChooser exists in window.chooserUrls or else getting it from the data-attribute.

oladhari commented 3 years ago

any advancement in this fix?

oladhari commented 3 years ago

@murray3k do you have an idea when they will merge your PR? I really need this fix, were you able to resolve it?

oladhari commented 3 years ago

@BertrandBordage is there any possibility to add this PR? thank you

thibaudcolas commented 2 years ago

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:

pip install https://github.com/wagtail/wagtail-react-streamfield/archive/pr-69-wagtail-2.11-snippetchooser-fix.zip

I would only recommend this for people still using Wagtail 2.11 and unable to upgrade at this time. Otherwise the wagtail-react-streamfield project is no longer supported as we’ve merged most functionality in Wagtail 2.13.

I’ll archive this again now – people still using this can discuss further on the Wagtail Slack in #react-streamfield.