wagtail-personalisation
wagtail-personalisation copied to clipboard
Incompatibility with Wagtail 2.11.x (definitely 2.11.3)
Am just moving a Wagtail project to 2.11.x from 2.10.x and hit this after upgrading:
File "/REDACTED/lib/python3.6/site-packages/wagtail_personalisation/wagtail_hooks.py", line 14, in <module>
from wagtail.admin.views.pages import get_valid_next_url_from_request
ImportError: cannot import name 'get_valid_next_url_from_request'
It looks like that helper function has moved and wagtail-personalisation
hasn't caught up yet (am on 0.14.0
)
See https://github.com/wagtail/wagtail/commit/aa9c9d9517c56fc6af7de2d9c5cfc1016d235b73#diff-08f48b8cf5b22209da61adb3fec00945b9849da17b25c1f78ad92c2c25165513 where get_valid_next_url_from_request
was moved from the module/__init__
level to a .utils
module
Also see https://github.com/wagtail/wagtail-localize/commit/a1b8454c09ee33e9e225ce69793ac051ea575566 as an example of where a similar import issue was fixed.
I've got a local fix i can offer up (that bit was easy), but making the test suite pass is proving a significant task - it's quite out of date, so moving it to include running tests on wagtail 2.11 is taking a bit of time
Anyone have an opinion on what versions of Wagtail and Django should be supported? At the moment am trying to get LTS versions of both + previous release (Wagtail 2.10) passing
I've been pointed at https://github.com/wagtail/wagtail-personalisation/pull/212 which should also take care of this
Looks like #212 was merged so this could probably be resolved?
This is an old issue but I just submitted a PR to get it working up to Wagtail 2.16 #239
I'd appreciate a review of the code please. My plan is to build on that to get Wagtail 3.0 working.