forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: jlarsen10 on October 20, 2010, 12:21:12 am

Title: template error and critical error
Post by: jlarsen10 on October 20, 2010, 12:21:12 am
Using 1.419, cruising along fine. Then this past weekend I tried to login as admin as usual and "Template error "Failed to find block..." showed up after captcha. Never happened before. emails from users started coming in. Time to upgrade I guess. read all the docs, upgraded custom theme (per directions -"my-theme"), downloaded all of 1.5.8, read and followed all of the documents and procedures, read all the forums for solutions, uploaded 1.5.8  (did not overwrite "albums" or "anycontent.php" as stated, and loaded into the themes folder "my_theme" modified according to the 1.4x-1.5x rules), ran the "update.php", all looked well and cozy.  Now I can't access my admin page, config, login, etc. without either a "template" or "critical" error message. http://www.jefflarsen.com/gallery/index.php (http://www.jefflarsen.com/gallery/index.php).  All looked well in phpmyadmin. Locked out. 
Title: Re: template error and critical error
Post by: Jeff Bailey on October 20, 2010, 12:57:50 am
There is still something wrong with your custom theme
Quote
Template error
Failed to find block 'contact' (#<!-- BEGIN contact -->(.*?)<!-- END contact -->#s) in :
looks like you edited out the code for a contact button in the menu.

http://www.jefflarsen.com/gallery/login.php?theme=curve works.
use http://www.jefflarsen.com/gallery/login.php?theme=xxx to go back to your custom theme.

Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 01:10:21 am
thanks Jeff. sorry, tried both..neither link works. still get "template error..."  Tinkering with "my_theme" template edit now.
Title: Re: template error and critical error
Post by: Brooklyn on October 20, 2010, 01:29:34 am
You might want to log into phpMyAdmin and enable debug mode. Then, create a non-admin test account and provide those details, again, via phpMyAdmin.

http://www.jefflarsen.com/gallery/themes/my_theme/

Quote
Index of /gallery/themes/my_theme

    * Parent Directory
    * .wysiwygPro_edit_708f92ebeb538db90b0e25f9157e9d2e.php
    * .wysiwygPro_preview_708f92ebeb538db90b0e25f9157e9d2e.php
    * images/
    * style.css
    * template.html
    * theme.php

Apache mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.jefflarsen.com Port 80

You might want to use a plain text editor instead of a WYSIWYG editor. And remove those extra files that are not part of Coppermine.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 01:34:48 am
Thanks..I've moved to a plain text editor..I'll head for the debug mode.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 01:58:51 am
"Choose the option "Admin only" when troubleshooting on your own - debug output will be only visible when you're logged in as admin, regular users or guests won't see the debug output." Found this in the coppermine docs.  I can't  login as the admin. I basically can't access any page in the gallery.  I activated debug in my phpadmin..now what? Sorry, but this is really confusing for a photographer. 

Title: Re: template error and critical error
Post by: Jeff Bailey on October 20, 2010, 02:15:48 am
attach your template.html and theme.php with .txt extensions.

to enable debug mode read => http://documentation.coppermine-gallery.net/en/errors.htm#errors_debug_mode_manual
debug mode wasn't turned on when I accessed your page. Though I really don't see why you need it for a Template error.

Please post the full template error.
not just:
"template error..."
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 02:46:39 am
Thanks.  took a dinner break from the 12-hour ordeal with this.  Debug is now on (1).  Here's the entire template error message:

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

                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
<!-- BEGIN home -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftmy" src="themes/my_theme/images/buttonleftmy.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{HOME_TGT}" title="{HOME_TITLE}">{HOME_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END home -->
<!-- BEGIN my_gallery -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftmy" src="themes/my_theme/images/buttonleftmy.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft" src="themes/my_theme/images/buttonleftmemb.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft" src="themes/my_theme/images/buttonleft.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{MY_PROF_TGT}" title="{MY_PROF_LNK}">{MY_PROF_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END my_profile -->
<!-- BEGIN faq -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft" src="themes/my_theme/images/buttonleftfaq.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                        <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END faq -->
<!-- BEGIN enter_admin_mode -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftad" src="themes/my_theme/images/buttonleftad.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftad" src="themes/my_theme/images/buttonleftad.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0" alt="" /></td>
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftup" src="themes/my_theme/images/buttonleftup.gif" width="17" height="25" border="0" alt="" /></td>
                                       <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END upload_pic -->
<!-- BEGIN register -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleft" src="themes/my_theme/images/buttonleft.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0"  alt="" /></td>
<!-- END register -->

<!-- BEGIN logout -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
                                        <td><img name="buttonleftout" src="themes/my_theme/images/buttonleftout.gif" width="17" height="25" border="0" alt="" /></td>
                                        <td style="background: url(themes/my_theme/images/buttoncenter.gif);">
                                                <a href="{LOGOUT_TGT}" title="{LOGOUT_LNK}">{LOGOUT_LNK}</a>
                                        </td>
                                        <td><img name="buttonright" src="themes/my_theme/images/buttonright.gif" width="7" height="25" border="0" alt="" /></td>
<!-- END logout -->
                                </tr>
                        </table>

Title: Re: template error and critical error
Post by: Jeff Bailey on October 20, 2010, 02:49:21 am
attach your template.html and theme.php with .txt extensions.

Please do that and I or someone else will take a look at it and fix the error.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 03:01:55 am
Here they are.  Thanks for all the help by the way. ask me someday how to operate a professional digital camera.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 04:12:06 am
Here's the latest complete template error message:
Code: [Select]
Template error
Failed to find block 'output_buffer' (#<!-- BEGIN output_buffer -->(.*?)<!-- END output_buffer -->#s) in :

                    <div class="{CSS_CLASS}">
                        <h2>{HEADER_TXT}</h2>
                        <span class="cpg_user_message">{MESSAGE}</span>
<!-- BEGIN file_line -->
                        <br />
                        <br />
                        {FILE_TXT}{FILE} - {LINE_TXT}{LINE}
<!-- END file_line -->

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

Title: Re: template error and critical error
Post by: Jeff Bailey on October 20, 2010, 05:01:12 am
Try these.
Untested.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 05:37:44 am
Thanks for the effort..but no luck.  Still get for index.php:
Template error
Failed to find block 'output_buffer' (#<!-- BEGIN output_buffer -->(.*?)<!-- END output_buffer -->#s) in :

                    <div class="{CSS_CLASS}">
                        <h2>{HEADER_TXT}</h2>
                        <span class="cpg_user_message">{MESSAGE}</span>
<!-- BEGIN file_line -->
                        <br />
                        <br />
                        {FILE_TXT}{FILE} - {LINE_TXT}{LINE}
<!-- END file_line -->

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

AND (For login.php):
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 turned off debug and tried it too..no luck.  Turned it back on for the night. Think I'll get up early and take another 12-14 hour shot at resolving this tomorrow.  Thanks again.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 06:10:58 am
The spambots are swarming..they have better access to my site than I do right now. Kind of like jackals that target the weak and infirmed.  That's me.   
Title: Re: template error and critical error
Post by: Brooklyn on October 20, 2010, 08:13:54 am
The idea behind activating debug is to try and attain a better error message than what is present. With debug turned on, as well as a provided test account, one might have a better idea of exactly what's causing the error once logged in.

I have seen database and table faults result in these types of errors. To investigate, access phpMyAdmin and select each table one after another for errors.

It's also possible that the database might have been corrupted in some capacity. Might be a good idea to upload the backup sql file into the database, again, via phpMyAdmin to verify. Then run update.php once again if logged in as admin.

Might also want to verify there are no leftover 1.4.x files, especially within the /lang/ directory.

It's also possible that the update was corrupt in some capacity. Or there are files that are interfering in some way. To resolve, leave only the anycontent.php file, the /include/config.inc.php file, the /albums/ directory and your own theme on the server and purge everything else not conditional to your gallery. To be safe, delete the /albums/ folder and the anycontent.php file that comes with Coppermine before you FTP. And the favicon.ico image if you use your own.

Then re-upload a fresh copy of 1.5.8 (or better, grab yourself the latest SVN) and retry update.php with your backup sql file.
Title: Re: template error and critical error
Post by: Αndré on October 20, 2010, 02:06:22 pm
Moving to themes board.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 04:36:36 pm
Thanks for the debug explain.  Here's the phpmyadmin response:  How do I repair it?
Error
SQL query: 
SHOW FULL FIELDS FROM `cpg_pictures` ;
MySQL said: 
#145 - Table './jlarse07_copp1/cpg_pictures' is marked as crashed and should be repaired   Just FYI,  when I uploaded 1.5.8, I overwrote the existing (1.4x) "includes" folder, but not anycontent.php or the albums folder per instructions. From your remarks it sounds like I should not have overwritten the includes folder during the upload? I have a backup 1.4x version saved if needed. 
Title: Re: template error and critical error
Post by: Αndré on October 20, 2010, 04:46:02 pm
How do I repair it?
Code: [Select]
REPAIR TABLE cpg_pictures

when I uploaded 1.5.8, I overwrote the existing (1.4x) "includes" folder, but not anycontent.php or the albums folder per instructions
That's correct. Everything except albums/, include/config.inc.php and anycontent.php can/should be deleted and replaced with the cpg1.5.x package.
Title: Re: template error and critical error
Post by: jlarsen10 on October 20, 2010, 05:36:54 pm
Got my gallery back! Guess I need to reconfigure Captcha though. Any problems with that in 1.5.8 I should be aware of?  Seems to have vanished. Thanks again for the help! The gallery is great!