Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

LatestNewsPlugin not work #41

Open
dukelec opened this issue Jan 14, 2015 · 0 comments
Open

LatestNewsPlugin not work #41

dukelec opened this issue Jan 14, 2015 · 0 comments

Comments

@dukelec
Copy link

dukelec commented Jan 14, 2015

During plugin edit phase, server return the 500 error, log:

response_add....... Latest News Entries
escapejs: value:5 class:<class 'aldryn_news.models.LatestNewsPlugin'>
[13/Jan/2015 21:50:30] "POST /en/admin/cms/page/edit-plugin/3/ HTTP/1.1" 500 260963
[13/Jan/2015 21:50:30] "GET /en/admin/cms/page/resolve/?model=cms.page&pk=1 HTTP/1.1" 200 4

Traceback:

Environment:


Request Method: POST
Request URL: http://localhost:8000/en/admin/cms/page/edit-plugin/11/

Django Version: 1.6.9
Python Version: 2.7.6
Installed Applications:
('djangocms_admin_style',
 'djangocms_text_ckeditor',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.sites',
 'django.contrib.sitemaps',
 'django.contrib.staticfiles',
 'django.contrib.messages',
 'cms',
 'mptt',
 'menus',
 'sekizai',
 'djangocms_style',
 'djangocms_column',
 'filer',
 'easy_thumbnails',
 'taggit',
 'aldryn_news',
 'hvad',
 'django_select2',
 'cmsplugin_filer_image',
 'cmsplugin_filer_file',
 'cmsplugin_filer_folder',
 'cmsplugin_filer_link',
 'cmsplugin_filer_teaser',
 'cmsplugin_filer_utils',
 'cmsplugin_filer_video',
 'djangocms_flash',
 'djangocms_googlemap',
 'djangocms_inherit',
 'south',
 'reversion',
 'ingenic_cms')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'django.middleware.doc.XViewMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'cms.middleware.user.CurrentUserMiddleware',
 'cms.middleware.page.CurrentPageMiddleware',
 'cms.middleware.toolbar.ToolbarMiddleware',
 'cms.middleware.language.LanguageCookieMiddleware')


Traceback:
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  112.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  52.         response = view_func(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  198.             return view(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/cms/admin/pageadmin.py" in edit_plugin
  1491.             return super(PageAdmin, self).edit_plugin(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/views/decorators/clickjacking.py" in wrapped_view
  41.         resp = view_func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/cms/admin/placeholderadmin.py" in edit_plugin
  392.             response = plugin_admin.add_view(request)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapper
  29.             return bound_func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/decorators.py" in bound_func
  25.                 return func(self, *args2, **kwargs2)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/db/transaction.py" in inner
  371.                 return func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/contrib/admin/options.py" in add_view
  1167.                 return self.response_add(request, new_object)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/cms/plugin_base.py" in response_add
  238.         return super(CMSPluginBase, self).response_add(request, obj, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/contrib/admin/options.py" in response_add
  963.                 'obj': escapejs(obj)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/functional.py" in wrapper
  203.             return func(*args, **kwargs)
File "/home/duke/Desktop/ingenic_cms/env/lib/python2.7/site-packages/django/utils/html.py" in escapejs
  61.     return mark_safe(force_text(value).translate(_js_escapes))

Exception Type: TypeError at /en/admin/cms/page/edit-plugin/11/
Exception Value: expected a character buffer object

I have fixed this by remove the __unicode__ function in the LatestNewsPlugin class.

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

No branches or pull requests

1 participant