Coppermine Error: Template Error (using 1.5.22) Coppermine Error: Template Error (using 1.5.22)
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Coppermine Error: Template Error (using 1.5.22)

Started by Manutjee, April 08, 2013, 07:53:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Manutjee

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;

(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fi47.tinypic.com%2F344sadc.png&hash=02770acb7f2f67e19ba709303ff6fea20a0b57ab)

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:

QuoteTemplate 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

phill104

Which the rare you using and can we have a link please.
It is a mistake to think you can solve any major problems just with potatoes.

Manutjee

Which what? Don't know what you mean by "rare".
Link to my gallery is www.vpd-central.com/gallery

phill104

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?
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

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

Manutjee

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.

Quote from: 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?

Same error.

Quote from: Α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.

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.

Manutjee

Update: Did not work, I also get the error now when I want to search for new images at the batch-add...

Αndré

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?

Manutjee

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

phill104

Please attach your file as a zip directly in these forums, not as a rar to an external site please.
It is a mistake to think you can solve any major problems just with potatoes.

Manutjee

I previously couldn't, but now I can for some reason, so here goes...

Password: cpg

Αndré

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?

Manutjee

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.  :)

Manutjee

I was wrong, it isn't.

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


Αndré

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.

Αndré

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:
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();
}

Manutjee

Again, a late reply, but the issue is solved! Thanks for the help!

Αndré

Quote from: Joachim Müller on September 28, 2008, 12:46:26 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.