forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Aeronautic on September 21, 2006, 04:47:14 am

Title: Template error after album move (and delete) into new category
Post by: Aeronautic on September 21, 2006, 04:47:14 am
I did some "remodeling" and moved some albums while deleting others.

I've noticed the search engines are still sending traffic to the old album urls which are resulting in errors like this one for this url:

http://www.aeronauticpictures.com/royalty-free-stock-footage/thumbnails.php?album=1

Code: [Select]
Template error
Failed to find block 'log_ecards'(#(<!-- BEGIN log_ecards -->)(.*?)(<!-- END log_ecards -->)#s) in :

                <div align="center">
                <table cellpadding="0" cellspacing="1">

<snipped rest - can see at above url>


I tried setting up a 301 redirect in .htaccess but that did not work. Did search these boards before posting. Ideas? Solutions?

Live site: http://www.aeronauticpictures.com/royalty-free-stock-footage/

I had started this gallery thinking I could post these discs as single images with single Quicktime files in albums of the same subject (i.e., album of all aerials, poster image of available disc and single QT movie on click).

Instead I've now got the categories, sub-cats and albums are now = full contents of these discs. So lots of stuff got deleted or moved...

Thanks!
Title: Re: Template error after album move (and delete) into new category
Post by: eruss on September 21, 2006, 05:21:51 am
If an album is deleted through the Admin interface, you should get an error that reads "The selected album/file does not exist !" and is surrounded by your theme (with menu buttons to click).

Did you delete the albums via FTP or via the Admin interface?
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 21, 2006, 05:31:36 am
Did you delete the albums via FTP or via the Admin interface?

Hi Eruss - thanks for the help.

Via album manager - select album - delete - confirm.

Quote
4.3.4 Deleting albums

    * Choose a category from the dropdown list
    * Click on the album you want to delete
    * Click the "Delete" button
    * Confirm the alert box with "OK" (Are you sure you want to delete this album ? All files and comments it contains will be lost !)
    * Click "Apply modifications"
    * After clicking to Apply Modification, confirm your intent in the alert box with &the quot;OK" (Are you sure you want to make these modifications ? button.)

That's what I did.

ALSO: Since that error calls itself a template error, although I did not mod the hardwired template much at all, I just switched to classic and tried that url again and it returned the exact same error.
Title: Re: Template error after album move (and delete) into new category
Post by: Sami on September 21, 2006, 06:29:15 am
Upgrade to most recent version (currently 1.4.9)
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 21, 2006, 07:18:53 am
Sami,

Thank you for the reply. I will do the upgrade. But is there any quick fix until I take care of the upgrade?

Thanks again!
Title: Re: Template error after album move (and delete) into new category
Post by: Sami on September 21, 2006, 07:24:29 am
Try to re-upload fresh copy of your theme
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 21, 2006, 07:34:42 am
I'll try that - but as noted above, I switched from Hardwired to Classic as a test. Same problem.

Again, thank you for the help.

Title: Re: Template error after album move (and delete) into new category
Post by: Sami on September 21, 2006, 07:41:12 am
Then it means that you've edited include/themes.inc.php which is not recommanded , in this case re-upload fresh copy of themes.inc.php
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 21, 2006, 08:05:28 am
Actually, I did not.

Just double checked and the file date is the same as the others in the /include directory (except as noted below) - and when I edit a file, I save the original (renamed) - nothing like that here.

Uploaded a fresh copy anyway in case the server copy got corrupted - no change.

I have edited:

/include/functions.inc.php (just uploaded original file - no change)

/themes/hardwired/template.html

/displayimage.php (for alt tags)

Hmmm.
Title: Re: Template error after album move (and delete) into new category
Post by: Sami on September 21, 2006, 02:09:17 pm
sorry but i'm out of any idea , maybe others can help you ...
Title: Re: Template error after album move (and delete) into new category
Post by: Nibbler on September 21, 2006, 11:07:29 pm
Enable debug mode.
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 22, 2006, 02:01:39 am
Nibbler - thanks.

I'm in the middle of many QT movie uploads at the moment, but will debug and post here.

I did turn it on before and hit that url. Got the same error - or page "result," with zero debug data.

In the immortal words of the Governator, I'll be back.

Sami - thank you too for the effort.

Okay - very strange - just tested the sample "old" url in first post (missing album). Logged in (as admin) and using Netscape/Mozilla, I got a normal "The selected album/file does not exist !"

I could live with that error as all the page navigation is intact.

So I tried it again (not logged in) in IE 6 and got the original "Template error" reported in first post.

Hmmm.

Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 24, 2006, 02:46:51 am
Is there a way for me to create these deleted album numbers again? Or does CPG only add new albums with increasing digits?

Title: Re: Template error after album move (and delete) into new category
Post by: Sami on September 24, 2006, 06:30:25 am
Is there a way for me to create these deleted album numbers again?
Yes there is you can create those album manualy by phpmyadmin

Does CPG only add new albums with increasing digits?
Yes if you using CPG interface to create an album it will increasing ...
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 24, 2006, 06:42:58 pm
Hi Sami,

Thanks for the reply. I looked at phpmyadmin last night while backing up the database/site.

It seems pretty straight forward but I did not want to mess with it until I saw a reply here. I just need to get into the albums table and add a record with the missing ids it seems.

It looks like once the table record is created with the ID, the rest of the modifications I can make from CPG, no?

Title: Re: Template error after album move (and delete) into new category
Post by: Sami on September 24, 2006, 06:53:48 pm
you MUST fill first 9 column (aid,title,visibility,uploads,comments,votes,pos,category,thumb) with info by phpmyadmin and then you can modify them with CPG
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 24, 2006, 06:56:52 pm
Thank you!

Glad I waited for your reply. This just may be a fix for this issue... I'll update the thread with the results.

Much appreciated.
Title: Re: Template error after album move (and delete) into new category
Post by: Sami on September 24, 2006, 07:05:10 pm
Please be carefull with that and first create a backup ...
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on September 24, 2006, 10:16:23 pm
Album 1 in - not pretty but better than the template error.

See original post for test.

Rest of the site still seems to be working too.

Have several more to go. I've been a bit puzzled by what is required and the options for the POS field. I'm going to increment them making sure there is no duplication in the category.

Edit: All in and all "seem" to be working. So far it looks like I did not break the site in any other way.

There is no reason not to "re-use" these albums now with new names - I take it?

Even though the SERPs will be wrong for a while at least folks will find content that looks like the site is working, not the old error message or new (but better!) empty album message.

Still not sure why the album deletion (from album admin, no less) resulted in such as nasty error, but it is a cautionary tale.

MODS: I think you can mark this solved. Would still like a little feedback on the POS issue and if I got it right - anything - as long as it is not duplicated in the album?

PS. I tweaked the language file a little bit to tell folks the file or album has moved and to click the Home menu link - hopefully that will keep them on the site.

Thanks for all the help!!!
Title: Re: Template error after album move (and delete) into new category
Post by: Aeronautic on October 02, 2006, 11:52:16 pm
Post script. Gallery now 1.4.9

While I've not "undone" any of the fixes outlined in this thread, the test url in the first post is working as desired so I managed not to break anything else in the process.