Skip to content
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

Create page wizard on new site works inconsistently #5828

Closed
evildmp opened this issue Dec 28, 2016 · 15 comments · Fixed by #6673

Comments

@evildmp
Copy link
Contributor

commented Dec 28, 2016

When launching a new django CMS project, the content creation wizard under some circumstances:

  • does not work when invoked from the Add the first page link on the splash screen
  • does not work if it opens automatically
  • does work if you use the Create button in the toolbar.

When it fails, it says: "Please choose an option from below to proceed to the next step.".

screenshot 2016-12-27 16 45 49.

I can replicate this on a manually set up project running Django 1.9.12 and django CMS 3.4.1, but not on a project set up using the django CMS installer.

@evildmp

This comment has been minimized.

Copy link
Contributor Author

commented Dec 28, 2016

pip freeze:

Django==1.9.12
django-classy-tags==0.8.0
django-cms==3.4.1
django-filer==1.2.5
django-formtools==1.0
django-mptt==0.8.7
django-polymorphic==0.8.1
django-sekizai==0.10.0
django-treebeard==4.1.0
djangocms-admin-style==1.2.6.2
djangocms-attributes-field==0.1.2
djangocms-column==1.7.0
djangocms-file==2.0.2
djangocms-googlemap==1.0.1
djangocms-link==2.0.3
djangocms-picture==2.0.4
djangocms-snippet==1.9.2
djangocms-style==2.0.1
djangocms-text-ckeditor==3.3.1
djangocms-video==2.0.3
easy-thumbnails==2.3
html5lib==0.9999999
Pillow==3.4.2
six==1.10.0
Unidecode==0.4.19
wheel==0.24.0

settings.py:

"""
Django settings for test_cms_install project.

Generated by 'django-admin startproject' using Django 1.9.12.

For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ysy%!f^wzn*#l1nn+w66_k%4ljkthc+k*u76p%5^1gi*42p=z-'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []

SITE_ID = 1

# Application definition

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',
    'cms',
    'menus',
    'treebeard',

    'sekizai',

    'filer',
    'easy_thumbnails',
    'mptt',

    'djangocms_text_ckeditor',

    'djangocms_link',
    'djangocms_file',
    'djangocms_picture',
    'djangocms_video',
    'djangocms_googlemap',
    'djangocms_snippet',
    'djangocms_style',
    'djangocms_column',


]

MIDDLEWARE_CLASSES = [

    'cms.middleware.utils.ApphookReloadMiddleware',

    'django.middleware.security.SecurityMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    'django.middleware.clickjacking.XFrameOptionsMiddleware',

    'django.middleware.locale.LocaleMiddleware',

    'cms.middleware.user.CurrentUserMiddleware',
    'cms.middleware.page.CurrentPageMiddleware',
    'cms.middleware.toolbar.ToolbarMiddleware',
    'cms.middleware.language.LanguageCookieMiddleware',
]

ROOT_URLCONF = 'test_cms_install.urls'

TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': ['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 = 'test_cms_install.wsgi.application'


# Database
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}


# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators

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',
    },
]


# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/

LANGUAGE_CODE = 'en'

LANGUAGES = [
    ('en', 'English'),
    # ('de', 'German'),
]


TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/

STATIC_URL = '/static/'

CMS_TEMPLATES = [
    ('home.html', 'Home page template'),
]

MEDIA_URL = "/media/"
MEDIA_ROOT = os.path.join(BASE_DIR, "media")

THUMBNAIL_HIGH_RESOLUTION = True

THUMBNAIL_PROCESSORS = (
    'easy_thumbnails.processors.colorspace',
    'easy_thumbnails.processors.autocrop',
    'filer.thumbnail_processors.scale_and_crop_with_subject_location',
    'easy_thumbnails.processors.filters'
)

template home.html:

{% load cms_tags sekizai_tags %}
<html>
    <head>
        <title>{% page_attribute "page_title" %}</title>
        {% render_block "css" %}
    </head>
    <body>
        {% cms_toolbar %}
        {% placeholder "content" %}
        {% render_block "js" %}
    </body>
</html>
@brett-nuske-alliancesoftware

This comment has been minimized.

Copy link

commented Jan 15, 2017

+1 We are also experiencing this same issue.

@derek-adair

This comment has been minimized.

Copy link

commented Feb 4, 2017

For what it's worth I downloaded the divio client and it seems to be working. Maybe this is fixed in 3.4.2?

@czpython

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2017

@evildmp @brett-nuske-alliancesoftware are you able to reproduce this on the latest 3.4.x release? (3.4.2)

@brett-nuske-alliancesoftware

This comment has been minimized.

Copy link

commented Feb 19, 2017

@czpython Yes it is still the case with 3.4.2. As @evildmp said, only when setting up django-cms for an already existing django project without using the installer does the issue present itself.

@designbyjosh

This comment has been minimized.

Copy link

commented Feb 23, 2017

Hey I've been having the same issue, following what @brett-nuske-alliancesoftware says, I compared my settings.py with that of a fresh django cms setup as created by the django cms installer. Looking at the differences between my settings.py and the settings.py created by the installer, it seems to me that adding 'django.core.context_processors.i18n', to context_processors solved this issue for me.

@brett-nuske-alliancesoftware

This comment has been minimized.

Copy link

commented Mar 3, 2017

@josh-atkins-dev That solved the issue for me as well. Thanks!

@jolson6

This comment has been minimized.

Copy link

commented Mar 31, 2017

@josh-atkins-dev This basically worked for me. I just wanted to point out that "django.core.context_processors.i18n" wasn't correct. Rather, "django.template.context_processors.i18n" was.

@artforlife

This comment has been minimized.

Copy link

commented May 18, 2017

@josh-atkins-dev Thanks mate! This solved it for me as well.

SteinRobert added a commit to Blueshoe/django-cms that referenced this issue Feb 18, 2018
=================================================================

 - uses `get_language_from_request()` for `wizard_language` context
   variable now
SteinRobert added a commit to Blueshoe/django-cms that referenced this issue Feb 18, 2018
=================================================================

 - uses `get_language_from_request()` for `wizard_language` context
   variable now
@timjklein36

This comment has been minimized.

Copy link

commented Apr 5, 2018

@josh-atkins-dev That worked for me as well. Also, @jolson6's note about adding django.template.context_processors.i18n was what worked.

For posterity, I am using Django 1.11.12 with django-cms 3.5.1 (python 3.6.3).

@acordiner

This comment has been minimized.

Copy link

commented May 4, 2018

This worked for me too. I was following the "How to install django CMS by hand" guide in docs, which don't mention this. Should this be added to the docs?

@JonasGroeger

This comment has been minimized.

Copy link

commented May 20, 2018

Should this be added to the docs?

Please!

czpython added a commit that referenced this issue Jul 10, 2018
@fbgameresearch

This comment has been minimized.

Copy link

commented Nov 14, 2018

this issue is not in the http://docs.django-cms.org/en/latest/how_to/install.html#installation, it should be

@Necron9x11

This comment has been minimized.

Copy link

commented Mar 30, 2019

I have run into the same issue following the install by hand guide but my issue started when I accidentally deleted the home page. I blew away the database, created a new one, and re-ran the migrations. When I logged back in the create page had only one tile and it was the New Page tile. Both New Person and New Category were missing and clicking on New Page simply produced the "Please choose an option..." message.

Adding django.template.context_processors.i18n brought back the New Page tile. Adding django.core.context_processors.i18n rendered the site inaccessible with a 500 error.

This is Python 3.6.7/Django 2.1.7/CMS 3.6.0 running on Ubuntu 18.04

So I got back partial functionality.

c-oreills added a commit to c-oreills/django-cms that referenced this issue Apr 20, 2019
@c-oreills c-oreills referenced this issue Apr 20, 2019
2 of 5 tasks complete
@Eng-HassanRaza

This comment has been minimized.

Copy link

commented Jun 14, 2019

@jolson6 Thank you. it worked pretty well

FinalAngel added a commit that referenced this issue Aug 7, 2019
* Add missing template context processor to self install docs

Fixes #5828

* Reword self install docs for clarity

* Add to AUTHORS file
FinalAngel added a commit to FinalAngel/django-cms that referenced this issue Aug 7, 2019
* Add missing template context processor to self install docs

Fixes divio#5828

* Reword self install docs for clarity

* Add to AUTHORS file
FinalAngel added a commit to FinalAngel/django-cms that referenced this issue Aug 7, 2019
* Add missing template context processor to self install docs

Fixes divio#5828

* Reword self install docs for clarity

* Add to AUTHORS file
FinalAngel added a commit that referenced this issue Aug 7, 2019
* Adapt test suite for recent Travis changes (#6709)

* test something

* further updates and add 3.7 to test

* updates

* simplify for tests

* add 3.7 support

* Fix content mode related to #6694 (#6696)

* Fix content mode related to #6694

* Add Dmytro Litvinov to AUTHORS according to PR template

* Self install doc tweaks (#6673)

* Add missing template context processor to self install docs

Fixes #5828

* Reword self install docs for clarity

* Add to AUTHORS file
FinalAngel added a commit that referenced this issue Sep 26, 2019
* Add missing parenthesis in code (#6677) (#6690)

* Adding support for Django 2.2 LTS (#6655) (#6691)

* New changes for cms 3.7

* Fix typo

* Fixed issue with force_color

* Removed unused import

* Added docs to index.rst

* Fixed travis jobs

* Fixed force_color command

* Changes after review

* Fixed django version in setup

* Update django-2.2.txt

* Fixes test suite (#6688) (#6692)

* add information for testing

* fix tests

* updated CHANGELOG

* update

* 1.8.5

* fix tests locally

* update text

* Release 3.7.0a1 (internal) (#6693)

* bumped version to 3.7.0a1

* updated staticfiles

* updated translations

* Adapt test suite for recent Travis changes (#6709) (#6710)

* test something

* further updates and add 3.7 to test

* updates

* simplify for tests

* add 3.7 support

* Fix content mode related to #6694 (#6696) (#6711)

* Adapt test suite for recent Travis changes (#6709)

* test something

* further updates and add 3.7 to test

* updates

* simplify for tests

* add 3.7 support

* Fix content mode related to #6694 (#6696)

* Fix content mode related to #6694

* Add Dmytro Litvinov to AUTHORS according to PR template

* Self install doc tweaks (#6673) (#6712)

* Adapt test suite for recent Travis changes (#6709)

* test something

* further updates and add 3.7 to test

* updates

* simplify for tests

* add 3.7 support

* Fix content mode related to #6694 (#6696)

* Fix content mode related to #6694

* Add Dmytro Litvinov to AUTHORS according to PR template

* Self install doc tweaks (#6673)

* Add missing template context processor to self install docs

Fixes #5828

* Reword self install docs for clarity

* Add to AUTHORS file

* Documenation: Add 'prepopulated_fields' to ignored options list on CMSPluginBase (#6667) (#6713)

* Add 'prepopulated_fields' to ignore list

Added `prepopulated_fields` to the list of options that will be ignored when creating a custom DjangoCMS plugin with CMSPluginBase (which is based on ModelAdmin)

* Update AUTHORS

* Release 3.7.0rc1 (#6715)

* update django version in sphinx

* bumped version

* updated existing translations

* update static files

* update docs

* update authors file

*  Override urlconf_module so that Django system checks don't crash. (#6719) (#6723)

* Add a test case for #6717.

* Override urlconf_module so that Django system checks don't crash.

Without this fix, Django system checks in Django 2.2 will try to resolve the
"app_resolver" module, which does not exist. Overriding ``urlconf_module``
prevents the issue.

Fixes #6717

* Release 3.7.0rc2 (#6724)

* regenerated translation files

* bumped version

* update existing translation

* compile static files

* updated release notes

* Updated compatibility table (#6727)

* Release 3.7.0 (#6735)

* Bumped version to 3.7.0

* updated translation files

* added static files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.