python - Django cms - Javascript "undefined" string alert error when trying to publish or unpublish page on page list -


my project brand new installation of django-cms 2.4.1 running mysql.

when try publish or unpublish page through page list interface, pops javascript alert error string "undefined". weird thing action (publish or unpublish) despite of error. won't enable check box when try publish, after reload page shows published , checked. if try unpublish disables checkbox.

just emphasize if try perform actions through editing form works perfectly.

i don't seem find problem in settings.py might causing it.

i inspected ajax request trhough chrome inspector , seems ok!

the response fine follows:

request url: http://127.0.0.1:8000/admin/cms/page/11/change-status/ request method:post status code:200 ok! 

preview tab chrome inspector

please guys, give me hand on it.

this settings.py:

# -*- coding: utf-8 -*- import os gettext = lambda s: s datetime import datetime run_locale import local_run  project_dir = os.path.abspath(os.path.dirname(__file__)) project_name='zecaffe'  production = false teste_server = false debug = true print "running at: "+local_run if local_run == 'producao':     production = true     debug = false elif local_run == 'teste':     teste_server = true  template_debug = debug  if production , teste_server:     raise exception(u"""         django: conflito de configuração. apenas uma entre variáveis production e teste_server         pode ser definida como true.         """     )  admins = (     # ('your name', 'your_email@domain.com'), )  managers = admins  if production:     page_to_email = 'email@example.com.br' elif teste_server:     page_to_email = 'email@example.com.br' else:     page_to_email = 'email@example.com.br'   cms_seo_fields = true cms_redirects = true  if production:     databases = {         'default': {             'engine' : 'django.db.backends.mysql',             'name' : '[database-name]',             'user' : '[database-user]',             'password' : '[databse-pass]',             'host' : 'localhost',             'port' : '',         }     }  elif teste_server:     databases = {         'default': {             'engine' : 'django.db.backends.mysql',             'name' : '[database-name]',             'user' : '[database-user]',             'password' : '[databse-pass]',             'host' : 'localhost',             'port' : '',         }     } else:     databases = {         'default': {             'engine' : 'django.db.backends.mysql',             'name' : '[database-name]',             'user' : '[database-user]',             'password' : '[databse-pass]',             'host' : 'localhost',             'port' : '',         }     }   time_zone = 'america/sao_paulo'  # language code installation. choices can found here: # http://www.i18nguy.com/unicode/language-identifiers.html language_code = 'pt-br'  languages = (     ('pt-br', gettext(u'português brasil')), )  """ cms_languages = {     1: [         {             'code': 'pt-br',             'name': gettext(u'português brasil'),             #'fallbacks': ['de', 'fr'],             'public': true,             'hide_untranslated': false,             'redirect_on_fallback':false,         },     ],      'default': {         'fallbacks': ['pt-br'],         'redirect_on_fallback':true,         'public': false,         'hide_untranslated': false,     } } """  site_id = 1  # if set false, django make optimizations not # load internationalization machinery. use_i18n = true  # if set false, django not format dates, numbers , # calendars according current locale. use_l10n = true  # if set false, django not use timezone-aware datetimes. use_tz = true  if production:     # caminho absoluto dentro servidor     media_root = '/home/[user]/webapps/zecaffe/zecaffe/media/'     static_root = '/home/[user]/webapps/zecaffe/zecaffe/static/'  elif teste_server:     media_root = '/home/[user]/webapps/teste_zecaffe/zecaffe/media/'     static_root = '/home/[user]/webapps/teste_zecaffe/zecaffe/static/'  else:     media_root = os.path.join(project_dir, 'media')     static_root = os.path.join(project_dir, 'static')  media_url = '/media/' static_url = '/static/' admin_media_prefix = '/static/admin/'  # additional locations of static files staticfiles_dirs = (     ('admin', os.path.join(static_root, 'admin')),     ('cms', os.path.join(static_root, 'cms')),     ('ckeditor', os.path.join(static_root, 'ckeditor')),     ('css', os.path.join(static_root, 'css')),     ('img', os.path.join(static_root, 'img')),     ('js', os.path.join(static_root, 'js')),     ('jquery_ui', os.path.join(static_root, 'jquery_ui')),     ('galleria', os.path.join(static_root, 'galleria')),     #('font-face', os.path.join(static_root, 'font-face')), )  # list of finder classes know how find static files in # various locations. staticfiles_finders = (     'django.contrib.staticfiles.finders.filesystemfinder',     'django.contrib.staticfiles.finders.appdirectoriesfinder', #    'django.contrib.staticfiles.finders.defaultstoragefinder', )  # make unique, , don't share anybody. secret_key = '-----------------------------------'  # list of callables know how import templates various sources. template_loaders = (     'django.template.loaders.filesystem.loader',     'django.template.loaders.app_directories.loader', #     'django.template.loaders.eggs.loader', )  middleware_classes = (     'django.middleware.common.commonmiddleware',     'django.contrib.sessions.middleware.sessionmiddleware',     'django.middleware.locale.localemiddleware',     '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',     'zecaffe.middlewares.threadlocals'     #'django_globals.middleware.global', )  template_context_processors = (     'django.contrib.auth.context_processors.auth',     'django.core.context_processors.debug',     'django.core.context_processors.i18n',     'django.core.context_processors.request',     'django.core.context_processors.media',     'django.core.context_processors.static',     'django.core.context_processors.tz',     'cms.context_processors.media',     'sekizai.context_processors.sekizai',      'core.context_processors.crop_settings',     'core.context_processors.paginas',     'core.context_processors.revisao',     'core.context_processors.site_domain',     'core.context_processors.facebook_settings',     'core.context_processors.twitter_settings', )  cms_templates = (     ('index.html', u'template | início'),     #('colunas_inicio.html', u'template | colunas início'),     #('colunas_colunista.html', u'template | colunas colunista'),     ('contato.html', u'template | contato'), )  root_urlconf = '%s.urls' % project_name  template_dirs = (     os.path.join(project_dir, 'templates'), )  #----------------------------ckeditor settings--------------------------------# ckeditor_media_prefix  = "/media/ckeditor/"  if production:     ckeditor_upload_path =  '/home/[user]/webapps/zecaffe/zecaffe/media/ckeditor_imgs/' elif teste_server:     ckeditor_upload_path =  '/home/[user]/webapps/teste_zecaffe/zecaffe/media/ckeditor_imgs/' else:     ckeditor_upload_path =  os.path.join(project_dir, 'media/ckeditor_imgs/')  #ckeditor_upload_prefix = "http://localhost:8000/media/ckeditor_imgs/"  ckeditor_configs = {     'default': {         'toolbar': 'full',         'height': 300,         'width': 1200,         #'skin' : 'v2',     }, } #-----------------------------------------------------------------------------#  # ------------------ myown settings ------------------# debug_exceptions = true if production:     revisao = '55a88aa' else:     revisao = time = int(datetime.now().microsecond)  if production:     site_domain = 'http://zecaffe.com.br/' elif teste_server:     site_domain = 'http://teste.zecaffe.com.br/' else:     site_domain = 'http://localhost:8000/'  if production or teste_server:     facebook_app_id = '-----'     facebook_app_secret = '------'      twitter_consumer_key = '------'     twitter_consumer_secret = '------'  else:     facebook_app_id = ''     facebook_app_secret = ''      twitter_consumer_key = '------'     twitter_consumer_secret = '-------'   crop_settings = {      'noticia':{         'imagem_original' : (640, 480),         'imagem_destaque_g_temp'  : (286, 156),         'imagem_destaque_p_temp' : (200, 220),         'imagem_destaque_w_temp' : (71, 71),     },      'galeria_imagem':{         'imagem_light_box'  : (800, 600),         'imagem_slide' : (700, 350),         'thumb' : (125, 80),     }  } #----------------------------------------------------------#  installed_apps = (     'django.contrib.auth',     'django.contrib.contenttypes',     'django.contrib.sessions',     'django.contrib.sites',     'django.contrib.messages',     'django.contrib.admin',     'django.contrib.staticfiles',     'cms',     'menus',     'mptt',     'south',     'sekizai',     'cms.plugins.text',     'cms.plugins.picture',     'cms.plugins.link',     'cms.plugins.file',     'cms.plugins.flash',     'cms.plugins.teaser',     'cms.plugins.video',     'cms.plugins.twitter',     'cms.plugins.snippet',     'cms.plugins.googlemap',     'ckeditor',     'core',     'noticia',     'social', )  """ cms_placeholder_conf = {     'content': {         'plugins': ['textplugin', 'pictureplugin'],         'text_only_plugins': ['linkplugin'],         'extra_context': {"width":640},         'name':gettext("content"),     },     'right-column': {         "plugins": ['teaserplugin', 'linkplugin'],         "extra_context": {"width":280},         'name':gettext("right column"),         'limits': {             'global': 2,             'teaserplugin': 1,             'linkplugin': 1,         },     },     'base.html content': {         "plugins": ['textplugin', 'pictureplugin', 'teaserplugin']     }, } """  email_host = 'smtp.webfaction.com' email_host_user = '[mailbox]' email_host_password = '[mailbox-pass]' default_from_email = 'email@example.com.br' server_email = 'email@example.com.br' email_port = 587 email_subject_prefix = u'zé caffé'   logging = {     'version': 1,     'disable_existing_loggers': false,     'filters': {         'require_debug_false': {             '()': 'django.utils.log.requiredebugfalse'         }     },     'handlers': {         'mail_admins': {             'level': 'error',             'filters': ['require_debug_false'],             'class': 'django.utils.log.adminemailhandler'         }     },     'loggers': {         'django.request': {             'handlers': ['mail_admins'],             'level': 'error',             'propagate': true,         },     } } 

please guys, give me hand on it.

this settings.py

please guys, give me hand on it.

that happened me once, migrating older version of django-cms? if yes, should check django admin templates, because there crazy conflicts on there if you're using newer django-cms older templates previous versions. make sure replace of older admin static files , templates django/django-cms new ones. can find on env /site-packages/django/contrib/admin/templates, /site-packages/django/contrib/admin/static/admin , /site-packages/cms/static folders.

if you're not migrating , it's fresh installation, that's odd.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -