Database error messages error Database error messages error
 

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

Database error messages error

Started by Nibbler, January 04, 2005, 04:38:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Nibbler

If I trigger a db error, all I am getting is a template error :


Template error
Failed to find block 'logout'(#(<!-- BEGIN logout -->)(.*?)(<!-- END logout -->)#s) in :

                       <!-- BEGIN register -->
       <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a> ::
 <!-- END register -->  <!-- BEGIN faq -->
       <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a> ::
 <!-- END faq -->  <!-- BEGIN login -->
       <a href="{LOGIN_TGT}" title="{LOGIN_TITLE}">{LOGIN_LNK}</a>
 <!-- END login -->  


Anyone else experiencing this ?

Hmm, It may be plugin related....

Casper

yes, I'm also getting it, in a bridged install (smf)
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Nibbler

Here's my analysis:

cpg_db_error() calls cpg_die() which calls pageheader() which calls theme_main_menu('sys_menu') which attempts to template_extract_block() a whole load of things from $template_sys_menu which are not there as they have already been extracted during the original call to pageheader, causing the error.

If you comment out pageheader($lang_cpg_die[$msg_code]); in cpg_die() then you will get the db error message although the page will of course look all wrong.

Suggestions for a fix welcome :)

Joachim Müller

afaik this has been addressed in a thread in the dev board as well (off limits for "regular" users).
@donnoman: has this issue been fixed?

Joachim

donnoman

yes this was addressed with a fix from omnideveloper.

He made it so that both 'sys_menu' and 'sub_menu' are statics, and are returned if you call pageheader a second time.