djangocms-frontend icon indicating copy to clipboard operation
djangocms-frontend copied to clipboard

djangocms-frontend and djangocms-link LinkPlugin conflict

Open planrich opened this issue 1 year ago • 2 comments

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?

planrich avatar May 22 '24 20:05 planrich

@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).

fsbraun avatar May 22 '24 20:05 fsbraun

Will rename link plugin as of version 2 of djangocms-frontend to help avoid the conflict.

fsbraun avatar Jul 11 '24 07:07 fsbraun