WebsiteBaker Support (2.11.x) > General Help & Support

Code module error

(1/1)

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

Replace the loader_help  function with:


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

<?php }
}
--- End code ---

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

Navigation

[0] Message Index

Go to full version