In upgrading from wagtail 2.14 to 2.15 I found that the admin home page wouldn't work after the upgrade, this seems to be the fault of a get_context override in wagtail_hooks on wagtail-personalisation for the page summary counts.
Django template error output:
Reverse for 'wagtailadmin_explore' with arguments '('',)' not found.
1 pattern(s) tried: ['admin\\/pages\\/(?P<parent_page_id>[0-9]+)\\/$']
Django template error output detail:
context_data {}
message
('Summary item '
'<wagtail_personalisation.wagtail_hooks.CorrectedPagesSummaryItem object at '
'0x7fcab9180390> should provide get_context_data(self, parent_context) rather '
'than get_context(self). See '
'https://docs.wagtail.io/en/stable/releases/2.15.html#template-components-2-15')
parent_context
[{'True': True, 'False': False, 'None': None}, {'summary_items': [<wagtail_personalisation.wagtail_hooks.CorrectedPagesSummaryItem object at 0x7fcab9180390>,
...
The commit to my fork below fixes it for 2.15, but I don't know how you guys want to handle this since you'll need a conditional check on which version is installed to determine which method to call, or alternatively have both a get_context method and a get_context_data method somehow, both of which seem kinda sloppy so I didn't go any further toward a PR.
In upgrading from wagtail 2.14 to 2.15 I found that the admin home page wouldn't work after the upgrade, this seems to be the fault of a
get_context
override in wagtail_hooks on wagtail-personalisation for the page summary counts.Django template error output:
Django template error output detail:
The commit to my fork below fixes it for 2.15, but I don't know how you guys want to handle this since you'll need a conditional check on which version is installed to determine which method to call, or alternatively have both a
get_context
method and aget_context_data
method somehow, both of which seem kinda sloppy so I didn't go any further toward a PR.https://github.com/awhileback/wagtail-personalisation/commit/b84b5f9f9e29b8c6efa60b4002af8d8529565a5e