WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • General Help & Support (Moderator: Boudi) »
  • Code module error
  • Print
Pages: [1]   Go Down

Author Topic: Code module error  (Read 10982 times)

Offline dehuisman

  • Posts: 24
  • Gender: Male
Code module error
« 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) .
Solution: 

Replace the loader_help  function with:

Code: [Select]
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 }
}
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Code module error
« Reply #1 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.
Logged
https://onkel-franky.de

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.11.x) »
  • General Help & Support (Moderator: Boudi) »
  • Code module error
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2