Every repository with this icon (
Every repository with this icon (
| Description: | An Advanced Django Cms edit |
-
I believe we have some circular imports on plugins.
Relevant Traceback:
Traceback (most recent call last): File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/flup/server/fcgi_base.py", line 574, in run protocolStatus, appStatus = self.server.handler(self) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/flup/server/fcgi_base.py", line 1141, in handler result = self.application(environ, start_response) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/core/handlers/base.py", line 73, in get_response response = middleware_method(request) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/middleware/common.py", line 56, in process_request if (not _is_valid_path(request.path_info) and File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/middleware/common.py", line 142, in _is_valid_path urlresolvers.resolve(path) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/core/urlresolvers.py", line 303, in resolve return get_resolver(urlconf).resolve(path) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/core/urlresolvers.py", line 216, in resolve for pattern in self.url_patterns: File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/core/urlresolvers.py", line 245, in _get_url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/core/urlresolvers.py", line 240, in _get_urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/home/******/.virtualenvs/envname/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/******/projects/envname/project_name/urls.py", line 5, in <module> from project_name.xf.patients.sitemaps import PatientSitemap File "/home/******/projects/envname/project_name/xf/patients/sitemaps.py", line 3, in <module> from project_name.xf.patients.models import Patient File "/home/******/projects/envname/project_name/xf/patients/models.py", line 8, in <module> from cms.models import Page, CMSPlugin File "/home/******/.virtualenvs/envname/src/django-cms/cms/models/__init__.py", line 12, in <module> plugin_pool.plugin_pool.discover_plugins() File "/home/******/.virtualenvs/envname/src/django-cms/cms/plugin_pool.py", line 15, in discover_plugins __import__(app, {}, {}, ['cms_plugins']) File "/home/******/projects/envname/project_name/xf/patients/cms_plugins.py", line 6, in <module> from project_name.xf.patients.models import CMSProcedure ImportError: cannot import name CMSProcedureWith no changes to the code this sometimes works and sometimes doesn't.
It appears that when importing CMSPlugin from cms.models in an app's models.py that causes it to automatically call
plugin_pool.plugin_pool.discover_plugins()which in turn causes it to import cms_plugins.py from all the apps, which need to import from the apps models.py.app/models.py -> cms/models/__init__.py -> app/cms_plugins.py -> app/models.py
Comments
-
2 comments Created 9 days ago by nrabinowitz2.1xv.2.0.2 inserts slug for root into menu levels > 2, breaking CMS_APPLICATION_URLSbugxIn version 2.0.2, menus seem to insert the slug for the root page into levels lower than 3:
Home: / Child 1: /child1/ Child 2: /child2/ Grandchild: /home/child2/grandchild/Most CMS pages appear correctly whether they are accessed through /home/page/ or /page/. However, attached applications only work at /page/, not /home/page/ (presumably because the path is parsed incorrectly). Pages with attached applications at level 3 or below, accessed through a menu, do not show the application at all.
Comments
nrabinowitz
Thu Dec 17 22:29:09 -0800 2009
| link
After much digging, the culprit appears to be in cms/utils/init.py, line 207:
page.ancestors_ascending = list(target.ancestors_ascending) + [target]
should be:
page.ancestors_ascending = [target] + list(target.ancestors_ascending)
-
{% show_breadcrumb %} ignores start_level parameter
1 comment Created 9 days ago by nrabinowitz -
1 comment Created 9 days ago by scottsa2.1xshow_breadcrumb template tag ignoring start_level argumentbugxcms/templatetags/cms_tags.py receives start_level as one of its arguments but in no
way does it pay attention to the start_level. There is no reference to
it within the method so not surprisingly when called from a template
the value is completely ignored.By modifying the ancestors value in the context update on line 353 to
the following, it is working for me:context.update({'ancestors': ancestors[start_level:], 'template': template})Comments
-
3 comments Created 11 days ago by yml2.1xbugxTest suite does not work on postgrestestsxMost of the tests are broken on postgres. After investigation the issue is in the test suite rather than in the application.
This issue has been discussed on IRC.
Comments
This branch improve a bit the situation : http://github.com/yml/django-cms-2.0/commit/fca8052fef0997fe9ebccb303614381be8f19086
Here it is the error I am left with : http://pastebin.com/f7414800I seent you a pull request. The test suite run cleanly on postgres :
Ran 29 tests in 84.356s
OKRegards,
--yml -
5 comments Created 17 days ago by QueryClick2.0.1x{% show_sub_menu 1 %} overrides {% page_attribute title %} with child titlebugxSeems to be a genuine bug, tested on two seperate minty fresh installs, one using the example files to verify:
Using {% show_sub_menu 1 %} in the CMS page templates causes one of two uses of {% page_attribute title %} to use a child page title rather than the correct parent title.
Here's a template with this issue:
{% extends 'base.html' %} {% load cache cms_tags %} {% block title %}{% page_attribute title %}{% endblock %} {% block metadescription %}{% placeholder "description" %}{% endblock %}
{% block subnav %} {% show_sub_menu 1 %} {% endblock %}
{% block content %}
{% page_attribute title %}
{% placeholder "content" %} {% endblock %}In the resulting page, the using the first {% page_attribute
title %} is correct, but the second & subsequent {% page_attribute
title %} gives the child title. This reverts to the correct usage if
{% show_sub_menu 1 %} is removed from the template.Comments
QueryClick
Sun Dec 13 02:48:51 -0800 2009
| link
Using easy install on the latest version: digi604-django-cms-2.0-63a124c
i tried with current 2.0.X branch... and I can't reproduce... could you try with this as well?
closed by 2d81e3f show sub menu no longer overwrites current_page
QueryClick
Mon Dec 14 01:49:34 -0800 2009
| link
Working with your new patch. Nice one digi604.
-
1 comment Created 19 days ago by nrabinowitz2.0.1xCMS_APPLICATION_URLS doesn't get page context when application URL has no trailing slashbugxMy application, here called "myapp" is attached to a page at "/section/somepage/". When my application uses a URL like this:
/section/somepage/myapp/topic/1
the page doesn't get the proper context - the menus don't highlight properly, the page title isn't found, etc. But, when I use a URL with a trailing slash:
/section/somepage/myapp/topic/1/
...the context works as expected.
Comments
-
The following is written in the installation instructions: "Be sure to copy the cms/media/cms/ folder into your media directory or make a symbolic link as appropriate."
However, there is no cms/media/cms/ folder if django-cms was installed with easy_install/pip.
Comments
what version did you install? we had some troubles there with the RC
2.0.0.final — with "easy_install django-cms" in a clean virtualenv
FYI, when I installed django-cms 2.0 in my virtualenv through pip, the cms/media/cms folder was at the root of the virtualenv (and not in lib/python2.6/site-packages/cms like the rest of the package)
A bit surprising at least. Not necessarily bad IMHO if it's explained in the docs. Don't know what happen for a standard system install, though...
-
1 comment Created 23 days ago by jasonkeene2.0.1xCMS_URL_OVERWRITE setting not working?bugxI'd like to remove the "Overwrite URL" setting from the advanced section of the page editor. CMS_URL_OVERWRITE doesn't appear to work. If I'm looking at this right, in the PageAdmin class advanced_fields is initialized with the option but there is no condition to turn it off.
cms/admin/pageadmin.py line 50
http://www.django-cms.org/en/documentation/2.0/configuration/#cms-url-overwrite
Comments
-
_show_placeholder_by_id has a argument named "cache"
1 comment Created 23 days ago by dstufft_show_placeholder_by_id has a argument named "cache" which clobbers the import
from django.core.cache import cachecausing using show_placeholder_by_id to fail withCaught an exception while rendering: 'bool' object has no attribute 'get'.Comments
Fixed in my repository at http://github.com/dstufft/django-cms-2.0
-
On django documentation under navigation, show_breadcrumb is shown to be able to receive a template name as first argument. But this is an error as first argument is start_level and second argument is template.
From cms/templatetags/cms_tags.py:303 (v2.0.0)
def show_breadcrumb(context, start_level=0, template="cms/breadcrumb.html"):The doc needs to be updated.
Comments
-
12 comments Created 28 days ago by dstufft2.0.1xCannot import signals (and sometimes get_page_queryset)bugxRandomly it appears my django-cms install would refuse to work and instead throw an unhandle exception. This doesn't happen all the time and the site will be working fine until all of a sudden out of no where it starts throwing exceptions. I cannot figure out what is causing this. I've tried to disable it down to nothing but built in django and cms items and still this error can creep up. Once it starts it doesn't go away until i make a change somewhere in my settings file and then restart django. (Not all changes seem to do it, sometimes commenting out an app, restarting, and the uncommenting it will do it, recently it appears commenting out the cms UserMiddleware seems to be fixing it though.)
This has happened on 2 machines now, one deployed with apache2/mod_wsgi and one deployed on apache2 with fastcgi.
Here are relevant tracebacks.
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 1118, in handler result = self.application(environ, start_response) File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/handlers/base.py", line 73, in get_response response = middleware_method(request) File "/home/****/projects/cosmetic-md/lib/python2.6/django/middleware/common.py", line 56, in process_request if (not _is_valid_path(request.path_info) and File "/home/****/projects/cosmetic-md/lib/python2.6/django/middleware/common.py", line 142, in _is_valid_path urlresolvers.resolve(path) File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 303, in resolve return get_resolver(urlconf).resolve(path) File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 216, in resolve for pattern in self.url_patterns: File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 245, in _get_url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 240, in _get_urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/home/****/projects/cosmetic-md/lib/python2.6/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/****/projects/cosmetic-md/cosmetic_md/urls.py", line 4, in <module> from cms.sitemaps import CMSSitemap File "/home/****/projects/cosmetic-md/lib/python2.6/cms/sitemaps/__init__.py", line 1, in <module> from cms_sitemap import * File "/home/****/projects/cosmetic-md/lib/python2.6/cms/sitemaps/cms_sitemap.py", line 3, in <module> from cms.models import Page File "/home/****/projects/cosmetic-md/lib/python2.6/cms/models/__init__.py", line 8, in <module> from cms import signals File "/home/****/projects/cosmetic-md/lib/python2.6/cms/signals.py", line 4, in <module> from cms.models import signals as cms_signals, Page, Title ImportError: cannot import name signalsand
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 1118, in handler result = self.application(environ, start_response) File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/home/****/projects/cosmetic-md/lib/python2.6/django/core/handlers/base.py", line 73, in get_response response = middleware_method(request) File "/home/****/projects/cosmetic-md/lib/python2.6/cms/middleware/user.py", line 9, in process_request from cms.utils.permissions import set_current_user File "/home/****/projects/cosmetic-md/lib/python2.6/cms/utils/permissions.py", line 5, in <module> from cms.models import Page, PagePermission, GlobalPagePermission File "/home/****/projects/cosmetic-md/lib/python2.6/cms/models/__init__.py", line 8, in <module> from cms import signals File "/home/****/projects/cosmetic-md/lib/python2.6/cms/signals.py", line 4, in <module> from cms.models import signals as cms_signals, Page, Title ImportError: cannot import name signalsComments
Just got another Unhandled Exception, different this time
Traceback (most recent call last): File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 558, in run protocolStatus, appStatus = self.server.handler(self) File "build/bdist.linux-x86_64/egg/flup/server/fcgi_base.py", line 1118, in handler result = self.application(environ, start_response) File "/home/********/projects/cosmetic-md/lib/python2.6/django/core/handlers/wsgi.py", line 241, in __call__ response = self.get_response(request) File "/home/********/projects/cosmetic-md/lib/python2.6/django/core/handlers/base.py", line 73, in get_response response = middleware_method(request) File "/home/********/projects/cosmetic-md/lib/python2.6/django/middleware/common.py", line 56, in process_request if (not _is_valid_path(request.path_info) and File "/home/********/projects/cosmetic-md/lib/python2.6/django/middleware/common.py", line 142, in _is_valid_path urlresolvers.resolve(path) File "/home/********/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 303, in resolve return get_resolver(urlconf).resolve(path) File "/home/********/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 216, in resolve for pattern in self.url_patterns: File "/home/********/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 245, in _get_url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/********/projects/cosmetic-md/lib/python2.6/django/core/urlresolvers.py", line 240, in _get_urlconf_module self._urlconf_module = import_module(self.urlconf_name) File "/home/********/projects/cosmetic-md/lib/python2.6/django/utils/importlib.py", line 35, in import_module __import__(name) File "/home/********/projects/cosmetic-md/cosmetic_md/urls.py", line 4, in <module> from cms.sitemaps import CMSSitemap File "/home/********/projects/cosmetic-md/lib/python2.6/cms/sitemaps/__init__.py", line 1, in <module> from cms_sitemap import * File "/home/********/projects/cosmetic-md/lib/python2.6/cms/sitemaps/cms_sitemap.py", line 2, in <module> from cms.utils.moderator import get_page_queryset File "/home/********/projects/cosmetic-md/lib/python2.6/cms/utils/moderator.py", line 4, in <module> from cms.models import Page, PageModeratorState, PageModerator, CMSPlugin, Title,\\ File "/home/********/projects/cosmetic-md/lib/python2.6/cms/models/__init__.py", line 8, in <module> from cms import signals File "/home/********/projects/cosmetic-md/lib/python2.6/cms/signals.py", line 3, in <module> from cms import appresolver File "/home/********/projects/cosmetic-md/lib/python2.6/cms/appresolver.py", line 3, in <module> from cms.utils.moderator import get_page_queryset ImportError: cannot import name get_page_querysetCan confirm this bug -- has been happening on my installation for a while. Just randomly. Restarting the server fixes it. Example:
[Thu Oct 22 21:15:40 2009] [error] [client 127.0.0.1] File "/home/.../cms/signals.py", line 3, in <module> [Thu Oct 22 21:15:40 2009] [error] [client 127.0.0.1] from cms.models import signals as cms_signals, Page, Title [Thu Oct 22 21:15:40 2009] [error] [client 127.0.0.1] ImportError: cannot import name signalsI tried it on trunk, the 2.0.X branch, and the zip that you can download from django-cms.org for 2.0.0
I'm on master:
commit <a href="/digi604/django-cms-2.0/commit/3b32886c8d3cb815df3793b3937b2e91d0fb00f1">3b32886</a> Author: Patrick Lauber <patrick.lauber@divio.ch> Date: Thu Nov 12 16:36:51 2009 +0100 bumped version to 2.0.0.final yeeepeeee :)It seemed to start in late October. It is very hard to debug because it only occurs rarely for me.
on the one server (using apache2/fcgi) i was getting the error quite frequently, and it would take a lot of screwing around to get it to stop.
Mine is on a site which is not yet released to the public, so has fairly low traffic at the moment. I'll see if I can pinpoint what leads to its death...
Mine isn't a public site either. It's a remake of a public site on a private subdomain. Just me in the admin panel copying/pasting content from the old site to the new site.
It does not appear to be consistent -- I just managed to trigger it by moving a page, but then went back and did the same thing again and it did not recur.
Those tracebacks look an awful lot like circular imports...
I started looking at the import statements more, could this have anything to do with it.
from cms.models import signals as cms_signals, Page, Titlefrom moderatormodels import * from pagemodel import * from permissionmodels import * from pluginmodel import * from titlemodels import * from cms import signals #Notice This Linethere is also cms/models/signals.py
If cms/signals.py is trying to import signals from cms/models/__init__.py then it is importing itself. It appears as if cms/signals.py is trying to import Page and Title from cms/models/__init__.py which i think is what you want, but then cms/signals.py wants cms/models/signals.py and not itself.
http://github.com/dstufft/django-cms-2.0 has a possible fix in cms/models/__init__.py that repo has 2 changes one to __unicode__ of Page and then the possible fix to this. I'm not 100% sure that the fix is right though, so far I am using it and havn't gotten this error again, and havn't noticed anything else wrong.
-
4 comments Created 29 days ago by claudep2.0.1xHardcoded links to admin media in cssbugxIn /media/cms/css/change_form.css the path to 2 images is hardcoded to "/media/admin" : background:white url(/media/admin/img/admin/nav-bg.gif)
background: #7CA0C7 url(/media/admin/img/admin/default-bg.gif)
This leads to a 404 error when the ADMIN_MEDIA_PREFIX is different than /media/admin.Comments
Well, when you know that the css is in the same media context than images, you can simply use a relative link (e.g. ../img/admin/nav-bg.gif), that's how does django.contrib.admin.
But in your case, it's not a solution, because you don't know the relative path between cms media and django admin media. IMHO, if it concerns only two basic images, the simplest way would be to copy the images in the cms/admin/images folder and to use relative path (btw nav-bg.gif is already copied). I know this does not respect the DRY principle, but i find this acceptable.i think we move the CSS declaration of the images into the template
-
1 comment Created about 1 month ago by ulope2.0.1xCMSPluginBase.render() misses "instance" argumentbugxThe default implementation of render() in CMSPluginBase has the signature
def render(self, context, placeholder):while it should have:
def render(self, context, instance, placeholder):This prevents the explainatory NotImplementedError from being raised, instead a (for beginners I assume confusing) TypeError is shown.
Comments
-
If a user doesn't have "can add" ticked in Pages global permissions, then they won't be able to see pages either.
Comments
-
6 comments Created about 1 month ago by heiho12.0.1xMoving a large page tree can lead to a Move ErrorbugxWe have a CMS with a fairly deep navigation tree. We have been seeing some discrepancies in moving pages in the admin change list. One major problem is reproducible as follows:
1) Page A is at the root level, is published and in the nav
2) Page B is beneath Page A and has a complex child tree at least 3 sub-pages deep
3) Page B is moved using the cursor in the admin change list to the root of the nav
4) If I try to then move Page B back beneath Page A, I receive the following 500 response:
""" ... File "/Users/mdizon/Sites/specialtyfoods/sf-env/lib/python2.5/site-packages/mptt/managers.py", line 686, in move_root_node
raise InvalidMove(('A node may not be made a child of any of its descendants.'))
"""Comments
Here is an example of page mptt data pre and post move:
table:cms_page
pre move-> level=1 lft=2 rght=84 tree_id=2
after move -> level=0 lft=1 rght=83 tree_id=2
can you confirm the following:
b is moved to root
ajax post has NOT returned yet
b is moved to a
errorSorry for the late reply. When I ran the test, I actually waited for the ajax call to complete on b moving to root before moving b back to a. I will have more time to test this later in the week.
A little more detail on this problem. We have a developer taking a look and it seems like some syncdbs were run on the database that were writing old data. If we can confirm, I will close out this ticket.
We repaired our schema and it looks like this problems has been resolved.
-
4 comments Created about 1 month ago by hvdklauwcms/migrations/0005_mptt_added_to_plugins.py add default value to tree_id fieldunsurexIt's not allowed to be NULL and it doesn't have a default value.
So say I have an existing database, then adding the column obviously fails, because it's not allowed to be NULL and it doesn't have a value.
Comments
Can't say I agree.
The file is different and thus this is the same mistake made twice.
You can't add a column to an existing table without defining a default value or allowing it to be null.
If you really want that you should change the migration to add the column with null=True, then fill all the rows with a valid value and then alter the column to null=False.
I did use the workaround, but I do hope this doesn't happen anymore because it goes against the whole principle of south and migrations: Let the hassle of how to migrate data be the responsibility of the person actually changing something. (the programmer)
-
Sequence of events: had a page requiring approval, clicked Unbind moderation for descendants on its parent, tried to edit the page
Comments
added the exception for later reference:
Environment:
Request Method: GET
Request URL: http://v026.medcn.uwcm.ac.uk:8000/admin/cms/page/4/
Django Version: 1.1.1
Python Version: 2.6.2
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'django.contrib.admindocs.urls', 'cms', 'publisher', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.snippet', 'cms.plugins.googlemap', 'cms.plugins.teaser', 'cms.plugins.video', 'cms.plugins.twitter', 'mptt', 'reversion', 'south', 'image_filer', 'sorl.thumbnail', 'typogrify', 'django.contrib.humanize', 'semanticeditor', 'contacts_and_people', 'news_and_events', 'vacancies_and_studentships', 'links', 'arkestra_utilities.admin_tabs_extension', 'hr_bo_compel', 'publications', 'symplectic', 'research_grant_applications'] Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware')Traceback:
File "/home/django/modules/django/core/handlers/base.py" in get_response
92. response = callback(request, callback_args, **callback_kwargs) File "/home/django/modules/django/contrib/admin/options.py" in wrapper
226. return self.admin_site.admin_view(view)(args, kwargs) File "/home/django/modules/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, kwargs) File "/home/django/modules/django/contrib/admin/sites.py" in inner
186. return view(request, args, **kwargs) File "/home/django/modules/cms/admin/pageadmin.py" in change_view
521. response = super(PageAdmin, self).change_view(request, object_id, extra_context) File "/home/django/modules/django/db/transaction.py" in _commit_on_success
240. res = func(args, **kw) File "/home/django/modules/reversion/revisions.py" in _create_on_success
321. self.end() File "/home/django/modules/reversion/revisions.py" in end
258. self.assert_active() File "/home/django/modules/reversion/revisions.py" in assert_active
165. raise RevisionManagementError, "There is no active revision for this thread."Exception Type: RevisionManagementError at /admin/cms/page/4/
Exception Value: There is no active revision for this thread.
have the same bug with example application
some bug info:
Environment:Request Method: GET
Request URL: http://localhost:8000/admin/cms/page/add/
Django Version: 1.1
Python Version: 2.6.2
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'cms', 'publisher', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.snippet', 'cms.plugins.googlemap', 'cms.plugins.teaser', 'cms.plugins.video', 'cms.plugins.twitter', 'mptt', 'reversion', 'example.categories', 'example.sampleapp'] Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware')Traceback:
File "/usr/local/lib/python2.6/site-packages/Django-1.1-py2.6.egg/django/core/handlers/base.py" in get_response
92. response = callback(request, callback_args, **callback_kwargs) File "/usr/local/lib/python2.6/site-packages/Django-1.1-py2.6.egg/django/contrib/admin/options.py" in wrapper
226. return self.admin_site.admin_view(view)(args, kwargs) File "/usr/local/lib/python2.6/site-packages/Django-1.1-py2.6.egg/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, kwargs) File "/usr/local/lib/python2.6/site-packages/Django-1.1-py2.6.egg/django/contrib/admin/sites.py" in inner
186. return view(request, args, **kwargs) File "/home/smal/Projects/Django/django-cms-2.0/cms/admin/pageadmin.py" in add_view
481. return super(PageAdmin, self).add_view(request, form_url, extra_context) File "/usr/local/lib/python2.6/site-packages/Django-1.1-py2.6.egg/django/db/transaction.py" in _commit_on_success
240. res = func(args, **kw) File "/usr/local/lib/python2.6/site-packages/reversion/revisions.py" in _create_on_success
321. self.end() File "/usr/local/lib/python2.6/site-packages/reversion/revisions.py" in end
258. self.assert_active() File "/usr/local/lib/python2.6/site-packages/reversion/revisions.py" in assert_active
165. raise RevisionManagementError, "There is no active revision for this thread."Exception Type: RevisionManagementError at /admin/cms/page/add/
Exception Value: There is no active revision for this thread.
additional system info
Linux travezio 2.6.31.5-0.1-default #1 SMP 2009-10-26 15:49:03 +0100 i686 i686 i386 GNU/Linuxpython 2.6.2
DB - PostgreSQL 8.4.1
using latest stable versions of django-cms2 and reversion 1.2I think something wrong when doing transactions
and this bug has gone and I can't reproduce it when I restart django development server.
maybe something wrong with django threads or something other?now I can't reproduce too, but that bug was in system.Main question - in what conditions it appears. If I have more details or this bug appears again I'll write.
specialunderwear
Tue Nov 24 14:51:30 -0800 2009
| link
I found this bug lots and lots of times. eventually i had to comment out the line that sets the revisions to -10000 in publisher models.py. What exactly is this line for? i understand it has something to do with adding history for published items, but since you never visit the published page in the cms unless you manually alter the url, it is not much overhead when compared to millions of error messages.
Any time a revision is sealed and end is called this bug can show up if the reversion _state.depth is still at -10000 or something lower then 1. It can even show up when just viewing a page because the commit on succes is called also when a get request is sent to change_view. the error on the get request will often pop up after the error first occurred on a save. I could not in any way determine the difference between a flawed page, (that showed the error) and a working page. I had one page that would always produce the error but even when inspecting the database i couldn't find any clue to the cause.
I suggest finding some other way to make the version not recorded, because setting _state.depth to -10000 is very very brittle and prone to breakage.
if this fixes the error i will comment it out... I hope no other bugs are introduced with that.
-
3 comments Created about 1 month ago by jtinskyAdded Teaser not displaying in AdminunsurexI've added the "Teaser" plugin and then added added a teaser to a page. The page displays the teaser content but the teaser content does not display in the Admin. Subsequently added teasers do display in the admin and the first added teaser continues to display on the page.
Since no error was thrown I don't have any exception message to offer.
Any ideas?
Thanks,
Jim
Comments
-
Slug of Index Page not stripped when calling get_absolute_url on a page 3+ levels deep
1 comment Created about 1 month ago by dstufftWhen CMS_FLAT_URLS = False, and there is a page that is More then 2 levels deep (i.e. Home -> Category -> ContentPage) calling get_absolute_url on ContentPage doesn't properly strip out the slug of the Home page. So get_absolute_url will return /home/category/content-page instead of /category/content-page.
I have this fixed in a fork at http://github.com/dstufft/django-cms-2.0. The fix is the only change to the source code that i have in that fork. Please feel free to pull the change into your own repository.
Comments
-
1 comment Created about 1 month ago by m0002.0.1xbugxdocumentation error: SessionMiddleware is requireddocsxHello,
The installation instructions for django-cms-2.0 (http://www.django-cms.org/en/documentation/2.0/installation/) mention:MIDDLEWARE_CLASSES = (
# needed for add/edit page 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ...This leads to an AssertionError: The Django authentication middleware requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.contrib.sessions.middleware.SessionMiddleware'.
So, the instructions should be corrected to:
MIDDLEWARE_CLASSES = (
# needed for add/edit page 'django.middleware.locale.LocaleMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ...Comments
-
1 comment Created about 1 month ago by trent2.0.1xPage Redirect Does Not Allow for Offsite LinksbugxIf I populate the redirect property on a page that links offsite (e.g., https://www.google.com), the redirect does not function b/c the view prepends the language to the URL. It would be beneficial if the view inspected the redirect string value for a /, and only prepended the language if the / exists. If it doesn't, then the redirect would just go to whatever value exists.
Comments
-
sqlite3.IntegrityError: south_migrationhistory.id may not be NULL
2 comments Created about 1 month ago by brierwoodI'm a bit new to using South, so please forgive me if this is a stupid question and/or not a bug at all...
I'm just trying to run a simple migration that adds a couple of columns, and I get this strange error; but really no clue what is causing it. It is running the migration fine because the columns are getting created, but then this error occurs at the end and the migration is not recorded in the south migrations table.
Potentially pertinent information --- the database was imported into sqlite3 from mysql for localhost development; however, everything seems fine; everything works, and the existing south migrations table also looks valid.
Anything I should be looking for?
- reid
Comments
-
2 comments Created about 1 month ago by fivethreeoRaw id fields does not work in pluginsbugxExample for this issue:
class ProfiledCourse(models.Model): custom_text = models.TextField(blank=True) course = models.ForeignKey(Course) class ProfiledCourseInline(CMSPluginBase): model = ProfiledCourse raw_id_fields = ('course',)Clicking on the link directs the popup to a relative url, so you end up at admin/cms/page/courses/course/ instead of admin/courses/course/
Comments
-
5 comments Created about 1 month ago by bzedSometimes reverting pages fails with "CMSPlugin matching query does not exist."bugxSometimes reverting pages fails with "CMSPlugin matching query does not exist.", unfortunately I'm not able (yet) to provide an easy way to reproduce this. Saving pages and reverting random page states triggers the bug at some point....
Environment: Request Method: POST Request URL: https://hostname:port/admin/cms/page/117/history/3029/?language=de& Django Version: 1.1.1 Python Version: 2.5.2 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sitemaps', 'django.contrib.markup', 'django.contrib.sites', 'django.contrib.admindocs.urls', 'cms', 'publisher', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.googlemap', 'cms.plugins.link', 'cms.plugins.picture', 'cms.plugins.snippet', 'cms.plugins.teaser', 'cms.plugins.text', 'cms.plugins.twitter', 'cms.plugins.video', 'mptt', 'reversion', 'debug_toolbar', 'filebrowser', 'cmsplugin_news', 'credativ.cmsplugin_contactform', 'formfieldset', 'honeypot', 'haystack'] Installed Middleware: ('django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.gzip.GZipMiddleware', 'honeypot.middleware.HoneypotMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.http.ConditionalGetMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware') Traceback: File "/srv/website/de/prod/pylib/django/core/handlers/base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "/srv/website/de/prod/pylib/django/views/decorators/cache.py" in _wrapped_view_func 44. response = view_func(request, *args, **kwargs) File "/srv/website/de/prod/pylib/django/contrib/admin/sites.py" in inner 186. return view(request, *args, **kwargs) File "/srv/website/de/prod/pylib/cms/admin/pageadmin.py" in revision_view 659. return super(PageAdmin, self).revision_view(request, object_id, version_id, extra_context) File "/srv/website/de/prod/pylib/django/db/transaction.py" in _commit_on_success 240. res = func(*args, **kw) File "/srv/website/de/prod/pylib/reversion/revisions.py" in _create_on_success 304. result = func(*args, **kwargs) File "/srv/website/de/prod/pylib/reversion/admin.py" in revision_view 283. return self.render_revision_form(request, obj, version, context, revert=True) File "/srv/website/de/prod/pylib/cms/admin/pageadmin.py" in render_revision_form 690. revert_plugins(request, version.pk, obj) File "/srv/website/de/prod/pylib/cms/admin/views.py" in revert_plugins 287. plugin.save() File "/srv/website/de/prod/pylib/cms/models/pluginmodel.py" in save 137. super(CMSPlugin, self).save() File "/srv/website/de/prod/pylib/django/db/models/base.py" in save 410. self.save_base(force_insert=force_insert, force_update=force_update) File "/srv/website/de/prod/pylib/publisher/models.py" in save_base 59. ret = super(Publisher, self).save_base(*args, **kwargs) File "/srv/website/de/prod/pylib/django/db/models/base.py" in save_base 432. signals.pre_save.send(sender=origin, instance=self, raw=raw) File "/srv/website/de/prod/pylib/django/dispatch/dispatcher.py" in send 166. response = receiver(signal=self, sender=sender, **named) File "/srv/website/de/prod/pylib/mptt/signals.py" in pre_save 91. parent = getattr(instance, opts.parent_attr) File "/srv/website/de/prod/pylib/django/db/models/fields/related.py" in __get__ 257. rel_obj = QuerySet(self.field.rel.to).get(**params) File "/srv/website/de/prod/pylib/django/db/models/query.py" in get 305. % self.model._meta.object_name) Exception Type: DoesNotExist at /admin/cms/page/117/history/3029/ Exception Value: CMSPlugin matching query does not exist.Comments
seams to be an mptt problem. Does this happen with only with TextPlugins?
can't reproduce. I need a detailed description of this problem
-
3 comments Created about 1 month ago by spookylukey2.0.1xbugxInstallation guide doesn't indicate source/versions of dependenciesdocsxThe guide says: "Make sure that cms, mptt and publisher folders are on your pythonpath."
But there is no clue where to get mptt or publisher from, or what required versions of these packages is.
There is also no indication of what Django version or Python version it works with.
Comments
-
1 comment Created about 1 month ago by kresho2.0.1xbugxInstallation guide - missing dependency to django sitesdocsxImprovement to the installation guide:
In INSTALLED_APPS add that django-cms depends on django sites:INSTALLED_APPS = ( ... # dependencies "django.contrib.sites", ... 'cms', )It took me some time to figure this out :-)
Comments
-
1 comment Created about 1 month ago by digi6042.0.1xtemplates for example in pypi dist are missingbugx -
2 comments Created about 1 month ago by rfugger2.0.1xReorder pages with cut action doesn't refresh properlybugxIn the page list admin view, when I "cut" one page (Home) and click the up or down arrow on another (About), the first page (Home) ends up listed twice, and the second (About) is gone. If I refresh the page list view, it displays correctly.
Comments
-
7 comments Created about 1 month ago by rfugger2.0.1xValueError when clicking on "recover deleted pages"bugxValueError at /admin/cms/page/recover/
invalid literal for int() with base 10: 'recover'
URLs not configured to handle "recover"?
Comments
how are the admin urls configured in your main urls.py?
from django.contrib import admin
admin.autodiscover()urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)), (r'^', include('cms.urls')),)
No django-reversion. The installation docs indicate it is optional.
so you see the "recover deleted pages" button but you don't have django-reversion installed?
-
First page created gets published at root url and added to navigation
5 comments Created about 1 month ago by rfuggerWhat if the first page you create isn't "home", but "about" or some other page? What if you don't want it in navigation? Where is this behaviour documented?
Comments
Sorry, not "added to navigation", but placed in breadcrumbs as root. I guess you just have to create "Home" first, huh?
OK, I figured out how to reorder pages. I guess this ticket is a request to document somewhere for newbies that the first page in the list magically gets to live at the root url and is root of all breadcrumbs. Thanks.
-
3 comments Created about 1 month ago by rfugger2.0.1x"View on site" preview does not work for unpublished pagesbugxIt would be handy to be able to preview before publishing, no? Or am I missing something?
Comments
preview actually should be working...
did you want to preview before the first save?
was the page the first one?
did the page had some parents that didn't had the current language translated?Yes, it was the first page, but it had definitely been saved. No parents. I can verify it is working for other pages, just not the first, until it is published.
-
2 comments Created about 1 month ago by yvandermeerStart and end date for page publication do not workbugxSomehow, the logic in PageQuerySet.published() is wrong – someone got lt and gt mixed up I think.
Should be:
if settings.CMS_SHOW_START_DATE: pub = pub.filter( Q(publication_date__lt=datetime.now()) | Q(publication_date__isnull=True) ) if settings.CMS_SHOW_END_DATE: pub = pub.filter( Q(publication_end_date__gte=datetime.now()) | Q(publication_end_date__isnull=True) )Comments
closed by 5552b51 lt and gt in timed publication mixed up
yvandermeer
Thu Nov 12 11:36:34 -0800 2009
| link
Thanks for fixing this so quickly! Keep up the great work.
-
1 comment Created about 1 month ago by ulope2.1xFrontedit: Fetching plugin config from CMS_PLACEHOLDER_CONF fails for pages with template INHERITbugxWhen using the new "<template> <placeholder>" syntax in CMS_PLACEHOLDER_CONF the configuration is not correctly read on pages that have their template set to INHERIT.
The problem lies with the use of page.template instead of page.get_template().
I've fixed all occurences here: ulope@678ae6b
Comments
-
2 comments Created about 1 month ago by tiagopitabugxDelete Plugin doesn't answer!unsurex -
When I try to save a page, I get a template syntax error. Here is the stack trace:
Environment:
Request Method: GET
Request URL: http://localhost:8000/admin/cms/page/5/
Django Version: 1.1.1
Python Version: 2.6.1
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'cms', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.link', 'cms.plugins.file', 'cms.plugins.snippet', 'cms.plugins.googlemap', 'mptt', 'publisher'] Installed Middleware:
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware')Template error:
In template /Library/Python/2.6/site-packages/django_cms-2.0.0.RC2-
py2.6.egg/cms/templates/admin/cms/page/change_form.html, error at line
240
Caught an exception while rendering: admin/page_submit_line.html 230 : {% endif %}231 :
232 : {% block after_related_objects %}{% endblock %}
233 :
234 : {% if add %}
235 :
236 :
237 :
238 :
239 : {% else %}
240 : {% if not moderation_delete_request %} {% page_submit_row %} {% endif %}
241 : {% endif %}
242 :
243 : {% if add %}
244 :
245 : {% endif %}
246 :
247 : {# JavaScript for prepopulated fields #}
248 : {% prepopulated_fields_js %}
249 :
250 :
Traceback:
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
core/handlers/base.py" in get_response
92. response = callback(request, callback_args, **callback_kwargs) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
contrib/admin/options.py" in wrapper
226. return self.admin_site.admin_view(view)(args, kwargs) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, kwargs) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
contrib/admin/sites.py" in inner
186. return view(request, args, **kwargs) File "/Library/Python/2.6/site-packages/django_cms-2.0.0.RC2-py2.6.egg/
cms/admin/pageadmin.py" in change_view
521. response = super(PageAdmin, self).change_view(request, object_id, extra_context)
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
db/transaction.py" in _commit_on_success
240. res = func(args, kw) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
contrib/admin/options.py" in change_view
873. return self.render_change_form(request, context, change=True, obj=obj)
File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
contrib/admin/options.py" in render_change_form
590. ], context, context_instance=context_instance) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
shortcuts/init.py" in render_to_response
20. return HttpResponse(loader.render_to_string(*args, kwargs), **httpresponse_kwargs) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/loader.py" in render_to_string
108. return t.render(context_instance) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
178. return self.nodelist.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/debug.py" in render_node
71. result = node.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/loader_tags.py" in render
97. return compiled_parent.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
178. return self.nodelist.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/debug.py" in render_node
71. result = node.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/loader_tags.py" in render
97. return compiled_parent.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
178. return self.nodelist.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/debug.py" in render_node
71. result = node.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/loader_tags.py" in render
97. return compiled_parent.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
178. return self.nodelist.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/debug.py" in render_node
71. result = node.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/loader_tags.py" in render
24. result = self.nodelist.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/debug.py" in render_node
71. result = node.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/defaulttags.py" in render
244. return self.nodelist_false.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/debug.py" in render_node
71. result = node.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/defaulttags.py" in render
243. return self.nodelist_true.render(context) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/Library/Python/2.6/site-packages/Django-1.1.1-py2.6.egg/django/
template/debug.py" in render_node
81. raise wrappedException Type: TemplateSyntaxError at /admin/cms/page/5/
Exception Value: Caught an exception while rendering: admin/
page_submit_line.htmlComments
-
1 comment Created about 1 month ago by arnonymTINYMCE: No plugin-dropdown if 'theme_advanced_buttons1' is not specified in TINYMCE_DEFAULT_CONFIGbugx -
When a many-to-many relation is given a horizontal filter through ModelAdmin, it displays correctly in django admin interface, but still shows standard form when adding as a plugin in django-cms.
Comments
Yes, it's in the filter_horizontal in admin.py, and the filter is shown at django admin
the CMSPlugin Class is the same as the ModelAdmin.
in your class that is in cms_plugins.py add a filter_horizontal field as you would do in the admin class. does this help? -
I have specified extra_context on settings.py like....
"CMS_PLACEHOLDER_CONF" = {'content':{ 'plugins': ('TextPlugin',), 'name':gettext("content"), 'extra_context': {"abcd_test":"Testing Extra Context."} } }this variables of extra_context are not available to default CMS template,
but if my default CMS template contains include template, inside that template I've access of variable "abcd_test", but not in default cms_tempate.can anyone tell me where I'm wrong?
Comments
- headbang CMS_PLACEHOLDER_CONF extra_context, works only if template contains placeholder tag...... :-P
-
4 comments Created about 1 month ago by bzedSaving a page with a set reverse id several times failsbugxWhen you add a reverse ID to a page and try to save the page a second time, the following warning pops up:
A page with this reverse URL id exists already.
Obviously it is not possible to save the page then.
Seems the check for duplicates doesn't take into account that the page which had the ID before is now saved again - and no new page will be saved with the same ID.Comments
I did not investigate why the exclude doesn't work as expectet here, so this is more a workaround, but it works for me.
diff --git a/cms/admin/forms.py b/cms/admin/forms.py index 4636523..0403433 100644 --- a/cms/admin/forms.py +++ b/cms/admin/forms.py @@ -104,7 +104,7 @@ class PageForm(PageAddForm): id = cleaned_data['reverse_id'] site_id = cleaned_data['site'] if id: - if Page.objects.filter(reverse_id=id, site=site_id).exclude(pk=self.instance.pk + if Page.objects.filter(reverse_id=id, site=site_id).exclude(pk=self.instance.pk raise forms.ValidationError(ugettext_lazy('A page with this reverse URL id return cleaned_dataclosed by d97f3c8 reverse id collition with public version
Unfortunately this doesn't fix it completely, I sometimes still stumble across the problem when saving pages.
If you do NOT edit a plugin on the page, saving works.
As soon as you edit something, we run into the same issue again.could you have a look in your DB?
is there more then one page with the same reverse id? if yes are they on the same site? and if yes do they both have publisher_is_draft=1 ?
I tried here ... but could not reproduce the error... maybe something in your db is corrupt? or there is an other problem?
please create a new ticket as i can't reopen tickets.
-
1 comment Created about 1 month ago by bzedshow_placeholder_by_id should behave like page_id_url when reverse_id is missingfeature requestxshow_placeholder_by_id throws a backtrace if the reverse_id is not found and DEBUG == True, which is a pain :) I've created a patch which changes the behaviour to be similar to page_id_url, also a bunch of unnecessary code was removed.
Comments
-
9 comments Created about 1 month ago by RoosterJuicebugxPopup window in chromeunsurexthe popups in the add page form in admin do not work
Comments
does chrome has a popup blocker?
do other popups in the admin work?
RoosterJuice
Thu Nov 05 14:25:11 -0800 2009
| link
no popup blocker.
Actually it only seems to be the "insert plugin" link when editing a page
RoosterJuice
Thu Nov 05 14:29:19 -0800 2009
| link
umm.. yes. I believe so
only inside a text plugin? are using wymeditor or do you have tinymce installed?
this seams to be the case in IE as well and also with tinymce
With google chrome 4.0.237.0 on OSX this works. With tinymce and wymeditor
I had this problem as well, i forget what fixed it though, something with a plugin i was writing had an error. Might be the same issue.
-
Just pulled down the latest changes, and tried to build/install via:
python setup.py build; python setup.py installThis creates the following traceback:
Traceback (most recent call last): File "setup.py", line 3, in <module> import cms File "/iscape/sites/chidjango/src/django-cms-2.0/cms/__init__.py", line 6, in <module> patch_settings() File "/iscape/sites/chidjango/src/django-cms-2.0/cms/conf/__init__.py", line 20, in patch_settings from cms.conf import global_settings File "/iscape/sites/chidjango/src/django-cms-2.0/cms/conf/global_settings.py", line 82, in <module> CMS_LANGUAGES = settings.LANGUAGES File "/iscape/sites/chidjango/lib/python2.5/site-packages/Django-1.1.1-py2.5.egg/django/utils/functional.py", line 269, in __getattr__ self._setup() File "/iscape/sites/chidjango/lib/python2.5/site-packages/Django-1.1.1-py2.5.egg/django/conf/__init__.py", line 40, in _setup self._wrapped = Settings(settings_module) File "/iscape/sites/chidjango/lib/python2.5/site-packages/Django-1.1.1-py2.5.egg/django/conf/__init__.py", line 75, in __init__ raise ImportError, "Could not import settings '%s' (Is it on sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, e)The same occurs with:
python setup.py sdistComments
Pushed a fix to my branch: http://github.com/f4nt/django-cms-2.0/commit/3247263c3bc5b1457e7e67e348c1c7a7d01df5d8
-
there has a small mistake in the cms/models/pagemodel folder,define "login_required" twice,at line 45 && 62
^_^
Comments
-
Seems like breadcrumb retrieves pages incorrectly.
Here's my page tree:
home
page1->page2->page3->page4
contact
When entering url /page1/page2/page3/page4/ I get breadcrumb as
follows:
home->page3->page2->page1->page4Also {% show_breadcrumb "template/path" %} seems to ignore the template parameter.
Using master as of 2.11.09 on Postgresql 8.3
Thanks
Comments
-
2 comments Created about 1 month ago by makkalotChange the order of plugins in adminunsurexAfter adding a plugin now it is not possible to change its order in admin panel. The process is like remove plugin and add it again. It would be cool to be able to change the order (i mean display order) by drag and drop.
Comments
-
I recently came across a situation where we needed to have periods allowed in a URL. I noticed that the overwrite_url cleansing raises an exception when a period is involved in the overwrite_url. To circumvent this I just made a simple change to:
cms/utils/urlutils.py
cms/urls.pyadding a period to the regexp in both. I wasn't sure if this was a particular design decision that was made to disallow periods though. If so I'm curious about the reasoning of why to explicitly disallow them, other than the obvious point of there's no reason to have periods in your URL (which I completely agree with)? Anyways, my changes are in the following commit if you want them:
http://github.com/f4nt/django-cms-2.0/commit/91ce9bfddc80ec81b4fdabf0e4c6835e950984fb
Although I think it might take less effort to just add the periods, if you decide to allow them :)
Comments
do you really need them or just use them for redirects?
Well this came up when we had to go through some domain verification with Yahoo, where they ask you to place a certain file, with a certain name, with a certain meta tag, at a certain spot on your server. That file they wanted us to use had a period in it, and needed to be at the root path of the site.
Obviously I could have setup a rewrite in nginx for that path, and pushed them somewhere else. However, it was just as easy to create the page in Django-CMS, add the meta tag, and be done with it, after I allowed for periods in the page names.
i am not sure we should allow to have dots in urls... they are so ugly..
I completely understand that they're ugly, but you do grant the option of allowing me to force my own URL via overwrite_url. Shouldn't it to some degree be my choice to create some ugly URLs? I do understand your side though, and have no qualms if you want to close this out as a design decision. I'll always have my fork if I need periods. :)
ok ... allowing it for url overwrites is a go. but not for slugs.
did you need to change the cms/urls.py that the urls where matched and if yes is this in your branch?Awesome, thanks! Yeah, I had to change urls.py and urlutils.py. Both of the changes are in my branch.
-
10 comments Created about 1 month ago by AnberImportError: cannot import name signalsunsurexMOD_PYTHON ERROR
ProcessId: 2655
Interpreter: 'test.anber.ru'ServerName: 'test.anber.ru'
DocumentRoot: '/var/www/test.anber.ru/public_html'URI: '/admin/'
Location: '/'
Directory: None
Filename: '/var/www/test.anber.ru/public_html/admin'
PathInfo: '/'Phase: 'PythonHandler'
Handler: 'django.core.handlers.modpython'Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch
default=default_handler, arg=req, silent=hlist.silent)File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target
result = _execute_target(config, req, object, arg)File "/usr/lib/python2.6/site-packages/mod_python/importer.py", line 1128, in _execute_target
result = object(arg)File "/usr/lib/python2.6/site-packages/django/core/handlers/modpython.py", line 228, in handler
return ModPythonHandler()(req)File "/usr/lib/python2.6/site-packages/django/core/handlers/modpython.py", line 201, in call
response = self.get_response(request)File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 73, in get_response
response = middleware_method(request)File "/usr/lib/python2.6/site-packages/cms/middleware/user.py", line 9, in process_request
from cms.utils.permissions import set_current_userFile "/usr/lib/python2.6/site-packages/cms/utils/permissions.py", line 4, in
from cms.models import Page, PagePermission, GlobalPagePermissionFile "/usr/lib/python2.6/site-packages/cms/models/init.py", line 1, in
from moderatormodels import *File "/usr/lib/python2.6/site-packages/cms/models/moderatormodels.py", line 1, in
from cms.models.pagemodel import PageFile "/usr/lib/python2.6/site-packages/cms/models/pagemodel.py", line 15, in
from cms.models import signals as cms_signalsImportError: cannot import name signals
Comments
Yes.
Django version — 1.1.1
$ python Python 2.6.4 (r264:75706, Nov 4 2009, 01:00:19)
[GCC 4.3.2] on linux2$ uname -a Linux vps642.timeweb.ru 2.6.27-openvz-briullov.1-r2-vps #2 SMP Wed Oct 14 22:30:46 MSD 2009 x86_64 GNU/Linux
are you using other python/django versions on the server as on local?
if you run on the server:
python manage.py shell
import cms.modelsdoes it work?
$ python manage.py shell
Python 2.6.4 (r264:75706, Nov 4 2009, 01:00:19)
[GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)import cms.models — Ok
i think this may be a circular import problem.
maybe move the from cms.utils.permissions import set_current_user
in middleware/user.py into the function and not at the beginning of the file... maybe this helps?hm…
$ cat /var/log/apache2/error.log | grep mod_wsgi
[Wed Nov 04 01:51:09 2009] [warn] mod_wsgi: Compiled for Python/2.6.4. [Wed Nov 04 01:51:09 2009] [warn] mod_wsgi: Runtime using Python/2.6+. [Wed Nov 04 01:51:09 2009] [warn] mod_wsgi: Python module path '/usr/local/lib/python26.zip:/usr/local/lib/python2.6/:/usr/local/lib/python2.6/plat-linux2:/usr/local/lib/python2.6/lib-tk:/usr/local/lib/python2.6/lib-old:/usr/local/lib/python2.6/lib-dynload'. [Wed Nov 04 01:51:09 2009] [notice] Apache/2.2.9 (Ubuntu) PHP/5.2.6-2ubuntu4.3 with Suhosin-Patch mod_wsgi/2.6 Python/2.6+ configured -- resuming normal operations
Different versions of python…
How do I fix this?
ask on the ubuntu / apache / mod_python / mod_wsgi / python mailing list :)
did you manage to install it correctly? Did the error went away?
-
8 comments Created about 1 month ago by buzzlightthread._locals objects has no attribute 'user'bugxhi,I have a problem about add new page,
I use "python manage.py shell"
from cms.models.pagemodel import Page p=Page(id='1',publisher_is_draft='1',publisher_public_id='1',publisher_state='1',created_by='admin',changed_by='admin',parent_id='',creation_date='2009-11-02 23:27:14.981000',publication_date='',publication_end_date='',in_navigation='0',soft_root='0',reverse_id='',navigation_extenders='',published='0',template='index.html',site_id='1',moderator_state='1',level=0,lft='1',rght='2',tree_id=7,login_required='0',menu_login_required='0') p.save() Traceback (most recent call last):
File "", line 1, in File "E:\cleancms\cms\models\pagemodel.py", line 281, in saveself.changed_by = _thread_locals.user.usernameAttributeError: 'thread._local' object has no attribute 'user'
Comments
does it work if you give it created_by and changed_by in the constructor?
ok,I solve it,I give an argument to save(),like this:p.save(no_signals=True),it work!But I can't understand~
many thanks!
the thread_locals is used as a mean to determine the current user... as we don't have the request in the save signal. We will probably change this to say: was changed by: script, was created by: script etc.. if no user is present in threadlocals
set a user in threadlocals... as the CurrentUser Middleware does
-
1 comment Created about 1 month ago by piglettoJavaScript handlers for span.delete are attached too many times (plugin edit)bugxTo reproduce:
1. Start editing any CMS Page
2. Add three Text plugins one by one (without editing contents)
3. Click 'Delete' on one of these newly added plugins
You should notice that 'Are you sure you want to remove this plugin' dialog is shown three times.This happens because every time new plugin is added, function setclickfunctions() (plugin_editor.js) is executed, so it attaches new handlers for 'click' to span.delete.
Comments
-
'PageAdminMixins' object has no attribute 'COOKIES'
4 comments Created about 1 month ago by Guest007Just try to edit my first and, for now, single page in project. 2 days
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/cms/page/1/
Django Version: 1.2 pre-alpha
Python Version: 2.5.4
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'cms', 'publisher', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.snippet', 'cms.plugins.googlemap', 'cms.plugins.teaser', 'cms.plugins.video', 'cms.plugins.twitter', 'mptt', 'reversion', 'debug_toolbar'] Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware', 'debug_toolbar.middleware.DebugToolbarMiddleware')Traceback:
File "/home/guest007/lib/python/django/core/handlers/base.py" in get_response
92. response = callback(request, callback_args, **callback_kwargs) File "/home/guest007/lib/python/django/contrib/admin/options.py" in wrapper
227. return self.admin_site.admin_view(view)(args, kwargs) File "/home/guest007/lib/python/django/contrib/csrf/middleware.py" in wrapped_view
269. resp = view_func(*args, kwargs) File "/home/guest007/lib/python/django/utils/decorators.py" in call
36. return self.decorator(self.func)(args, **kwargs) File "/home/guest007/lib/python/django/utils/decorators.py" in _wrapped_view
86. response = view_func(request, args, kwargs) File "/home/guest007/lib/python/django/utils/decorators.py" in call
36. return self.decorator(self.func)(*args, kwargs) File "/home/guest007/lib/python/django/views/decorators/cache.py" in wrapped_view_func
70. response = view_func(request, args, **kwargs) File "/home/guest007/lib/python/django/contrib/admin/sites.py" in inner
188. return view(request, args, **kwargs) File "/home/guest007/tmp/Projects/AquaD/cms/admin/pageadmin.py" in change_view
514. response = super(PageAdmin, self).change_view(request, object_id, extra_context) File "/home/guest007/lib/python/django/db/transaction.py" in commit_on_success
240. res = func(args, **kw) File "/home/guest007/lib/python/reversion/revisions.py" in _create_on_success
316. result = func(args, **kwargs) File "/home/guest007/lib/python/django/utils/decorators.py" in _wrapped_view
82. result = middleware.process_view(request, view_func, args, kwargs) File "/home/guest007/lib/python/django/contrib/csrf/middleware.py" in process_view
87. request.META["CSRF_COOKIE"] = request.COOKIES[settings.CSRF_COOKIE_NAME]Exception Type: AttributeError at /admin/cms/page/1/
Exception Value: 'PageAdminMixins' object has no attribute 'COOKIES'
Comments
sorry. r11660 don't work.
with django r11654 works fine -
2 comments Created about 1 month ago by ulopeCMS_FLAT_URLS doesn't work correctlybugxWhen setting CMS_FLAT_URLS = True only immediate children under the first root page can be adressed without path segments.
The following patch fixes the problem for me. But it's just a stop-gap as it doesn't handle fallback languages and possibly causes breakage in other ways.
Comments
-
2 comments Created about 1 month ago by quattromic2.1xbugxPython 2.6: SyntaxError in cms/admin/pageadmin.py:338unsurexEnvironment:
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.1.1
Python Version: 2.6.1
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'appmedia', 'filebrowser', 'mptt', 'multilingual', 'siteinfo', 'sorl.thumbnail', 'south', 'tagging', 'tinymce', 'uni_form', 'cms', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.link', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.googlemap', 'cms.plugins.snippet', 'cms.plugins.videoplayer', 'cms.plugins.teaser', 'cms.plugins.twitter', 'contactform', 'csv_export', 'blog', 'news', 'image_filer', 'simplegallery', 'publisher', 'rosetta'] Installed Middleware:
('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'multilingual.middleware.DefaultLanguageMiddleware', 'siteinfo.middleware.login_required.RequireLoginMiddleware', 'cms.middleware.toolbar.ToolbarMiddleware', 'rosetta.middleware.MOReloadMiddleware')Traceback:
File "/Library/Python/2.6/site-packages/django/core/handlers/base.py" in get_response
83. request.path_info) File "/Library/Python/2.6/site-packages/django/core/urlresolvers.py" in resolve
216. for pattern in self.url_patterns: File "/Library/Python/2.6/site-packages/django/core/urlresolvers.py" in get_url_patterns
245. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/Library/Python/2.6/site-packages/django/core/urlresolvers.py" in get_urlconf_module
240. self._urlconf_module = import_module(self.urlconf_name) File "/Library/Python/2.6/site-packages/django/utils/importlib.py" in import_module
35. import(name) File "/Users/maiklust/Documents/workspace/sandbox2.divio.ch/py_src/sandbox2/urls.py" in
6. admin.autodiscover() File "/Library/Python/2.6/site-packages/django/contrib/admin/init.py" in autodiscover
56. import_module("%s.admin" % app) File "/Library/Python/2.6/site-packages/django/utils/importlib.py" in import_module
35. import(name) File "/Users/maiklust/Documents/workspace/dlib/python/py2/cms/admin/init.py" in
1. import pageadminException Type: SyntaxError at /
Exception Value: ('invalid syntax', ('/Users/maiklust/Documents/workspace/dlib/python/py2/cms/admin/pageadmin.py', 338, 101, ' name = settings.CMS_PLACEHOLDER_CONF.get("%s %s" % (obj.template placeholder_name), {}).get("name", None)\n'))
Comments
-
I noticed when using Django TinyMCE with Django-CMS that I couldn't use the "Styles" or "formatting" sections with TinyMCE in the CMS. From what I could tell there's an assumption that advanced theme arguments will be in the settings, and thus they're forced into the tinyMCE configuration. This overrides the basic {'theme': "advanced"} setting, and loses the "Styles" and "Formatting" sections of TinyMCE. I created a fix for this in my fork: http://github.com/f4nt/django-cms-2.0/commit/eeb9851780d52841b74961b05e133c66cba181a5
Not sure if this is necessarily a bug per se, or a configuration issue on my part. Either way, no matter what configuration I used I couldn't get TinyMCE setup the way I wanted without the aforementioned patch.
Comments
-
6 comments Created about 1 month ago by rtpmCannot create translation for page childbugxHello,
commit a6940a6
Merge: 276bae5... a8509c2...
Author: Patrick Lauber patrick.lauber@divio.ch
Date: Thu Oct 29 10:02:49 2009 +0100Merge branch 'master' of git://github.com/sublimevelo/django-cms-2.0------------------- ERROR LOG Environment:
Request Method: GET
Request URL: http://IP/admin/cms/page/2/?language=en
Django Version: 1.2 pre-alpha SVN-11655
Python Version: 2.4.4
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'cms', 'publisher', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.snippet', 'cms.plugins.googlemap', 'cms.plugins.teaser', 'cms.plugins.video', 'cms.plugins.twitter', 'cmsplugin_news', 'mptt', 'reversion', 'example.categories', 'example.sampleapp'] Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware')Template error:
In template /home/robert/python/django-cms-2.0/cms/templates/admin/cms/page/change_form.html, error at line 59
Caught an exception while rendering: 'NoneType' object has no attribute 'split' 49 : {% block object-tools %}50 : {% if change %}{% if not is_popup %}
51 :
- {% trans "Remove delete request" %} {% endif %}
- {% if moderation_delete_request %}{% trans "Approve delete" %}{% else %}{% trans "Approve" %} {% trans "draft" %}{% endif %}
- {% trans "Preview" %} {% trans "draft" %}
- {% trans "History" %}
- {% trans "View on site" %} {% endif%}
52 : {% if moderation_delete_request %}
53 : {% if moderator_should_approve %}
54 :
55 :
56 : {% endif %}
57 :
58 :
59 : {% if has_absolute_url %}
60 :
61 : {% endif %}{% endif %}
62 : {% endblock %}
63 :
64 :
65 : {% block form_top %}{% endblock %}
66 : {{ adminForm.fields.parent }}
67 :
68 :
69 :
Traceback:
File "/home/robert/python/django-cms-2.0/cms/admin/pageadmin.py" in change_view
514. response = super(PageAdmin, self).change_view(request, object_id, extra_context) File "/home/robert/python/django-cms-2.0/example/reversion/revisions.py" in _create_on_success
316. result = func(*args, **kwargs)Exception Type: TemplateSyntaxError at /admin/cms/page/2/
Exception Value: Caught an exception while rendering: 'NoneType' object has no attribute 'split'Original Traceback (most recent call last):
File "../django/template/debug.py", line 71, in render_node File "../django/template/debug.py", line 87, in render File "../django/template/init.py", line 572, in resolve File "/home/robert/python/django-cms-2.0/cms/templatetags/cms_admin.py", line 82, in preview_linkreturn "/%s%s" % (language, page.get_absolute_url(language))File "../django/utils/functional.py", line 55, in _curried File "../django/db/models/base.py", line 632, in get_absolute_url File "/home/robert/python/django-cms-2.0/cms/models/pagemodel.py", line 342, in get_absolute_url
path = "/".join(path.split("/")[1:])AttributeError: 'NoneType' object has no attribute 'split'
Thanks
Comments
what is the slug of the page? does it have an url overwrite? what is the value of the urls overwrite?
Tried again with new database.
Parent title "Żółw" with "zolw" slug. No overwrites.
Child title: "Żółw dziecko" with "zolw-dziecko" slug. No overwrites too.Thanks
No.
In the previous report I have used english/polish translations.
Now similar problem appears using default configurations (with reversion & south disabled only).I can create english, pt-br, french but no German translations. When choosing german translation I'm getting the error mentioned above.
Using sqlite3 for db backend.
-
issue with middleware in frontedit branch using mod_wsgi
4 comments Created about 1 month ago by fivethreeoI have checked out the frontedit branch and added the toolbar middelware
But I get this error that I am unable to debug.
URL: http://cms2.cylon.no/en/ File '/usr/local/lib/python2.4/site-packages/Paste-1.5.1-py2.4.egg/paste/exceptions/errormiddleware.py', line 144 in __call__ app_iter = self.application(environ, start_response) File '/home/cms2/code/django/core/handlers/wsgi.py', line 230 in __call__ self.load_middleware() File '/home/cms2/code/django/core/handlers/base.py', line 42 in load_middleware raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e) ImproperlyConfigured: Error importing middleware cms.middleware.toolbar: "cannot import name plugin_pool"If I comment out the, "from cms.plugin_base import CMSPluginBase" in plugin_pool.py i get
URL: http://cms2.cylon.no/en/ File '/usr/local/lib/python2.4/site-packages/Paste-1.5.1-py2.4.egg/paste/exceptions/errormiddleware.py', line 144 in __call__ app_iter = self.application(environ, start_response) File '/home/cms2/code/django/core/handlers/wsgi.py', line 230 in __call__ self.load_middleware() File '/home/cms2/code/django/core/handlers/base.py', line 42 in load_middleware raise exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"' % (mw_module, e) ImproperlyConfigured: Error importing middleware cms.middleware.toolbar: "cannot import name get_page_queryset"Comments
fivethreeo
Wed Oct 28 07:19:59 -0700 2009
| link
yes
looks like a circular import?
try to import the stuff in the process_response function or where it actually is needed
-
3 comments Created about 1 month ago by rokjbugxTemplate syntax error when trying to edit newly created page.unsurexI did clone from git://github.com/digi604/django-cms-2.0.git.
If I do not comment line 240 in cms/templates/admin/cms/page/change_form.html I get template syntax error when trying to edit page.
239 : {% else %} 240 : {% if not moderation_delete_request %} {% page_submit_row %} {% endif %} 241 : {% endif %}
Rok
Comments
ok i tried to have the same exception but here everything works like a charm
django version?
newest master?
1.1
Did update to django version 1.1.1 and error does not occur any more.
So problem solved?
-
I add one page,but I can't see my posted page in the /cms/page/,and it has error in firebug.
It shows in firebug:
$ is not defined page()page $(document).ready(function()Comments
be sure your media folder is set up correctly. espacilly that cms/media/cms is available under MEDIA_URL/cms
i am sorry to trouble you again.
it is my django's setting.py:
MEDIA_ROOT = 'D:/program/Django-1.1.1/django/bin/mysite/cms'
MEDIA_URL = '/media/'it is the cms's default path,the cms's media path is "D:/program/Django-1.1.1/django/bin/mysite/cms/meida",i have try many times,but it always show mistake~
I try to replace the {{ CMS_MEDIA_URL }} with my cms media path in the change_list.html,but it failure again.
hi,i put the cms/media/cms folder into the python's lib/site-packages/django/contrib/admin/media,and modify project's settings.py/MEDIA_URL="/media/"
it run ok! :D
but I can't understand why I am wrong that I modify MEDIA_ROOT.
I know where is wrong here===>my settings.py/admin_media_prefix="/media/",and media_url='/media/',they can't have the same name.If I modify admin_media_prefix="admin_media",and modify urls.py,attach "(r'^media/(?P.*)$', 'django.views.static.serve',{'document_root': settings.MEDIA_ROOT})," in the urlpatterns,it runs no error! :D
thanks for your help!
my media_url is "/media/" and my admin_media_prefix is "/media/admin/". I have symlink from django.contrib.admin.media to my media folder ... under windows that would be a shortcut i think.
closed
-
OperationalError,no such table:cms_title
2 comments Created about 1 month ago by buzzlighthi,i'm a newbie,i have some problem.
I can see the "cms" at Admin page,but when I click "cms",the browser show"OperationalError at /admin/cms/page/add/
no such table: cms_title"what's wrong?
Thx for your answerComments
-
1 comment Created 2 months ago by DrMeerscms.admin.utils.get_placeholders should set current_page context variablebugxCurrently, the current_page context variable is not properly set in cms.admin.utils.get_placeholders, so that template code like the following will result in placeholders being omitted from admin:
{% if current_page %} <h1>{% placeholder title %}</h1> {% placeholder body %} {% endif %}Comments
-
3 comments Created 2 months ago by digi604plugin action messages in admin give 404 after clickingbugxin the admin dashboard on the right side you see the most recent actions. Plugin actions are registered as well but can't be clicked because the plugin admin is not "registered". Remove the links or remove the messags.
Comments
fivethreeo
Wed Oct 28 06:47:35 -0700 2009
| link
fixed this issue in branch http://github.com/fivethreeo/django-cms-2.0/tree/latest_actions
-
For this example two translations are available: EN, PL.
Caching disabled.
No revisions and no south.
Tested in haste on sqlite only.PROBLEM: After deletion a translation (e.g. EN), deleted translation (EN) is still available on front page with their plugins and navigation, admin page looks that it behaves correctly - form is empty.
Comments
is moderation enabled? if yes was the page saved after the delete or not?
You're right. If moderation is disabled in settings everything works great. I didn't know about that - sorry, but I want moderation to be enabled. So, if enabled (in my example) it is little tricky, but as you wrote:
enter 'edit page', delete XX translation, then enter 'edit page' again and save in any of existing translations - after that translation will be deleted. Much longer way :-), but it also works - I discovered it already about half an hour before reading your comment, but it could be simpler - just delete translation, as it is when moderation is disabled.
Thanks :)My solution: maybe send a signal to save, of course in parallel to received delete translation command. What do you think?
fivethreeo
Fri Oct 23 10:41:11 -0700 2009
| link
I tried with fivethreeo before and now with newest master:
When moderation disabled - OK,
When enabled just as it was:
1. Delete XX translation. (after doing this, translation still exists on site but not in admin)
2. "clickety-click" on admin site tree, enter YY translation
3. Save / Save and cont. editing. (and translation XX successfully deleted)
fivethreeo
Tue Oct 27 11:35:20 -0700 2009
| link
Changes must be approved it seems, how do I auto_approve for superusers?
i think you must just save the draft version and publisher should handle the rest. but i am not entirely sure. if this is not the case maybe ask pcicman or have a look how the publisher handles the save.
fivethreeo
Wed Oct 28 06:25:04 -0700 2009
| link
I am unable to reproduce this, adding a new language and deleting a language requires you to approve the change before it is made public.
had not a chance to try it out myself... does it get published if the page is NOT under moderation? Aka the page was not marked for moderation?
fivethreeo
Wed Oct 28 06:50:17 -0700 2009
| link
Yes, if the page was not marked for moderation it gets published.
so this is how it is supposed to work... this can be closed?
fivethreeo
Wed Oct 28 06:55:08 -0700 2009
| link
i would say so
-
CMS does not recognize cmsplugin_news in placeholder-slot
5 comments Created 2 months ago by anhtranCMS does not recognize cmsplugin_news in placeholder-slot which I downloaded from the website django-cms.org. I do not understand why, because I did exactly as instructed. A similar problem occurs with exampleapp in cms zip-pack. I use Django 1.1. I hope to help.
Note: no errors occur when running syndb and CMS
Comments
delete the CMS_PLACEHOLDER_CONF setting from your settings or read in the docs on how to handle this setting
Seems this is related to my app.. I'll do some testing.
Wait.. I wrote only 1 plugin so far for the app.. only the CMSLatestNewsPlugin
The rest is using the application extension.
-
First page in Pages only shows up at / and not available via it's page slug
3 comments Created 2 months ago by globalnamespaceTesting using django-cms revision: f489078
Date: Tue Oct 20 16:49:49 2009 +0200Tested with Django 1.1 and Django 1.2 pre-alpha SVN-11638
Steps to reproduce:
Created a new CMS enabled site
Created a single page -- Title: test Slug: testThis page will only appear at http://example.com/ and not at http://example.com/test/
Created a second CMS page -- Title: test2 Slug: test2
This page appears at http://example.com/test2/ but if it is moved to the first position in the pages list it only appears at http://example.com/With the error:
CMS: Page not found for "test2"Comments
at the moment this is intended behavior. Because we don't have a "root" page and we don't will have one, the upper most published node is the "root" node. There is a ticket that we should visually distinguish this node. In 1.0 we had a root node but this made it impossible to change the root node.
maybe we should mention this in the docs. If you want you can update the docs and i will have it in RC2
-
3 comments Created 2 months ago by gerard5Deletion of single translationfeature requestxAdd a button to delete single translation in the form "Change page" and/or on "List of pages"
this button should appear only if more than one translation of page exists.Did somebody asked until now "How to remove single translations (eg. PL, DE), leaving the rest (EN, FR) from (EN, DE, PL, FR) translations set?"
the language set in above-mentioned question is just for an example of courseit should be easy to add that functionality even in next RC of 2.0, that official 2.0 should have that functionality.
complete description and talk is here:
http://groups.google.com/group/django-cms/browse_thread/thread/7785f641c5927737Comments
It works, but in admin.. When I delete translation, it is still visible on site and in database.
Tested on 'example' bundled with django2.0, but in haste using only sqlite, hmm.. caching is disabled.
Aah, when refilling just deleted data in admin, slug is not auto completing.
thanks -
1 comment Created 2 months ago by egedshow_menu tag broken for navigation extendersbugxAfter pulling 2.0.0.RC2 changes, tag {% show_menu 1 %} renders nothing on page with a navigation extender. On other pages, siblings and also descendants it works fine. I figured following fix:
--- a/cms/templatetags/cms_tags.py +++ b/cms/templatetags/cms_tags.py @@ -68,7 +68,7 @@ def show_menu(context, from_level=0, to_level=100, extra_inactive=0, extra_activ alist = None if current_page: alist = current_page.get_ancestors().values_list('id', 'soft_root') - if alist == None:# maybe the active node is in an extender? + if not alist: # == None:# maybe the active node is in an extender? alist = [] extenders = page_queryset.published().filter(in_navigation=True, site=site,Also see fork: eged/django-cms-2.0@944a9cf
Comments
-
4 comments Created 2 months ago by mmarshallarchive release doesn't include templates or media files.bugxFrom what I can tell, the .zip archive for 2.0.0-rc1 on pypi doesn't include templates or media.
Comments
Yeah, I can confirm that this is the case. I forked the repo this morning, and fixed this. Commit is at http://github.com/f4nt/django-cms-2.0/commit/3808971a7ce9aed82e71972bbea3e3a38eb8d9b1 . You guys may have a different preferred way of fixing this, this was just my way of doing it. :)
-
3 comments Created 2 months ago by fivethreeoSaving of titles fail in revert_plugins, real error swallowed by except causing a transaction errorbugxCommenting out the try/except gives this error
Exception Type: IntegrityError at /admin/cms/page/recover/23/ Exception Value: duplicate key violates unique constraint "cms_title_publisher_is_draft_key"Comments
fivethreeo
Fri Oct 16 10:38:24 -0700 2009
| link
Found out why, Title.objects.set_or_create should not be called in save_model in PageAdmin if it is a revert or recover.
fivethreeo
Fri Oct 16 13:09:52 -0700 2009
| link
Made a branch with a possible fix http://github.com/fivethreeo/django-cms-2.0/tree/fix_revert_1
fivethreeo
Sun Oct 18 12:40:22 -0700 2009
| link
fixed
-
1 comment Created 2 months ago by hvdklauwNavigationNode should clean childrens in __init__bugx -
When saving the form I get the following error:
File "/home/cms2/code/cms/admin/forms.py" in clean 54. lang = cleaned_data['language'] Exception Type: KeyError at /admin/cms/page/recover/427/ Exception Value: 'language'Comments
fivethreeo
Wed Oct 14 03:15:42 -0700 2009
| link
Diff at gist
http://gist.github.com/209953language changer is not visible in the recover view... but actually should.
also if page was created in a different language then the current admin language the title slug etc are empty
-
Steps for reproduce:
run the cms from the example folder. Add a new page and edit the application to one of the shown sampleapp. Surf to the page in browser.
Environment:
Request Method: GET
Request URL: http://127.0.0.1:8000/app/
Django Version: 1.1
Python Version: 2.5.4
Installed Applications:
['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'cms', 'publisher', 'cms.plugins.text', 'cms.plugins.picture', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.link', 'cms.plugins.snippet', 'cms.plugins.googlemap', 'cms.plugins.teaser', 'cms.plugins.video', 'cms.plugins.twitter', 'mptt', 'reversion', 'south', 'example.sampleapp', 'dbforms', 'uni_form'] Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware')Template error:
In template /somewhere/tmp/django-cms-2.0/example/sampleapp/templates/sampleapp/home.html, error at line 8
Caught an exception while rendering: Reverse for 'sample-app-sublevel' with arguments '()' and keyword arguments '{}' not found. 1 : {% extends "index.html" %}2 : {% load cms_tags %}
3 :
4 : {% block content %}
5 :
Sample application home page
6 :
{{ message }}
7 : {{ block.super }}
8 : Sample app sublevel reverse test
9 :
10 :
Sample image - appmedia works?
11 :

12 : {% endblock content %}
Traceback:
File "/somewhere/tmp/django-cms-2.0/example/django/core/handlers/base.py" in get_response
92. response = callback(request, callback_args, **callback_kwargs) File "/somewhere/tmp/django-cms-2.0/example/sampleapp/views.py" in sample_view
7. return render_to_response("sampleapp/home.html", context) File "/somewhere/tmp/django-cms-2.0/example/django/shortcuts/init.py" in render_to_response
20. return HttpResponse(loader.render_to_string(args, kwargs), httpresponse_kwargs) File "/somewhere/tmp/django-cms-2.0/example/django/template/loader.py" in render_to_string
108. return t.render(context_instance) File "/somewhere/tmp/django-cms-2.0/example/django/template/init.py" in render
178. return self.nodelist.render(context) File "/somewhere/tmp/django-cms-2.0/example/django/template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/somewhere/tmp/django-cms-2.0/example/django/template/debug.py" in render_node
71. result = node.render(context) File "/somewhere/tmp/django-cms-2.0/example/django/template/loader_tags.py" in render
97. return compiled_parent.render(context) File "/somewhere/tmp/django-cms-2.0/example/django/template/init.py" in render
178. return self.nodelist.render(context) File "/somewhere/tmp/django-cms-2.0/example/django/template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/somewhere/tmp/django-cms-2.0/example/django/template/debug.py" in render_node
71. result = node.render(context) File "/somewhere/tmp/django-cms-2.0/example/django/template/loader_tags.py" in render
24. result = self.nodelist.render(context) File "/somewhere/tmp/django-cms-2.0/example/django/template/init.py" in render
779. bits.append(self.render_node(node, context)) File "/somewhere/tmp/django-cms-2.0/example/django/template/debug.py" in render_node
81. raise wrappedException Type: TemplateSyntaxError at /app/
Exception Value: Caught an exception while rendering: Reverse for 'sample-app-sublevel' with arguments '()' and keyword arguments '{}' not found.Original Traceback (most recent call last):
File "/somewhere/tmp/django-cms-2.0/example/django/template/debug.py", line 71, in render_noderesult = node.render(context)File "/somewhere/tmp/django-cms-2.0/example/django/template/defaulttags.py", line 382, in render
raise eNoReverseMatch: Reverse for 'sample-app-sublevel' with arguments '()' and keyword arguments '{}' not found.
Comments
yes, now no more exception at that point. Clicking the link "Sample app sublevel reverse test" in that now showing page gives:
Using the URLconf defined in example.urls, Django tried these URL patterns, in this order:
- ^admin/
- ^jsi18n/(?P\S+?)/$
- ^categories/
- ^media/(?P.*)$
- ^ ^ ^sample/ ^$
- ^ ^ ^sample/ ^$
- ^ ^ ^sample/ ^sublevel/$
- ^ ^$
- ^ ^(?P[0-9A-Za-z-_//]+)/$
The current URL, sample/% url sample-app-sublevel 1 %, didn't match any of these.
is the apphook on the "home" page or on an other page und what is the level of this page?
fresh database - created 2 pages (one start and a subpage "sample"). In "sample" page selected "sample application" in the "Applikation" select box (erweiterte Einstellungen) - Is this the "app-hook"?
ok i tested it. Here it works. Is start published, is sample published? Did you restart the server after you selected the "sample application" and saved?
with a restart and latest trunk the link is now working for me. Issue is fixed for me.
-
1 comment Created 2 months ago by digi604pypi version has troubles creating tablesbugx -
3 comments Created 2 months ago by johboSending mail to managers fails when page with id is missingbugxWhen a page is is referenced in the template but the page is missing, django cms tries to send an e-mail notification to the managers. This fails because settings.MANAGERS is a list of tuples and send_mail expects a list of strings.
I think the best solution is to use mail_managers instead of send_mail from django.core.mail.
This is my suggestion:
diff -r bc7a8271711e cms/templatetags/cms_tags.py --- a/cms/templatetags/cms_tags.py Sun Aug 02 17:07:31 2009 +0200 +++ b/cms/templatetags/cms_tags.py Sun Oct 11 14:13:35 2009 +0200 @@ -3,7 +3,7 @@ from cms import settings from cms.utils import get_language_from_request,\ get_extended_navigation_nodes, find_children, cut_levels, find_selected -from django.core.mail import send_mail +from django.core.mail import send_mail, mail_managers from django.contrib.sites.models import Site from django.utils.safestring import mark_safe from cms.utils.moderator import get_page_model, get_title_model, get_cmsplugin_model @@ -320,12 +320,10 @@ def send_missing_mail(reverse_id, request): site = Site.objects.get_current() - send_mail(_('Reverse ID not found on %(domain)s') % {'domain':site.domain}, + mail_managers(_('Reverse ID not found on %(domain)s') % {'domain':site.domain}, _("A page_id_url template tag didn't found a page with the reverse_id %(reverse_id)s\n" "The url of the page was: http://%(host)s%(path)s") % {'reverse_id':reverse_id, 'host':site.domain, 'path':request.path}, - settings.DEFAULT_FROM_EMAIL, - settings.MANAGERS, fail_silently=True) def page_id_url(context, reverse_id, lang=None):Comments
Alternatively it might be a solution to replace settings.MANAGERS with this construct:
[ x[1] for x in settings.MANAGERS ]or something like this.
BlizzTheShow
Sun Oct 11 06:39:23 -0700 2009
| link
Would also be nice, if django-mailer could be used.
# favour django-mailer but fall back to django.core.mail from django.conf import settings if "mailer" in settings.INSTALLED_APPS: from mailer import send_mail else: from django.core.mail import send_mail -
2 comments Created 2 months ago by piglettocontext.update in plugins' render method may override important databugxFirst Reported at:
http://groups.google.com/group/django-cms/browse_frm/thread/1f84f473541d1e54Plugins usually use context.update(...) method in their render function. If context is updated by every plugin, and every plugin puts its own variables into context, then it is likely to happen that some original context values will be overriden.
This in fact happens. Consider this:- I've connected django.contrib.auth.urls into CMS_APPLICATIONS_URLS,
so 'auth' is now handled as external application by specific cms page,
say 'loginpage'
- django.contrib.auth.login view adds 'form' into context.
- there are some plugins in use on 'loginpage' page, and one (or more)
of them is adding 'form' variable into context
- original 'form' is lost for login.html template because it is overriden by plugin.
A bit dirty solution might be adding context.pop() into render_plugin
method like:(...) context = plugin.render(context, instance, placeholder) template = hasattr(instance, 'render_template') and instance.render_template or plugin.render_template if not template: raise ValidationError("plugin has no render_template: %s" % plugin.__class__) ret = mark_safe(render_to_string(template, context)) context.pop() return ret (...)I tried this as a proof of concept and this works :)
Better solution might be something that is done in this snippet:
http://www.djangosnippets.org/snippets/1687/Comments
I've looked into: http://github.com/digi604/django-cms-2.0/blob/master/cms/models/pluginmodel.py and I can't see any changes that prevent context object from being updated by plugins. Did I miss something?
I think that possible solution might be:
def render_plugin(self, context=None, placeholder=None, admin=False): instance, plugin = self.get_plugin_instance() if context is None: c = Context() else: c = Context(context) if instance and not (admin and not plugin.admin_preview): c = plugin.render(c, instance, placeholder) template = hasattr(instance, 'render_template') and instance.render_template or plugin.render_template if not template: raise ValidationError("plugin has no render_template: %s" % plugin.__class__) return mark_safe(render_to_string(template, c)) else: return "" - I've connected django.contrib.auth.urls into CMS_APPLICATIONS_URLS,
so 'auth' is now handled as external application by specific cms page,
-
1 comment Created 2 months ago by piglettobugxDocumentation about creating custom plugins is wrong: uses return context.update(...)docsxFirst reported at: http://groups.google.com/group/django-cms/browse_frm/thread/1f84f473541d1e54
Documentation about creating custom plugins (http://www.django-cms.org/
en/documentation/2.0/custom_plugins/) presents this way of updating
context in render function:
return context.update({'gallery':instance.gallery,'placeholder':placeholder})Plugins in django-cms, eg. text use different (I think more correct)
way:def render(self, context, instance, placeholder): context.update({ 'body':plugin_tags_to_user_html(instance.body, context, placeholder), 'placeholder':placeholder, 'object':instance }) return contextIf you check django/template/context.py:update, then you can see that
'update' returns dictionary that was passed to it as parameter(!) It doesn't return context object.Because of that, code in cms/models/pluginmodel.py:render_plugin has
no sense:
context = plugin.render(context, instance, placeholder)If someone is using snippet from documentation, then whole context
object is overriden by dictionary used in plugin's render method.Comments
-
2 comments Created 2 months ago by heiho1CMS should support master "template" pagesfeature requestxI was discussing django-cms with a potential client today and one of the feature requests which came up was the idea of having a "master" template page from which child pages could descend. This master template page would be used to share plugins into placeholder for child pages. I think this is feasible in django-cms and a desirable feature if it can be reasonably added so I agreed to raise this issue with the team to elicit feedback.
I'd be more than willing to work on this feature if extra hands are needed.
Comments
-
Caught an exception while rendering: u'admin' is not a registered namespace
2 comments Created 2 months ago by anhtranTemplateSyntaxError at /admin/cms/page/1/edit-plugin/7/
Caught an exception while rendering: u'admin' is not a registered namespaceEvery time I try to access the plugins were added as the error.
Please give me a help. Thanks a lot !Comments
-
1 comment Created 2 months ago by digi604CMS_APPLICATIONS_URLS should still work if one entry is removedbugxIf you remove one entry from the settings but there is still the same entry in the database you get errors:
TemplateSyntaxError: Caught an exception while rendering: No module named fast_registration.urls
Comments
-
2 comments Created 2 months ago by pcicmanFix tests and make them working for all future releases - no commits without working testsbugx -
7 comments Created 2 months ago by BlizzTheShowBreadcrumbs / Nav don't work correctly with apphooks and extenders on the same pagebugxHi,
I tried to setup django-messages with cms-2.0.
I created a Navigation extender for the messages app with 4 entries (inbox, compose, trash & outbox). After that i created a page with the extended navigation and django-messages as application. I didn't include the messages.urls in the project urls.py file. Now the Navigation works fine but the breadcrumbs don't show the 4 extended navigation entries under messages.
if i create the page in the root level, include messages.urls in the project urls.py file and don't set messages as application, it works just fine.
So it just works if application ist not set.
But i don't think that this is the intended behaviour.
Django: v1.1
Python: v2.6
CMS: checked out last weekendCheers
Comments
is the correct menu item "selected" and only the breadcrumb not displaying correctly?
you have a menu extender and an apphook (cms_application_urls)?Also after setting the messages application... did you restart the server? the url patterns are cached.
BlizzTheShow
Thu Oct 08 13:12:48 -0700 2009
| link
I've the following:
settings.py:
CMS_APPLICATIONS_URLS = ( ('messages.urls', gettext('Messages')), ) CMS_NAVIGATION_EXTENDERS = ( ('messages.menu_extender.get_nodes', gettext('Messages')), )menu_extender.py:
def get_nodes(request): res = [] # result list n = NavigationNode(_('Inbox'), reverse('messages_inbox')) res.append(n) n = NavigationNode(_('Outbox'), reverse('messages_outbox')) res.append(n) n = NavigationNode(_('Compose'), reverse('messages_compose')) res.append(n) n = NavigationNode(_('Trash'), reverse('messages_trash')) res.append(n) return resI get the following Navigation wit the page "Messages" with menu and app set.
Messages -> Inbox -> Outbox -> Compose -> TrashIf i select Messages the Breadcrumbs are: "Messages"
if i select Inbox or one of the other 3, the Breadcrumbs are still "Messages" but it should be "Messages -> Inbox"The Navigation links work fine. They show the right content for all Navigation entries.
And i did restart the server!
in the navigation.... if you use the default menu.html which menu entry has the class "selected" if you select Inbox?
BlizzTheShow
Fri Oct 09 01:10:45 -0700 2009
| link
The resulting menu after selecting Inbox:
<ul> <li class="sibling"><a href="/de/">start</a></li> <li class="selectedancestor"><a href="/de/messages/">messages</a> <ul> <li class="selecteddescendant"><a href="/de/test/inbox/">Inbox</a></li> <li class="sibling"><a href="/de/test/outbox/">Outbox</a></li> <li class="sibling"><a href="/de/test/compose/">Compose</a></li> <li class="sibling"><a href="/de/test/trash/">Trash</a></li> </ul> </li> </ul>The breadcrumbs:
<ul> <li><a href="/de/">start »</a></li> <li><a href="/de/messages/">messages</a></li> </ul>I can confirm this, I actually wrote my own pluggable app for the CMS (a news app)
I quickly pushed it to bitbucket: http://bitbucket.org/MrOxiMoron/news/overview/
-
2 comments Created 2 months ago by bzedcms/signals.py: post_save_page called twice when sitemaps are enabledbugxEnabling sitemaps results in a second call to post_save_page, which will fail as instance.old_page was deleted during the first run.
Environment: Request Method: POST Request URL: http://127.0.0.1:8000/admin/cms/page/add/?language=en& Django Version: 1.1 Python Version: 2.5.4 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', 'django.contrib.sites', 'cms', 'publisher', 'cms.plugins.file', 'cms.plugins.flash', 'cms.plugins.googlemap', 'cms.plugins.link', 'cms.plugins.picture', 'cms.plugins.snippet', 'cms.plugins.teaser', 'cms.plugins.text', 'cms.plugins.twitter', 'cms.plugins.video', 'mptt', 'reversion', 'debug_toolbar'] Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.http.ConditionalGetMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', 'cms.middleware.user.CurrentUserMiddleware', 'cms.middleware.page.CurrentPageMiddleware', 'cms.middleware.multilingual.MultilingualURLMiddleware') Traceback: File "/home/bzed/workspace/foobar/website/website/django/core/handlers/base.py" in get_response 92. response = callback(request, *callback_args, **callback_kwargs) File "/home/bzed/workspace/foobar/website/website/django/contrib/admin/options.py" in wrapper 226. return self.admin_site.admin_view(view)(*args, **kwargs) File "/home/bzed/workspace/foobar/website/website/django/views/decorators/cache.py" in _wrapped_view_func 44. response = view_func(request, *args, **kwargs) File "/home/bzed/workspace/foobar/website/website/django/contrib/admin/sites.py" in inner 186. return view(request, *args, **kwargs) File "/home/bzed/workspace/foobar/website/website/cms/admin/pageadmin.py" in add_view 474. return super(PageAdmin, self).add_view(request, form_url, extra_context) File "/home/bzed/workspace/foobar/website/website/django/db/transaction.py" in _commit_on_success 240. res = func(*args, **kw) File "/home/bzed/workspace/foobar/website/website/reversion/revisions.py" in _create_on_success 304. result = func(*args, **kwargs) File "/home/bzed/workspace/foobar/website/website/django/db/transaction.py" in _commit_on_success 240. res = func(*args, **kw) File "/home/bzed/workspace/foobar/website/website/django/contrib/admin/options.py" in add_view 734. self.save_model(request, new_object, form, change=False) File "/home/bzed/workspace/foobar/website/website/cms/admin/pageadmin.py" in save_model 259. obj.save(force_with_moderation=force_with_moderation) File "/home/bzed/workspace/foobar/website/website/cms/models/pagemodel.py" in save 289. super(Page, self).save() File "/home/bzed/workspace/foobar/website/website/django/db/models/base.py" in save 410. self.save_base(force_insert=force_insert, force_update=force_update) File "/home/bzed/workspace/foobar/website/website/publisher/models.py" in save_base 59. ret = super(Publisher, self).save_base(*args, **kwargs) File "/home/bzed/workspace/foobar/website/website/django/db/models/base.py" in save_base 506. created=(not record_exists), raw=raw) File "/home/bzed/workspace/foobar/website/website/django/dispatch/dispatcher.py" in send 166. response = receiver(signal=self, sender=sender, **named) File "/home/bzed/workspace/foobar/website/website/cms/signals.py" in post_save_page 195. old_page = instance.old_page Exception Type: AttributeError at /admin/cms/page/add/ Exception Value: 'Page' object has no attribute 'old_page'
Comments
-
Plugin insertion into Text was working as of
http://github.com/digi604/django-cms-2.0/commit/f4106d27302e84801ce21...,
but broke at some point during pcicman's commits on September 30. The first one stopped the "insert" button from working altogether, though latter ones fixed this. After clicking 'save'
on the plugin popup using current master, no object is inserted into
wymeditor. Reverting to the aforementioned commit solves the problem. I've
only tested using Firefox 3.0.14.Comments
-
I have had this issue since django-cms2.0 was on subversion. I've not reported it before... mostly because I've been in a rush and hacked a solution.
Anyway, when editing a plugin in the admin I get this error;
NoReverseMatch: u'admin' is not a registered namespaceThe problem I've found is in the template;
cms/templates/admin/cms/page/plugin_change_form.htmlMy nasty hack is to replace line 5 (below) and manually enter the address /media/jsi18n/
I've no idea why I get the error on this one template.
Following is the full traceback I get via email.
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/core/handlers/base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/contrib/admin/sites.py", line 490, in root return self.model_page(request, *url.split('/', 2))
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/views/decorators/cache.py", line 44, in _wrapped_view_func response = view_func(request, *args, **kwargs)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/contrib/admin/sites.py", line 509, in model_page return admin_obj(request, rest_of_url)
File "/home/pmax/pmax/../external/cms/admin/pageadmin.py", line 152, in call return edit_plugin(request, plugin_id, self.admin_site)
File "/home/pmax/pmax/../external/reversion/revisions.py", line 304, in _create_on_success result = func(*args, **kwargs)
File "/home/pmax/pmax/../external/cms/admin/views.py", line 144, in edit_plugin response = admin.add_view(request)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/db/transaction.py", line 240, in _commit_on_success res = func(*args, **kw)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/contrib/admin/options.py", line 784, in add_view return self.render_change_form(request, context, form_url=form_url, add=True)
File "/home/pmax/pmax/../external/cms/plugin_base.py", line 75, in render_change_form return super(CMSPluginBase, self).render_change_form(request, context, add, change, form_url, obj)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/contrib/admin/options.py", line 590, in render_change_form ], context, context_instance=context_instance)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/shortcuts/init.py", line 20, in render_to_response return HttpResponse(loader.render_to_string(*args, kwargs), httpresponse_kwargs)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/loader.py", line 108, in render_to_string return t.render(context_instance)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 178, in render return self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 779, in render bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 792, in render_node return node.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/loader_tags.py", line 97, in render return compiled_parent.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 178, in render return self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 779, in render bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 792, in render_node return node.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/loader_tags.py", line 97, in render return compiled_parent.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 178, in render return self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 779, in render bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 792, in render_node return node.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/loader_tags.py", line 97, in render return compiled_parent.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 178, in render return self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 779, in render bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 792, in render_node return node.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/loader_tags.py", line 24, in render result = self.nodelist.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 779, in render bits.append(self.render_node(node, context))
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/init.py", line 792, in render_node return node.render(context)
File "/usr/lib/python2.4/site-packages/Django-1.1-py2.4.egg/django/template/defaulttags.py", line 382, in render raise e
NoReverseMatch: u'admin' is not a registered namespace
<ModPythonRequest
path:/admin/cms/page/1/edit-plugin/1/,
GET:<QueryDict: {}>,
POST:<QueryDict: {}>,
COOKIES:{'sessionid': '45aa'},
META:{'AUTH_TYPE': 'Basic',
'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_AUTHORIZATION': 'Basic ###', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'sessionid=45aa', 'HTTP_HOST': '###', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': '###/admin/cms/page/1/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20090910 Ubuntu/9.04 (jaunty) Shiretoko/3.5.3 GTB6', 'PATH_INFO': u'/admin/cms/page/1/edit-plugin/1/', 'PATH_TRANSLATED': None, 'QUERY_STRING': None, 'REMOTE_ADDR': '84.19.###.###', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': '###', 'REQUEST_METHOD': 'GET', 'SCRIPT_NAME': '', 'SERVER_NAME': '###', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}>Comments
-
4 comments Created 2 months ago by philippboschRequestContext should be used in get_placeholders()bugxWhen editing a page in the admin, the corresponding template file is parsed for placeholders. When this happens in http://github.com/digi604/django-cms-2.0/blob/master/cms/admin/utils.py#L17, a regular django.template.Context instances is used. But when the same page is rendered on the website, a django.template.RequestContext instances is used in http://github.com/digi604/django-cms-2.0/blob/master/cms/utils/init.py#L34. This may lead to different results. In my case I use django-css to compress CSS files. But when I try to edit a cms page in the admin, django-css complains because it checks if the CSS file location("{{MEDIA_URL}}css/file.css") starts with the value MEDIA_URL. This fails if the template is not rendered with a RequestContext.
Looking at the code of get_placeholders() it seems to me that a RequestContext instance may once have been used there because it's commented out in favour of a regular Context.
Comments
the comments say that it was not used because RequestContext eats User Messages...
philippbosch
Mon Oct 05 06:23:33 -0700 2009
| link
Hm. That's true. Any idea how to deal with that problem? Currently I use something like
{% if MEDIA_URL %} <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/file.css" /> {% endif %}
in my template, but that's ugly.
philippbosch
Tue Oct 06 02:21:58 -0700 2009
| link
Thanks!! :)
-
1 comment Created 2 months ago by tehfinkMultilingualURLMiddleware only changes urls of <a> and <form> tagsbugxwhen a view inside an app attached to a cms page calls:
HttpResponseRedirect(reverse('sent'))and the sent url is:
url(r'^sent/$', direct_to_template, { 'template': 'contact/sent.html' }, name = 'sent'),the actual URL goes from:
/en/about/contact/to:
/about/contact/sent/Comments
-
Adding plugins to my settings results in:
No module named plugins.
cms is on my Python path.
This also results in an import error:
import cms.plugins.textComments
what happens if you make the following:
python
import cms.plugins
?
adamboduch
Mon Oct 05 06:52:52 -0700 2009
| link
Traceback (most recent call last):
File "", line 1, in File "/usr/local/lib/python2.6/dist-packages/django_cms-2.0.0.alpha-py2.6.egg/cms/init.py", line 5, inimport signalsFile "/usr/local/lib/python2.6/dist-packages/django_cms-2.0.0.alpha-py2.6.egg/cms/signals.py", line 1, in
from django.db.models import signalsFile "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-py2.6.egg/django/db/init.py", line 9, in
if not settings.DATABASE_ENGINE:File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-py2.6.egg/django/conf/init.py", line 28, in getattr
self._import_settings()File "/usr/local/lib/python2.6/dist-packages/Django-1.0.2_final-py2.6.egg/django/conf/init.py", line 57, in _import_settings
raise ImportError("Settings cannot be imported, because environment variable %s is undefined." % ENVIRONMENT_VARIABLE)ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
before python, write:
export DJANGO_SETTINGS_MODULE = settings (if settings is inside a project: project.settings)
adamboduch
Mon Oct 05 07:01:08 -0700 2009
| link
ImportError: No module named plugins
-
3 comments Created 2 months ago by patcollbugx'thread._local' object has no attribute 'user'unsurexGetting this strange error with a fresh install and trying to create the first page:
Exception Value: 'thread._local' object has no attribute 'user' Exception Location: /path/to/django-cms/cms/models/pagemodel.py in save, line 281Running Django trunk and Cms master.
Comments
-
4 comments Created 2 months ago by heiho1bugxTypeError adding a plugin to place holder in adminunsurexFor trunk id: 28911b4
If I am in the admin and choose a plugin and click the + to add the plugin to a placeholder, I get the following error:
Traceback (most recent call last):
File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/core/servers/basehttp.py", line 651, in callreturn self.application(environ, start_response)File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/core/handlers/wsgi.py", line 241, in call
response = self.get_response(request)File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/core/handlers/base.py", line 134, in get_response
return self.handle_uncaught_exception(request, resolver, exc_info)File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/core/handlers/base.py", line 154, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/core/handlers/base.py", line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/views/decorators/cache.py", line 45, in _wrapped_view_func
add_never_cache_headers(response)File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/utils/cache.py", line 119, in add_never_cache_headers
patch_response_headers(response, cache_timeout=-1)File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/utils/cache.py", line 108, in patch_response_headers
response['ETag'] = '"%s"' % md5_constructor(response.content).hexdigest()File "/Users/mdizon/dev/specialtyfoods/sf-env/lib/python2.5/site-packages/django/http/init.py", line 365, in _get_content
return smart_str(''.join(self._container), self._charset)TypeError: sequence item 0: expected string, proxy found
Comments
Somehow daniele had the same problem and he had forgotten to update the media folder. Be sure to update the media folder on your static file path from cms/media.
digi604, i'll be testing on trunk next week, we had to finish some plugins as a first priority.
-
1 comment Created 2 months ago by digi604feature requestxshow a message in admin if the media files are not loadedusabilityx -
3 comments Created 2 months ago by dgrantfeature requestxShouldn't the example site just work?usabilityxI change the db settings in settings.py and run ./manage.py syncdb and then ./manage.py migrate, then ./manage.py runserver. I go to http://127.0.0.1:8000 and I get:
CMS: No page found for site example.com
Comments
you need to add a page in the admin first. We could fix this with fixtures. And we we probably will add some fixtures as soon as "south" supports fixture migrations
an other possibility would be to display a welcome screen
-
4 comments Created 2 months ago by DrMeerscms.admin.utils.get_placeholders does not handle template inheritance correctlybugxOriginally posted here http://groups.google.com/group/django-cms/browse_thread/thread/b0b3a2b052e88119 but received no response.
It is my opinion that the recursive template node traversal technique currently employed in cms.admin.utils is fatally flawed. It does not use the same inheritance rules as Django, and will therefore occasionally produce different results. For example:
index.html:
{% block content %} {% placeholder "body" %} {% endblock %}other.html:
{% extends "index.html" %} {% block content %} {% placeholder "one" %} {% placeholder "two" %} {% endblock %}Django will render "other.html" with just two placeholders ("one" and "two"), whereas the current get_placeholders implementation will produce an additional "body" placeholder in the admin interface, much to the confusion of the user when they try to place content in it!
I propose adopting an approach which utilises Django's own rendering algorithm. Here is a basic proof-of-concept patch: http://dpaste.com/hold/99608/
It would have been nicer if updating variables in the context dictionary modified the original argument, but this did not appear to work when I tried, so resorted to regex.Criticisms/suggestions welcome.
(Patrick, I've not committed this yet, will wait on feedback.)
Comments
-
Comments
-
3 comments Created 2 months ago by digi604apphook on home children not working correctlybugxComments
if a child of the "home" page has an apphook it does not match the url because the home slug is not cut from the url
closed by b9fad17, apphook on children of home or on home should work now
philippbosch
Wed Oct 14 02:06:52 -0700 2009
| link
Is that really fixed? For me apphooks on the home page still do not work. The normal page just shows up. The same apphook on another page works fine.
-
1 comment Created 2 months ago by tvonProblems removing MultilingualURLMiddlewarebugxWith cms.middleware.multilingual.MultilingualURLMiddleware, everything works as it should, loading http://localhost:8000/home/ will load that page without redirecting or doing anything apparently funky.
Without cms.middleware.multilingual.MultilingualURLMiddleware, http://localhost:8000/home/ will redirect to http://localhost:8000/en-us/home/ which will in turn result in a 404.
Willing to test, just let me know what to try.
Comments
-
i tried to upload an image picture plugin in text area but not save it
Comments
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 279, in runself.finish_response()File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 318, in finish_response
self.write(data)File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 397, in write
self.send_headers()File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 461, in send_headers
self.send_preamble()File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 379, in send_preamble
'Date: %s\r\n' % http_date()File "/usr/lib/python2.6/socket.py", line 297, in write
self.flush()File "/usr/lib/python2.6/socket.py", line 284, in flush
self._sock.sendall(buffer)error: [Errno 32] Broken pipe
this seams not to be a problem of cms but of django. how big is this picture?
the problem isnt the picture, because whit the previous version its ok
i tested here without problems. does it work with file plugin? django version? python version?
yeah with the file plugin its ok, python 2.6, django 1.0.2. but dont produce error, simply dont save it
-
1 comment Created 2 months ago by fivethreeocmsplugin table naming broken in python 2.4bugx -
$ ./manage.py migrate --fake /var/lib/python-support/python2.6/MySQLdb/__init__.py:34: DeprecationWarning: the sets module is deprecated from sets import ImmutableSet While loading migration 'cms.0023_plugin_table_naming_function_changed': Traceback (most recent call last): File "./manage.py", line 13, in execute_manager(settings) File "/home/david/svn/django_trunk/django/core/management/__init__.py", line 439, in execute_manager utility.execute() File "/home/david/svn/django_trunk/django/core/management/__init__.py", line 380, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/david/svn/django_trunk/django/core/management/base.py", line 195, in run_from_argv self.execute(*args, **options.__dict__) File "/home/david/svn/django_trunk/django/core/management/base.py", line 222, in execute output = self.handle(*args, **options) File "/home/david/svn/south/south/management/commands/migrate.py", line 86, in handle skip = skip, File "/home/david/svn/south/south/migration.py", line 397, in migrate_app tree = dependency_tree() File "/home/david/svn/south/south/migration.py", line 105, in dependency_tree tree = all_migrations() File "/home/david/svn/south/south/migration.py", line 100, in all_migrations for app in get_migrated_apps() File "/home/david/svn/south/south/migration.py", line 84, in get_migration migclass.orm = FakeORM(migclass, get_app_name(app)) File "/home/david/svn/south/south/orm.py", line 65, in __init__ self.retry_failed_fields() File "/home/david/svn/south/south/orm.py", line 244, in retry_failed_fields fname, modelname, e ValueError: Cannot successfully create field 'domain' for model 'site': name 'django' is not defined.I get this error whether I run ./migrate.py --fake after doing a syncdb with south disabled, or when running ./migrate.py after doing syncdb with south enabled. I'm tried mysql and sqlite. I've tried django 1.1 branch and trunk. I'm using south trunk and django-cms-2.0 trunk.
Comments












http://github.com/dstufft/django-cms-2.0/commit/8d7c5132c5a69fb03109f8d90a4246e6836483b5
I believe i have this fixed.
closed in master