django-cms refusing to publish a specific page in production - where should I start debugging?
Question: I have a small problem in my production cms. One of the pages (There are about
50) is refusing to be published. I mean: if I click on "publish" in the admin
interface or use the method publish_page I am not getting any errors. On the
page list view there's a green check by this page. But when I browse in there,
I am getting a nice 404 error. And if I refresh the page list view, the green
check turns into a red sign (not published).

I don't know where should I start debugging this issue.

    
    
    >>> from cms.api import publish_page
    >>> p = Page.objects.get(pk__exact=66)
    >>> r = User.objects.get(pk=2)
    >>> p2 = publish_page(p, r)
    >>> p2
    <cms.models.pagemodel.Page object at 0x3561910>
    >>> p2.is_public_published()
    True
    

There are no error traces in my /var/log/httpd/access_log nor
/var/log/httpd/error_log (apart of the 404 warning). These are my logging
settings:

    
    
    LOGGING = {
        'version': 1,
        'disable_existing_loggers': False,
        'formatters': {
            'verbose': {
                'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
            },
            'simple': {
                'format': '%(levelname)s %(message)s'
            },
        },
        'filters': {
            'require_debug_false': {
                '()': 'django.utils.log.RequireDebugFalse'
            }
        },
        'handlers': {
            'mail_admins': {
                'level': 'ERROR',
                'filters': ['require_debug_false'],
                'class': 'django.utils.log.AdminEmailHandler'
            },
            'console': {
                'level': 'DEBUG',
                'class': 'logging.StreamHandler',
                'formatter': 'verbose'
            },
        },
        'loggers': {
            'django': {
                'handlers': ['console'],
                'level': 'DEBUG',
                'propagate': True,
            },
            'django.request': {
                'handlers': ['mail_admins'],
                'level': 'DEBUG',
                'propagate': True,
            },
            'department.models': {
                'handlers': ['console'],
                'level': 'DEBUG'
            },
        }
    }
    

Could you please suggest me where to start debugging? Thanks!

Roberto

UPDATE:

My virtual environment has the following installed:

    
    
    Django          - 1.5.4        - active 
    PIL             - 1.1.7        - active 
    Pillow          - 2.2.1        - active 
    Pygments        - 1.6          - active 
    Python          - 2.7.3        - active development (/usr/lib/python2.7/lib-dynload)
    South           - 0.8.2        - active 
    argparse        - 1.2.1        - active development (/usr/lib/python2.7)
    bpython         - 0.12         - active 
    cmsplugin-news  - 0.4.2        - active 
    django-autoslug - 1.7.1        - active 
    django-ckeditor - 4.0.2        - active 
    django-classy-tags - 0.4          - active 
    django-cms      - 2.4.2        - active 
    django-country-dialcode - 0.4.8        - active 
    django-extensions - 1.2.2        - active 
    django-guardian - 1.1.1        - active 
    django-hvad     - 0.3          - active 
    django-modeltranslation - 0.6.1        - active 
    django-mptt     - 0.5.2        - active 
    django-reusableapps - 0.1.1        - active 
    django-reversion - 1.7.1        - active 
    django-sekizai  - 0.7          - active 
    djangocms-text-ckeditor - 1.0.10       - active 
    html5lib        - 1.0b3        - active 
    pip             - 1.2.1        - active 
    psycopg2        - 2.5.1        - active 
    python-ldap     - 2.4.13       - active 
    python-magic    - 0.4.6        - active 
    pytz            - 2013.7       - active 
    setuptools      - 1.1.6        - active 
    six             - 1.4.1        - active 
    switch2bill-common - 2.8.1        - active 
    wsgiref         - 0.1.2        - active development (/usr/lib/python2.7)
    


Answer: The list-view of pages is Django-CMS is largely powered by ajax requests.

I would take a look at that view using Firebug to see if any of the publishing
functions are returning 500 errors from ajax requests that won't cause the
view itself to throw a 500.

I've had plugins get corrupted which in turn caused publishing to fail. In the
list-view of pages, the pages appear to publish correctly, as checkboxes get
checked, etc, but in Firebug those ajax POST requests were returning 500
errors.

