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

Transaction managed block ended with pending COMMIT/ROLLBACK #938

Closed
7aleb opened this Issue Aug 11, 2011 · 6 comments

Comments

Projects
None yet
3 participants
@7aleb

7aleb commented Aug 11, 2011

When moderte is enabled and try to save page edit.

Environment:

Request Method: GET
Request URL: http://test.local/admin/cms/page/3/publish/

Django Version: 1.3
Python Version: 2.7.1
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'html5boilerplate',
'sekizai',
'cms',
'mptt',
'menus',
'south',
'cms.plugins.text',
'cms.plugins.picture',
'cms.plugins.link',
'publisher',
'main']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.media.PlaceholderMediaMiddleware')

Traceback:
File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  2.                 response = view_func(request, _args, *_kwargs)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  3.     response = view_func(request, _args, *_kwargs)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/contrib/admin/sites.py" in inner
  4.         return view(request, _args, *_kwargs)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/db/transaction.py" in inner
  5.             res = func(_args, *_kwargs)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/cms/admin/pageadmin.py" in publish_page
  6.     page.publish()
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/db/transaction.py" in inner
  7.             self.**exit**(None, None, None)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/db/transaction.py" in exit
  8.     self.exiting(exc_value, self.using)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/db/transaction.py" in exiting
  9.     leave_transaction_management(using=using)
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/db/transaction.py" in leave_transaction_management
  10. connection.leave_transaction_management()
    
    File "/Users/mat/.virtualenvs/test.com/lib/python2.7/site-packages/django/db/backends/init.py" in leave_transaction_management
  11.         raise TransactionManagementError("Transaction managed block ended with "
    

Exception Type: TransactionManagementError at /admin/cms/page/3/publish/
Exception Value: Transaction managed block ended with pending COMMIT/ROLLBACK

@neonstalwart

This comment has been minimized.

neonstalwart commented Aug 12, 2011

this is a duplicate of a couple of other issues. so far the only resolution has been to advise everyone to turn off moderation.

@ojii

This comment has been minimized.

Contributor

ojii commented Aug 12, 2011

looks like a duplicate of #760.

What version did you use?

@ojii

This comment has been minimized.

Contributor

ojii commented Aug 14, 2011

closed as duplicate/variation of #760

@ojii ojii closed this Aug 14, 2011

@7aleb

This comment has been minimized.

7aleb commented Aug 15, 2011

Django==1.3
django-cms==2.1.3

is this is the only solution? "this is a duplicate of a couple of other issues. so far the only resolution has been to advise everyone to turn off moderation."

@neonstalwart

This comment has been minimized.

neonstalwart commented Aug 15, 2011

i've also had this same problem and that's the best solution i've been given. i'm not saying i'm happy about it but if you want to avoid that problem then so far that's the best way known to avoid it.

@ojii

This comment has been minimized.

Contributor

ojii commented Aug 15, 2011

@simul14: Your specific issue might be fixed in 2.2

The main reason there's no better solution for this is that we do not currently have a real way to programatically reproduce the issue, which makes it next to impossible for us to write a fix, since we couldn't tell if the fix worked. That's the reason why there is a bounty of 150USD on #760, which is mostly for providing a unittest that reproduces the issue and shows that it's fixed or not fixed.

While this is a bigger issue, the fact that we don't know how to tell if it's fixed or not forces me to not mark it as a blocker, in order to allow the CMS to move forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment