Can't configure while using my theme

mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Mon, 2007-01-01 15:09

Hi,
I've created a theme (back for G2.0.x) based on classic, which I use on my site. I have one problem with it, though.

When my theme is selected as the default theme, the admin interface is shown using my theme. In that case, I can't configure the blocks displayed. Clicking on a block does not open the inline configuration; firefox's error console shows:

Error: returnElement has no properties
Source File: http://mikeage.net/content/gallery-codebase/lib/javascript/BlockSelectWidget.js?1
Line: 519

If I switch the default theme to classic, then I can change whatever I need, and the changes go into effect. After that, I can switch back to my theme as the default, and everything works just fine.

Any ideas?

I'm running G2.2RC1 now, but this happened with 2.1.2 as well.

Gallery URL (optional): http://mikeage.net/content/gallery/ (multisite)
Gallery version: 2.2RC1
Webserver (with version): Apache 1.3.37
Datatabase (with version): MySQL 5.0.27
PHP version (eg 4.2.1): 4.4.4
Operating system: XP
Web browser/version: Firefox 2.0.0.1

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2007-01-01 18:26

You could make the default theme a stock theme so that the admin inteface works. Then configure all other albums to use your theme that does not work. But I guess you tried that and found the the dynamic albums will not use your custom theme.

I had a custom theme that did something similar ( dont recall how I fixed or if I fixed it )

Dave
_____________________________________________
Blog & G2 || floridave @ Gallery Team || G2 Theme Contest: +$3k in Prizes!

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Mon, 2007-01-01 18:40

Right now, I leave my theme as the default (for the dynamic albums, and for any new albums), and just switch it if I need to configure a block. It works, but it's an ugly solution.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2007-01-01 18:50

Can you post your theme? I am no Javascript expert but I suspect that your theme has a JS error as you reported.

Dave
_____________________________________________
Blog & G2 || floridave @ Gallery Team || G2 Theme Contest: +$3k in Prizes!

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Mon, 2007-01-01 19:01

See http://mikeage.net/content/gallery-codebase/themes/mikeage/

It includes the JS from Lightbox JS 2.0... I wonder if that could have something to do with it.

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Tue, 2007-01-02 09:38

Ok, found where the problem is (I think). Lightbox includes prototype.js, which is acausing the problems. If I remove that, everything works great.

Now to figure out why...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2007-01-02 16:40

Can you zip it up? I don't want to download each file one at a time to see the error.

Dave
_____________________________________________
Blog & G2 || floridave @ Gallery Team || G2 Theme Contest: +$3k in Prizes!

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Tue, 2007-01-02 18:16

I can reproduce the problem simply by adding prototype.js (from mikeage.net/common/lightbox) to any theme.

Unfortuntely, prototype.js is already the latest version (1.4 - from prototype.conio.net), and Lightbox JS 2.0 requires it.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2007-01-03 02:16

I added the js file from prototype.conio.net and then addedthe code:
<script type="text/javascript" src="{g->theme url="prototype.js"}"></script> just before the close head of matrix theme and get no error. (g2.2rc1)

Dave
_____________________________________________
Blog & G2 || floridave @ Gallery Team || G2 Theme Contest: +$3k in Prizes!

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Wed, 2007-01-03 04:52

I didn't try matrix -- just classic and some classic derived themes.

 
gwmbox

Joined: 2007-05-08
Posts: 38
Posted: Sun, 2007-06-03 03:17

Was there a fix for this, I have the same issue?

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Sun, 2007-06-03 03:46

I haven't found a fix, but the workaround is to temporarily change the default theme.