Layout Bug?

rogermh

Joined: 2005-01-09
Posts: 102
Posted: Sun, 2005-01-09 03:47

I just installed the latest nightly. Everything worked without a hitch and I uploaded my first album. In "Site Admin", I've set my default layout to Matrix. When I "edit album" and go to the "Album" tab, the album is set to use the default layout (which should be Matrix). However, when I click on the "Layout" tab, it says "This album is configured to use the Classic layout" and when I view the album, it is the Classic layout.

If I specifically choose "Matrix layout" in the "Album" tab, everything is as it should be, but it should work the original way too - if the default is Matrix and the album is configured to use the default layout, the album should use the Matrix layout. Is this a bug or am I not understanding something properly?

Roger

----

Gallery URL (optional):
Gallery version: current.gallery2 from 01-08-2005 nightly
Webserver (with version): Apache 1.3.33
Database (with version): MySQL 3.23.53
PHP version (eg 4.2.1): 4.3.2
phpinfo URL (optional):
Graphics Toolkit(s): ImageMagick
Operating system: OS X 10.3.7
Web browser/version: Firefox 1.0

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-01-10 04:56

Hm. I tried reproducing this. Here's what I did:

  • Install the latest CVS from scratch
  • Log in
  • Go to the Site Admin -> Layouts page -> All Layouts tab
  • Activate the classic layout
  • Go back to the top of Gallery and click "add sub-album"
  • Enter "xx" as the album name
  • Click on the "Layout" tab and see that it's using the Matrix layout

Am I doing something wrong here? Any thoughts on how to reproduce this?[/]

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Mon, 2005-01-10 18:00

I've attached screenshots to make things clearer. You know what they say about pictures ... :) I've actually posted them in reverse order so that when you read them top to bottom, it makes sense.

Roger

Edit: For some reason, phpBB wasn't showing the .tif file even though it's an acceptable extension. I converted the pictures to .jpg and they now display properly.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-01-11 10:42

Ah ha!

I added a new feature a few days back that I forgot all about. See the first screenshot, on the 4th row it says:

"New Albums: Inherit these settings from parent album"

This means that the sub-album will take the settings from the parent album, instead of using the global defaults. Can you verify that the parent album of the one you just created has the Classic layout?

Toggle that setting and try again and it should work for you.

P.S. Great idea posting screen shots!

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Tue, 2005-01-11 16:58

Unfortunately, that's not the problem/solution. My highest level album is set to the default layout, which again in this case is matrix. In fact, all of my albums are set to the default layout.

What's even more strange is that the Classic layout is not even activated. I did activate it at one point just to play around with things, but after realizing this problem, I deactivated it.

Roger

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Tue, 2005-01-11 17:53

activate classic layout again and recheck your albums..
we don't currently handle deactivating layouts very well, so it is quite possible that some album is configured to use classic layout and it only shows you "Default layout" in the edit album view because the layout is deactivated.

 
rogermh

Joined: 2005-01-09
Posts: 102
Posted: Wed, 2005-01-12 07:30

Looks like that did the trick. There was, however, some weirdness. Here's what I did:

1. Activated Classic layout.
2. Noticed that the default layout was automatically changed by the software to Classic (it should have been Matrix). This may indicate that some value in the database is somehow not correctly corresponding with what is being displayed (WAG on my part).
3. Changed the default layout back to Matrix.
4. Viewed all albums (which were set to the default layer). They are now correctly using the Matrix layout. All is happy.
5. Deactivated Classic layout.
6. Viewed all albums again. They are still using the Matrix layout as they should. All is still happy.

So although that fixes the problem, it looks like something remains amiss in this area.

Roger

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-01-12 18:00

#2 is expected (not great, but expected based on the current code). Nothing was actually changed.. when you deactivated classic layout an album was set to use it.. that setting in the db did not change. when you view "edit album" for that album it loads the value "classic" and finds it isn't in the list of active layouts, so it has nothing to select in the select box.. thus the top item (default layout) comes up selected. When you reactivated classic layout then it finds the value it wants so classic comes up selected.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-01-13 08:00

Roger, would you file a bug about this at http://sf.net/projects/gallery for us? We need to do a pass through the layout code and fix a bunch of issues and I don't want this one to be forgotten. thanks!