Saving plugin after front-end edit gives browser redirect error
Django 1.9.7, django-cms 3.3.0 and djangocms-text-ckeditor 3.0.0 in a small and simple site on hosted server gives always browser redirect error after front edit edit and save of text plugin. The problem is isolated to the text plugin. The 'messages' cookie is left behind. Removing that cookie removes the browser error and provide access again. Only to repeat the same behavior when edited again. Local development on laptop raises no issues.
Settings:
import os
from django.utils.translation import ugettext_lazy as _
gettext = lambda s: s
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'extremely_secret'
DEBUG = True
ALLOWED_HOSTS = ["*"]
SITE_ID = 2
INSTALLED_APPS = [
'djangocms_admin_style',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'myproject',
'cms',
'djangocms_text_ckeditor',
'treebeard',
'menus',
'snekizai',
]
MIDDLEWARE_CLASSES = [
'cms.middleware.utils.ApphookReloadMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'cms.middleware.user.CurrentUserMiddleware',
'cms.middleware.page.CurrentPageMiddleware',
'cms.middleware.toolbar.ToolbarMiddleware',
'cms.middleware.language.LanguageCookieMiddleware',
]
ROOT_URLCONF = 'myproject.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'sekizai.context_processors.sekizai',
'cms.context_processors.cms_settings',
],
},
},
]
WSGI_APPLICATION = 'myproject.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
LANGUAGE_CODE = 'nl'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
if DEBUG:
MEDIA_URL = '/static/'
STATIC_URL = '/media/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
else:
STATIC_URL = 'http://www.myproject_url.url/static/'
MEDIA_URL = 'http://www.myproject_url.url/media/'
STATIC_ROOT = "_my_project_home_dir/static/"
MEDIA_ROOT = "_my_project_home_dir/media/"
LANGUAGES = [
('nl', _('Dutch')),
('en', _('English')),
]
CMS_TEMPLATES = (
('template1.html', 'Template One'),
('template2.html', 'Template Two'),
)
INTERNAL_IPS = ['127.0.0.1', '::1', 'my_ip',]
urls.py:
urlpatterns = i18n_patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^', include('cms.urls')), ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
@ejah Hi there, Can you post a screenshot/traceback?
Wrote you a PM with details. There is no traceback and the screenshot does not provide any information.
@czpython any updates?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This will now be closed due to inactivity, but feel free to reopen it.