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

django-cms 4.0.x support - djangocms-link plugin is not compatible #139

Open
Aiky30 opened this issue Oct 10, 2021 · 2 comments
Open

django-cms 4.0.x support - djangocms-link plugin is not compatible #139

Aiky30 opened this issue Oct 10, 2021 · 2 comments

Comments

@Aiky30
Copy link

Aiky30 commented Oct 10, 2021

Error when adding the Link/Button plugin to the page raised here: #126

TODO:
Error when adding the Link/Button plugin too the page

Bildschirmfoto 2021-04-02 um 15 50 53

Error Log:

Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/admin/cms/placeholder/add-plugin/?placeholder_id=3&plugin_type=Bootstrap4LinkPlugin&cms_path=/admin/cms/placeholder/object/5/edit/2/&plugin_language=en&plugin_position=9

Django Version: 2.2
Python Version: 3.8.8
Installed Applications:
['quickstart',
 'djangocms_admin_style',
 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.sites',
 'cms',
 'menus',
 'treebeard',
 'sekizai',
 'filer',
 'easy_thumbnails',
 'djangocms_versioning',
 'djangocms_alias',
 'djangocms_text_ckeditor',
 'djangocms_file',
 'djangocms_icon',
 'djangocms_link',
 'djangocms_url_manager',
 'djangocms_picture',
 'djangocms_style',
 'djangocms_googlemap',
 'djangocms_video',
 'djangocms_bootstrap4',
 'djangocms_bootstrap4.contrib.bootstrap4_alerts',
 'djangocms_bootstrap4.contrib.bootstrap4_badge',
 'djangocms_bootstrap4.contrib.bootstrap4_card',
 'djangocms_bootstrap4.contrib.bootstrap4_carousel',
 'djangocms_bootstrap4.contrib.bootstrap4_collapse',
 'djangocms_bootstrap4.contrib.bootstrap4_content',
 'djangocms_bootstrap4.contrib.bootstrap4_grid',
 'djangocms_bootstrap4.contrib.bootstrap4_jumbotron',
 'djangocms_bootstrap4.contrib.bootstrap4_link',
 'djangocms_bootstrap4.contrib.bootstrap4_listgroup',
 'djangocms_bootstrap4.contrib.bootstrap4_media',
 'djangocms_bootstrap4.contrib.bootstrap4_picture',
 'djangocms_bootstrap4.contrib.bootstrap4_tabs',
 'djangocms_bootstrap4.contrib.bootstrap4_utilities']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'whitenoise.middleware.WhiteNoiseMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware']



Traceback:

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.8/site-packages/django/utils/decorators.py" in _wrapped_view
  142.                     response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  44.         response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/sites.py" in inner
  223.             return view(request, *args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/django/views/decorators/clickjacking.py" in wrapped_view
  33.         resp = view_func(*args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/cms/admin/placeholderadmin.py" in add_plugin
  375.         response = plugin_instance.add_view(request)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/options.py" in add_view
  1634.         return self.changeform_view(request, None, form_url, extra_context)

File "/usr/local/lib/python3.8/site-packages/django/utils/decorators.py" in _wrapper
  45.         return bound_method(*args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/django/utils/decorators.py" in _wrapped_view
  142.                     response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/options.py" in changeform_view
  1522.             return self._changeform_view(request, object_id, form_url, extra_context)

File "/usr/local/lib/python3.8/site-packages/django/contrib/admin/options.py" in _changeform_view
  1575.                 form = ModelForm(initial=initial)

File "/usr/local/lib/python3.8/site-packages/djangocms_link/cms_plugins.py" in __init__
  67.                 self.for_site(site)

File "/usr/local/lib/python3.8/site-packages/djangocms_link/forms.py" in for_site
  21.         self.fields['internal_link'].queryset = Page.objects.drafts().on_site(site)

Exception Type: AttributeError at /admin/cms/placeholder/add-plugin/
Exception Value: 'PageManager' object has no attribute 'drafts'

Originally posted by @crydotsnake in #126 (comment)

@rdawad
Copy link

rdawad commented Nov 3, 2023

while adding djangocms_link does not work with django-cms 4.0.1rc4

@fsbraun
Copy link
Member

fsbraun commented Nov 3, 2023

@rdawad Use djangocms-frontend with django-cms 4.1rc

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

No branches or pull requests

3 participants