wagtail_airtable/wagtail_hooks.py uses deprecated classnames when creating a MenuItem
Closed this issue · 1 comments
maliahavlicek commented
Issue Summary
I am in the process of upgrading a project to wagtail 5.2 and updated all custom menu items in my project from classnames= to classname= but am still seeing the deprecation warning:
RemovedInWagtail60Warning: The `classnames` kwarg for MenuItem is deprecated - use `classname` instead.
Relevant Information
I have wagtail-airtable=0.6.0 installed, and when I put a breakpoint on the warning, I can see it traces back to wagtail-airtable:
I believe if you change Line 29 of wagtail_airtable/wagtail_hooks.py to use classname the deprecation warning will go away.
Technical details
- Python version: 3.11.1.
- Django version: 4.1.13
- Wagtail version: 5.2
- Wagtail Airtable version: 0.6.0
- Browser version: Chrome 119
gasman commented
Thanks for the report @maliahavlicek! Have now opened #64 to address this - the preferred way to set the menu item icon is icon_name="cog"
rather than setting class name directly.