Django==5.1.2
django-wm==4.1.1
wagtail==6.3.2
You previously helped me get django-wm working in Wagtail (see: #45) but I've come across a problem since upgrading to Wagtail 6. I've only noticed it recently as I don't get a lot of traffic, but noticed a recent post didn't have any mentions attached, even though I know it was referenced a few times.
$ python manage.py pending_mentions --settings=core.settings.production
Checking for pending webmentions [all]...
Traceback (most recent call last):
File "/Users/garrettc/sandbox/polytechnic/.venv/lib/python3.11/site-packages/mentions/resolution.py", line 85, in get_model_for_url
model_name = urlpattern_kwargs.pop(contract.URLPATTERNS_MODEL_NAME)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'model_name'
[rest of trace]
File "/Users/garrettc/sandbox/polytechnic/.venv/lib/python3.11/site-packages/wagtail/contrib/routable_page/models.py", line 158, in route
request.routable_resolver_match = resolver_match
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'routable_resolver_match'
I've stepped through with a debugger, and indeed urlpattern_kwargs is empty, but urlpattern_args is populated.
For the URL 'https://polytechnic.co.uk/blog/2024/12/top-albums-and-films-and-other-stats-for-2024/', match inside resolution.py:get_model_for_url() is set to:
ResolverMatch(
func=wagtail.views.serve,
args=('blog/2024/12/top-albums-and-films-and-other-stats-for-2024/',),
kwargs={},
url_name='wagtail_serve',
app_names=[],
namespaces=[],
route='^((?:[\\w\\-]+/)*)$'
)
I haven't changed any of my configuration since #45 apart from the upgrade to Wagtail 6 in November. Any ideas on how to resolve this?
Django==5.1.2
django-wm==4.1.1
wagtail==6.3.2
You previously helped me get django-wm working in Wagtail (see: #45) but I've come across a problem since upgrading to Wagtail 6. I've only noticed it recently as I don't get a lot of traffic, but noticed a recent post didn't have any mentions attached, even though I know it was referenced a few times.
I've stepped through with a debugger, and indeed
urlpattern_kwargsis empty, buturlpattern_argsis populated.For the URL
'https://polytechnic.co.uk/blog/2024/12/top-albums-and-films-and-other-stats-for-2024/',matchinsideresolution.py:get_model_for_url()is set to:I haven't changed any of my configuration since #45 apart from the upgrade to Wagtail 6 in November. Any ideas on how to resolve this?