google-code-export / django-page-cms

Automatically exported from code.google.com/p/django-page-cms
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Unable to change page template in admin #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download django-page-cms
2. Run syncdb inside of the examples folder
3. Go to the admin and click to add a new page
4. Give the page a title and tag
5. Select a new template

What is the expected output?
The page should refresh with the new template fields loaded and the new
template name selected in the template drop-down.

What do you see instead?
The default template is loaded and the default template is still selected
in the template drop-down.

What version of the product are you using?
django-page-cms 1.0.6
django 1.1

On what operating system?
Mac 10.5.7

Please provide any additional information below.

I finally got this template issue resolved.  Turns out that
there a few lines of javascript that have been commented out; un-
commenting them fixed the issue.

File: media/pages/javascript/pages_form.js
Lines: 45 - 53
    // Select the appropriate template option
    // This code should go away soon
    var template = $.query.get('template');
    if (template) {
        $('#id_template option').each(function() {
            if (template == this.value) {
                $(this).attr('selected', true);
                return false;
            };
        });
    }; 

Original issue reported on code.google.com by ljernej...@gmail.com on 6 Aug 2009 at 3:04

GoogleCodeExporter commented 9 years ago
I can't reproduce this bug with Firefox and I have these lines commented. Can 
you
tell me which browser you are using?

Original comment by batiste....@gmail.com on 13 Aug 2009 at 4:57

GoogleCodeExporter commented 9 years ago
Sorry it has taken me so long... I've been really busy.

I am using Safari 4.0.3, and I am pretty sure that I was using Firefox 3.5 as 
well.  I will try to download the demo 
again (start fresh) later this week and give it another go.

Original comment by ljernej...@gmail.com on 17 Aug 2009 at 2:03

GoogleCodeExporter commented 9 years ago
For what it's worth, I couldn't reproduce this with my 1.0.6 install using 
chrome or 
firefox. Worked for me.

Original comment by winhamwr on 17 Aug 2009 at 3:00

GoogleCodeExporter commented 9 years ago

Original comment by batiste....@gmail.com on 18 Aug 2009 at 2:51

GoogleCodeExporter commented 9 years ago
I just installed this again into a production environment and it is still doing 
the same thing.  I did a fresh SVN 
last night:

URL: http://django-page-cms.googlecode.com/svn/trunk
Repository Root: http://django-page-cms.googlecode.com/svn
Repository UUID: 439a9e5f-3f3e-0410-bc46-71226ad0111b
Revision: 652
Node Kind: directory
Schedule: normal
Last Changed Author: batiste.bieler
Last Changed Rev: 652
Last Changed Date: 2009-08-21 17:44:30 +0000 (Fri, 21 Aug 2009)

I have tested it in Safari 4 (mac), Firefox 2.0 (windows), and Firefox 3.5 (mac 
& windows) and it is the same in 
all of them.

I notice that this has been labeled as fix.  Were you able to replicate this?  
If so, have the changes been 
merged?

Original comment by ljernej...@gmail.com on 24 Aug 2009 at 2:44

GoogleCodeExporter commented 9 years ago
@batiste

Now that I have it up on a productions site, I can set you up a username and 
password if you would like to take a 
look at it.  Just let me know if it would be helpful.

Also, I just tried it in chrome 2.0 (windows) and no luck there either.  It 
just will not let me select any template 
except the default.

Original comment by ljernej...@gmail.com on 24 Aug 2009 at 2:53