django-cms / django-cms

The easy-to-use and developer-friendly enterprise CMS powered by Django
http://www.django-cms.org
BSD 3-Clause "New" or "Revised" License
9.94k stars 3.05k forks source link

Unable to view plugin in history using reversion #130

Closed specialunderwear closed 14 years ago

specialunderwear commented 14 years ago

When using reversion it is not possible to view the plugin. Instead an infinite recursion error gets thrown. This is using the text plugin on django-cms HEAD with reversion HEAD and python 2.6.2

I have tried to copy the settings exctly from the example application. I also have put publisher at the end of the app list such as the docs describe, however that is NOT the way it is in the example application! I tried to debug this issue and found out the following: In the class named Nodelist it tries to iterate over itself, reading values. Sometimes a string was assigned to NodeList so it would iterate over the letters in the string, adding them as separate charaters to the bits array. I have no idea if that is supposed to hapen or not!

Environment:

Request Method: GET Request URL: http://127.0.0.1:8000/admin/cms/page/10/history/50/edit-plugin/24/ Django Version: 1.1 rc 1 SVN-11343 Python Version: 2.6.2 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'django.contrib.admindocs', 'cms', 'publisher', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.file', 'cms.plugins.snippet', 'cms.plugins.googlemap', 'cms.plugins.teaser', 'mptt', 'reversion', 'debug_toolbar', 'vacansoleil.tests'] Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware')

Template error: In template /Users/lkerkhof/Sites/vacansoleil/website/development/python-development/vacansoleil/cms/plugins/picture/templates/cms/plugins/picture.html, error at line 1 Caught an exception while rendering: maximum recursion depth exceeded while calling a Python object 1 : {% if link %} {% endif %}

2 : <img {% if picture.float %}class="{{ picture.float }}" {% endif %}{% if picture.alt %}alt="{{ picture.alt }}" {% endif %}src="{{ picture.image.url }}" />

3 : {% if link %}{% endif %}

4 :

Traceback: File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response

  1. response = callback(request, _callback_args, *_callback_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  2. response = view_func(request, _args, *_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/contrib/admin/sites.py" in inner
  3. return view(request, _args, *_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/utils/functional.py" in _curried
  4. return _curriedfunc((args+moreargs), *_dict(kwargs, **morekwargs)) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django_reversion-1.1.2-py2.6.egg/reversion/revisions.py" in _create_on_success
  5. result = func(_args, *_kwargs) File "/Users/lkerkhof/Sites/vacansoleil/website/development/python-development/vacansoleil/cms/admin/views.py" in edit_plugin
  6. return render_to_response(admin.render_template, admin.render(context, instance, admin.placeholder), context) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/shortcuts/init.py" in render_to_response
  7. return HttpResponse(loader.render_to_string(_args, *_kwargs), **httpresponse_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/template/loader.py" in render_to_string
  8. return t.render(context_instance) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/test/utils.py" in instrumented_test_render
  9. return self.nodelist.render(context) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/template/init.py" in render
  10. bits.append(self.render_node(node, context)) File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/django/template/debug.py" in render_node
  11. raise wrapped

Exception Type: TemplateSyntaxError at /admin/cms/page/10/history/50/edit-plugin/24/ Exception Value: Caught an exception while rendering: maximum recursion depth exceeded while calling a Python object

digi604 commented 14 years ago

is this still the case in newest trunk?

pcicman commented 14 years ago

fixed in my master

digi604 commented 14 years ago

closed