wagtail-personalisation icon indicating copy to clipboard operation
wagtail-personalisation copied to clipboard

Incompatibility with Wagtail 2.11.x (definitely 2.11.3)

Open stevejalim opened this issue 4 years ago • 4 comments

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.

stevejalim avatar Dec 17 '20 15:12 stevejalim

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

stevejalim avatar Jan 05 '21 12:01 stevejalim

I've been pointed at https://github.com/wagtail/wagtail-personalisation/pull/212 which should also take care of this

stevejalim avatar Jan 05 '21 12:01 stevejalim

Looks like #212 was merged so this could probably be resolved?

easherma-truth avatar Sep 09 '21 17:09 easherma-truth

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.

nickmoreton avatar Jun 30 '22 13:06 nickmoreton