Possible Issue with Subalbums Development Rev 283

Tristan-

I downloaded the rev 283 from the subversion repository (which is very nifty BTW - I'm using TortoiseSVN) and installed it on my "sandbox" - http://www.thinkdreams.com/devzen.

After configuration of the files, I ran the setup.php for the DB setup, and got a 500 internal error message.

I checked the htaccess file against my working copy, and found that this line (in the rev 283):

RewriteRule ^page/([A-Za-z0-9-_]+)/?$ index.php?p=$1 [L,QSA]

is different in my working copy (1.0.3):

RewriteRule ^page/([A-Za-z0-9]+)/?$ index.php?p=$1 [L,QSA]

So I copied the entire htaccess file from my working copy to my dev copy, and changed, the rewrite base, and it works fine now.

Just wanted to let you know in case I discovered a possible bug.

Comments

  • trisweb Administrator
    Yes, perhaps the underscore shouldn't be where it is? That's the only difference I see... I didn't think the underscore wass a reserved character in regular expressions but I'll check it out.

    I assume you've also figured out that sub-albums don't work with mod_rewrite yet? Try it without, it's pretty slick.
  • Yup. I just figured that out. It does work pretty good. Is there anything else to look out for in the code, or is subalbums the major change at this point in the revisions?

    I like it so far. I can't wait to see what you'll do with the admin interface for subalbums. I'm trying to envision how that might work, but I just can't get my brain around it....
  • I did notice with mod_rewrite on, I get a silly %2F in between the album name and the subalbum name. And a 404 error. Let me know if you want me to be a guinea pig for things in your revisions. I'm trying to keep a dev sandbox going with the latest code changes from now on. That way you'll have another separate server to try stuff with.
  • fyi.. working pretty good on IIS so far also.. I have updated regularly and so far soo good..

    http://beta.chilifrei.net/sasvn/
  • trisweb Administrator
    Very cool, thanks! There are three major changes in the release that are pretty much great.

    First, big performance improvements from changes in the way the arrays are stored. Objects are now only instantiated when they are needed, when before, all objects were instantiated when the arrays of images/albums were filled. Very very big difference.

    Second, all of the database queries have been moved to a generalized PersistentObject class. It just has a set/get/load/save functions that work on any database table, so it should make it much easier to write new database functionality or add fields, etc. It also holds all updates until save() is called, whereas zenphoto used to update the database when anything was changed. Also a big performance improvement and well worth it.

    Third, of course, sub-albums. The code for them has been sitting forever, but it turns out a lot more had to be done. Garbage collection of the database is updated to recurse into SAs, indexing functions that use the database had to be changed to use only the current album level, and much more. It wasn't that hard though, as the current representation of an "album" as simply a folder name easily accommodated the idea of folder names with slashes in them ;-) It's actually quite elegant.

    %2F is the URL code for a slash: '/' so that's why it was in the mod_rewrite URL. Those are some simple rules -- I just need to modify the current ones to repeat slashed segments. I'll get around to it ;-)

    The admin interface.... it's going to be fun :-) I have a few ideas but I don't want to get carried away because I won't finish them in any timely manner. For now I think I'll just add it to the existing structure in a way that makes sense... then later really do a whole redesign of the interface. It needs it... it really is a slapped-together abomination afterthought (shhh, don't tell anyone ;-).

    Anyway, I'll be releasing the subalbums branch as 1.0.4 this week. It's absolutely stable enough to run non-sub-album themes without any negative effects ;-) Plus it's got bugfixes and performance improvements galore. I probably will not include the subalbum theme though :-)

    Woo, that was long. I hope somebody reads it...
  • just read it...
  • Groovy. Look forward to the new release. I'll see how it works with the few mods I've done and let you know if I see anything wonky.
Sign In or Register to comment.