WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
Exception: "Error in SQL-Statement" >> Exception detected in: [/framework/WbDatabase.php]
$sql .= $bUpdate ? ' WHERE `name` = \'system_locked\'' : '';
global $database
<?php$aDbConfig = initGetDbConnectData(initReadSetupFile(), 'dsn');// or $sDbConfig = initGetDbConnectData(initReadSetupFile(), 'url');
some of your questions will be answered in that thread:Important hints from core-dev-teamplease take care for this hints!If you really need the access data for the database, then you can make use of 2 functions from framework/initialize.php: (this file always is loaded by default, no additional include needed!)(...)
diff -u /tmp/functions_database.php.orig functions_database.php --- /tmp/functions_database.php.orig 2014-04-27 22:38:58.985544514 +0200+++ functions_database.php 2014-04-27 14:54:23.457133575 +0200@@ -784,8 +784,15 @@ die(); } else { // WB 2.8- $data = array('host'=>DB_HOST, 'user'=>DB_USERNAME, 'pass'=>DB_PASSWORD, 'db'=>DB_NAME);+ if(function_exists("initGetDbConnectData")){+ $DbConfig = initGetDbConnectData(initReadSetupFile(), 'url');+ $parsed = parse_url($DbConfig['url']);+ $data = array('host'=>$parsed['host'], 'user'=>$parsed['user'], 'pass'=>$parsed['pass'], 'db'=>trim($parsed['path'],"/")); return($data);+ } else {+ $data = array('host'=>DB_HOST, 'user'=>DB_USERNAME, 'pass'=>DB_PASSWORD, 'db'=>DB_NAME);+ return($data);+ } } pmf_debug_fatal_message($sh, '(Read Config) An unknown error occurred!'); die();@@ -796,8 +803,15 @@ // WB 2.9 pmf_debug_fatal_message($sh, '(Read Config) WB 2.9 not supported, yet!'); die();+ } else if(version_compare(WB_VERSION, '2.8.3', '>')) {+ // WB 2.8.4+ $database = WbDatabase::getInstance(); + if($res = $database->query("SHOW VARIABLES LIKE 'character_set_client'")) {+ $row = $res->fetchRow();+ return($row['Value']);+ } } else {- // WB 2.8+ // WB 2.8.x , x<4 global $database; if($res = $database->query("SHOW VARIABLES LIKE 'character_set_client'")) { $row = $res->fetchRow();
In any case it's not a good idea to implement a own Db handling divergently to the class WbDatabaseI.e. in near future we like to change that class (without changing the interface) so all different methods can run in trouble.
Hi, in 2101 are not all fixed things included.The developer will do this in short time.
but 2101 is the latest revision which I can check out from the svn.
--- index.php.orig 2014-04-16 23:05:22.271835878 +0200+++ index.php 2014-04-16 22:32:05.070009957 +0200@@ -90,6 +90,17 @@ $output = executeFrontendOutputFilter($output); } }+// Load OutputFilter functions+if(file_exists(WB_PATH .'/modules/outputfilter_dashboard/functions.php')) {+ require_once(WB_PATH .'/modules/outputfilter_dashboard/functions.php');+ // use 'cache' instead of 'nocache' to enable page-cache.+ // Do not use 'cache' in case you use dynamic contents (e.g. snippets)!+ opf_controller('init', 'nocache');+}+// apply outputfilter+if(function_exists('opf_apply_filters')) {+ $output = opf_controller('page', $output);+} // now send complete page to the browser echo $output; // end of wb-script--- framework/frontend.functions.php.orig 2014-04-16 23:05:49.151896566 +0200+++ framework/frontend.functions.php 2014-04-16 22:41:31.548028816 +0200@@ -311,6 +311,9 @@ require(WB_PATH.'/modules/'.$module.'/view.php'); echo ($sSectionIdPrefix =='none') ? '' : "\n".'</div><!-- '.$module.$section_id.' -->'."\n"; $content = ob_get_clean();+ if(function_exists('opf_apply_filters')) {+ $content = opf_controller('section', $content, $module, $page_id, $section_id);+ } } else { continue; }@@ -327,8 +330,17 @@ echo $content; } }- } else {- require(PAGE_CONTENT);+ } else { // Searchresults! But also some special pages, e.g. guestbook (add entry), news (add comment) uses this+ ob_start(); // fetch original content+ require(PAGE_CONTENT);+ $content = ob_get_contents();+ ob_end_clean();+ // Apply Filters+ if(function_exists('opf_apply_filters')) {+ $content = opf_controller('special', $content);+ }+ // Print Content+ echo $content; } return $retVal;
Like Stefek wrote you should have access to the forum "Core Dev-Test" http://www.WebsiteBaker.org/forum/index.php/board,98.0.html (Moderator badknight)
...thank you, with these hints I could make "Practical Module Functions" and (at least the backend of) "output filter dashboard" work. The changes needed for PMF...
if(function_exists("initGetDbConnectData")){