forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 upload => Topic started by: Manutjee on April 08, 2013, 07:53:25 pm

Title: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on April 08, 2013, 07:53:25 pm
Hi there,

I've just found the forums, and I really want to have this issue solved. Since a week or a week and a half, I am experiencing issues when it comes to batch-adding files. Every time I try to add photo's, I'm getting this template error;

(http://i47.tinypic.com/344sadc.png)

And no matter what I do, I can't solve it. I thought it was because I was using an older version (1.5.20) which is the reason I decided to upgrade to the latest version, but still no luck in solving this. Also searched on this forum, and came across this: http://forum.coppermine-gallery.net/index.php?topic=26897.0 but I have no clue to what I actually need to do to solve it. I am currently not using a costumized theme, I am currently using the waterdrop theme (default). I tried running the update.php script, but then I just receive plain tekst with this:

Quote
Template error
Failed to find block 'file_line' (#<!-- BEGIN file_line -->(.*?)<!-- END file_line -->#s) in :
                    <div class="{CSS_CLASS}">
                        <h2>{HEADER_TXT}</h2>
                        <span class="cpg_user_message">{MESSAGE}</span>


                        <br /><br />
                    </div>

I have also tried to repair the tables, which succeeded according to the admin panel, but still no luck.
Never had those issues before, and I have no clue on what it could be. I'm not a computer nerd, so I might not understand everything very well, I also am Dutch.
Hope someone can help me with this.

Oh, and plus... I've been using coppermine of three of my sites, and only one is having that issue. All are running on the 1.5x versions.

Screenshots:
This happens after running update.php:
http://www.imagebam.com/image/597f1b247807671

All the errors:
http://www.imagebam.com/image/fdbe42247807678
http://www.imagebam.com/image/501b9d247807675
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Phill Luckhurst on April 08, 2013, 08:34:49 pm
Which the rare you using and can we have a link please.
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on April 09, 2013, 02:09:19 pm
Which what? Don't know what you mean by "rare".
Link to my gallery is www.vpd-central.com/gallery
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Phill Luckhurst on April 09, 2013, 02:44:38 pm
Sorry about the "rare", that should have been "theme" but the blooming iPad altered it.

Does it work if you use the curve theme instead or do you get the same error?
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Αndré on April 09, 2013, 03:11:21 pm
Please re-upload the file include/themes.inc.php from the official Coppermine package. I assume it got corrupted during upload.
Title: Re: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on May 01, 2013, 07:24:43 pm
First of all, I apologize for my late reply. I left the issue behind for awhile. Recently got into it again, and still not solved.

Sorry about the "rare", that should have been "theme" but the blooming iPad altered it.

Does it work if you use the curve theme instead or do you get the same error?

Same error.

Please re-upload the file include/themes.inc.php from the official Coppermine package. I assume it got corrupted during upload.

Will try!

Hope it's solved soon. Some people at my host's forum thought it was the watermark, but disabled that and still keep having the error.
Smaller batches; still not solved.
It really is getting annoying and I'm about to close my website for it, really. I really don't want that, 'cause I'm celebrating my two year online May, 8th.

But as mentioned above, will try! Thanks for the help so far, and I will let you know.
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on May 02, 2013, 02:44:30 pm
Update: Did not work, I also get the error now when I want to search for new images at the batch-add...
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Αndré on May 02, 2013, 04:13:00 pm
Please attach your whole theme as zip file to your next reply. I assume you've also tested with a core theme (e.g. curve or water-drop) after you re-uploaded the file?
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on May 05, 2013, 02:47:10 pm
Yes, I did. I've been batch-adding quite a few times since I re-uploaded that file, and as far as I can tell now, it works fine. But not sure...
Rar file: http://rapidshare.com/files/1317942195/vpdgallery_ID.rar
Password: cpg
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Phill Luckhurst on May 05, 2013, 06:38:52 pm
Please attach your file as a zip directly in these forums, not as a rar to an external site please.
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on May 06, 2013, 12:45:58 pm
I previously couldn't, but now I can for some reason, so here goes...

Password: cpg
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Αndré on May 06, 2013, 03:39:08 pm
No errors for me with this theme (tested simple upload form, flash uploader, batch-add). Please attach the file include/themes.inc.php as zip file to your next reply.

Additionally, do you have any Coppermine plugins enabled?
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on May 12, 2013, 10:36:13 pm
Again, a late reply, but it's solved! I apparantly didn't have the correct themes.inc.php file, but did what was said earlier, and it works! Thank you.  :)
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on May 12, 2013, 10:47:54 pm
I was wrong, it isn't.

Here's my themes.inc.php file @ the attachments.

Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Αndré on May 15, 2013, 04:59:50 pm
The only difference to the file from the Coppermine package is the EOL format (yours is Windows instead of Linux). I don't think this matters, but please replace it with the correct EOL format anyway, as I currently have no further ideas.
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Αndré on May 15, 2013, 05:05:24 pm
I just had a closer look at the error message. The block file_line is part of $template_cpg_die. It's only removed once, in the block theme_cpg_die. The error message should disappear by all means if your add the following code to your theme's theme.php file:
Code: [Select]
function theme_cpg_die($msg_code, $msg_text, $msg_string, $css_class = 'cpg_message_info', $error_file, $error_line, $output_buffer, $ob)
{
    global $CONFIG, $lang_cpg_die, $template_cpg_die;

    $params = array(
            '{MESSAGE}' => $msg_text,
            '{FILE_TXT}' => $lang_cpg_die['file'],
            '{FILE}' => $error_file,
            '{LINE_TXT}' => $lang_cpg_die['line'],
            '{LINE}' => $error_line,
            '{OUTPUT_BUFFER}' => $ob,
            '{HEADER_TXT}' => $msg_string,
            '{CSS_CLASS}' => $css_class,
    );

    if (!($CONFIG['debug_mode'] == 1 || ($CONFIG['debug_mode'] == 2 && GALLERY_ADMIN_MODE))) {
        //template_extract_block($template_cpg_die, 'file_line');
    }
    template_extract_block($template_cpg_die, 'output_buffer');

    pageheader($msg_string);
    echo "<!-- cpg_die -->";
    echo template_eval($template_cpg_die, $params);
    pagefooter();
}
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Manutjee on June 25, 2013, 03:39:21 pm
Again, a late reply, but the issue is solved! Thanks for the help!
Title: Re: Coppermine Error: Template Error (using 1.5.22)
Post by: Αndré on August 26, 2013, 12:08:10 pm
Resolve your threads
If you have found an answer to your question, resolve your thread. Don't just post "I have found the answer", but tell others what you actually did to solve your issues. Posting a link to the page where you found the answer might help. Describing what you did might help as well.