django-cms / djangocms-frontend

django CMS frontend is a plugin bundle for django CMS providing several components for the frontend, currently implemented with the popular Bootstrap 5 framework.
Other
42 stars 20 forks source link

djangocms-frontend and djangocms-link LinkPlugin conflict #218

Open planrich opened 1 month ago

planrich commented 1 month ago

We run a 3.11 cms installation and I have recently added the djangocms-frontend.

When attaching a PicturePlugin (frontend) to a placeholder, it explodes on the line

https://github.com/django-cms/djangocms-frontend/blob/64bca5e34d5f2ee7c86685839db9672b182b9b16/djangocms_frontend/contrib/link/forms.py#L79

admin_reverse("link_link_autocomplete") cannot be reversed.

It seems that having the djangocms-link plugin installed, which is earlier loaded in the INSTALLED_APPS does not make the condition true located here:

https://github.com/django-cms/djangocms-frontend/blob/64bca5e34d5f2ee7c86685839db9672b182b9b16/djangocms_frontend/contrib/link/cms_plugins.py#L116C1-L119C44

Blocking frontend to add its own LinkPlugin.

Should it be possible to to run the two plugins (djangocms-frontend and djangocms-link) at the same time? Is either one of those deprecated? In which project should it be fixed, or migrated to?

fsbraun commented 1 month ago

@planrich Thanks for pointing this out!

  1. djangocms_link and djangocms_frontend.contrib.link cannot be installed at the same time.
  2. If both appear in INSTALLED_APPS djangocms-frontend is supposed to give the way for djangocms-link.
  3. This, however, should not affect other djangocms-frontend plugins, like the image plugin.

Most people use djangocms-frontend's link plugin instead of djangocms-link. But that's not always practical for existing projects.

A quick fix might be downgrading to djangocms-frontend==1.3.1 (untested).