nephila / djangocms-page-meta

OpenGraph, Twitter Card and Google+ snippet tags for django CMS 3 pages
https://djangocms-page-meta.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
60 stars 64 forks source link

KeyError occurs when CMS toolbar is visible in Django CMS 3.11.8 #214

Open jdgoettsch opened 1 month ago

jdgoettsch commented 1 month ago

Description

PageToolbarMeta.populate uses incorrect permission name to check if a user has change permission on the current page, causing a KeyError to be raised with django-cms >= 3.11.8.

Steps to reproduce

  1. Install djangocms-page-meta with django-cms 3.11.8.
  2. Log into your website and visit any page with the toolbar visible.

Versions

Python 3.10.14 Django 4.2.16 django-cms. 3.11.8

Expected behaviour

Page loads without crashing.

Actual behaviour

KeyError occurs and page crashes.

Additional information

In djangocms_page_meta/cms_toolbars.py on line 39, "change" should instead be "change_page".