WebsiteBaker Community Forum

WebsiteBaker Support (2.11.x) => General Help & Support => Topic started by: dehuisman on April 30, 2018, 03:32:59 PM

Title: Code module error
Post by: dehuisman on April 30, 2018, 03:32:59 PM
In case of multiple code modules in one page an erorr occurs for the load_helper function in wb_wrapper_edit_are a.php file.
This function is not checked on existence and can therefor throw an error. Result is that the second code block and all subsequent blocks are not shown (in admin of course while this is an admin function) .

Replace the loader_help  function with:

Code: [Select]
if (!function_exists('loader_help')) {
function loader_help()
{ ?>
        var url  = '<?php print WB_URL?>/include/editarea/edit_area_full.js';
            script = document.createElement("script");
            script.type = "text/javascript";
            script.src  = url;
            script.charset= "UTF-8";
            head = document.getElementsByTagName("head")[0];
            document.write("<script src='" + url + "' charset=\"UTF-8\"><"+"/script>");

<?php }
Title: Re: Code module error
Post by: dbs on April 30, 2018, 04:03:56 PM
Hi, the problem and solution is known. In next WB version the code module will be fixed.
I can recommend the more flexible module code2.