Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wagtail_airtable/wagtail_hooks.py uses deprecated classnames when creating a MenuItem #57

Closed
maliahavlicek opened this issue Nov 15, 2023 · 1 comment · Fixed by #64
Closed

Comments

@maliahavlicek
Copy link

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:

image

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 added a commit to gasman/wagtail-airtable that referenced this issue Jan 25, 2024
gasman added a commit to gasman/wagtail-airtable that referenced this issue Jan 25, 2024
Fixes wagtail-nest#57 - use icon_name to specify the icon instead.
@gasman
Copy link
Collaborator

gasman commented Jan 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants