phoenix128 / codolike

Like function for CodoForum
GNU General Public License v3.0
3 stars 2 forks source link

Error on CodoLike on codoforum 3.0.2 (latest) #1

Open IngeVanGemert opened 9 years ago

IngeVanGemert commented 9 years ago

When I enable CodoLike I get this error:

"/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/plugins/codolike/codolike.php" ["line"]=> int(24) ["function"]=> string(6) "add_js" ["class"]=> string(15) "CodoLikeAdapter" ["object"]=> object(CodoLikeAdapter)#128 (0) { } ["type"]=> string(2) "->" ["args"]=> array(1) { [0]=> &string(66) "http://DOMAIN.nl/sites/default/plugins/codolike/client/js/app.js" } } [2]=> array(2) { ["function"]=> string(19) "codolike_add_assets" ["args"]=> array(2) { [0]=> &array(0) { } [1]=> &array(0) { } } } [3]=> array(4) { ["file"]=> string(57) "/customers/b/9/0/DOMAIN.nl/httpd.www/sys/CODOF/Hook.php" ["line"]=> int(65) ["function"]=> string(20) "call_user_func_array" ["args"]=> array(2) { [0]=> &string(19) "codolike_add_assets" [1]=> &array(2) { [0]=> array(0) { } [1]=> array(0) { } } } } [4]=> array(6) { ["file"]=> string(66) "/customers/b/9/0/DOMAIN.nl/httpd.www/sys/CODOF/Smarty/Layout.php" ["line"]=> int(21) ["function"]=> string(4) "call" ["class"]=> string(10) "CODOF\Hook" ["type"]=> string(2) "::" ["args"]=> array(1) { [0]=> &string(22) "tpl_before_forum_topic" } } [5]=> array(6) { ["file"]=> string(49) "/customers/b/9/0/DOMAIN.nl/httpd.www/routes.php" ["line"]=> int(683) ["function"]=> string(4) "load" ["class"]=> string(19) "CODOF\Smarty\Layout" ["type"]=> string(2) "::" ["args"]=> array(3) { [0]=> &string(11) "forum/topic" [1]=> &array(3) { [0]=> string(5) "topic" [1]=> string(6) "editor" [2]=> string(19) "jquery.textcomplete" } [2]=> &array(12) { [0]=> array(2) { [0]=> string(14) "topic/topic.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [1]=> array(2) { [0]=> string(8) "modal.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [2]=> array(2) { [0]=> string(19) "bootstrap-slider.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [3]=> array(2) { [0]=> string(87) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/markitup/jquery.markitup.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [4]=> array(2) { [0]=> string(86) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/markitup/parsers/marked.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [5]=> array(2) { [0]=> string(96) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/markitup/highlight/highlight.pack.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [6]=> array(2) { [0]=> string(80) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/dropzone/dropzone.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [7]=> array(2) { [0]=> string(72) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/js/editor.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [8]=> array(2) { [0]=> string(73) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/js/fittext.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [9]=> array(2) { [0]=> string(77) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/js/griphandler.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [10]=> array(2) { [0]=> string(83) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/oembedget/oembed-get.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } [11]=> array(2) { [0]=> string(85) "/customers/b/9/0/DOMAIN.nl/httpd.www/sites/default/assets/js/jquery.textcomplete.js" [1]=> array(1) { ["type"]=> string(5) "defer" } } } } } [6]=> array(2) { ["function"]=> string(9) "{closure}" ["args"]=> array(3) { [0]=> &string(4) "2294" [1]=> &string(39) "meerdere-contacten-linken-aan-1-company" [2]=> &NULL } } [7]=> array(4) { ["file"]=> string(68) "/customers/b/9/0/DOMAIN.nl/httpd.www/sys/Ext/limonade/limonade.php" ["line"]=> int(429) ["function"]=> string(20) "call_user_func_array" ["args"]=> array(2) { [0]=> object(Closure)#91 (1) { ["parameter"]=> array(3) { ["$tid"]=> string(10) "" ["$tname"]=> string(10) "" ["$page"]=> string(10) "" } } [1]=> &array(3) { [0]=> string(4) "2294" [1]=> string(39) "meerdere-contacten-linken-aan-1-company" [2]=> NULL } } } [8]=> array(4) { ["file"]=> string(67) "/customers/b/9/0/DOMAIN.nl/httpd.www/sys/CODOF/Access/Request.php" ["line"]=> int(96) ["function"]=> string(3) "run" ["args"]=> array(0) { } } [9]=> array(6) { ["file"]=> string(49) "/customers/b/9/0/DOMAIN.nl/httpd.www/routes.php" ["line"]=> int(727) ["function"]=> string(5) "start" ["class"]=> string(20) "CODOF\Access\Request" ["type"]=> string(2) "::" ["args"]=> array(0) { } } [10]=> array(4) { ["file"]=> string(48) "/customers/b/9/0/DOMAIN.nl/httpd.www/index.php" ["line"]=> int(23) ["args"]=> array(1) { [0]=> string(49) "/customers/b/9/0/DOMAIN.nl/httpd.www/routes.php" } ["function"]=> string(7) "require" } }

Please could you advise what to do? Thank you!

bryanschmidty commented 9 years ago

I found a temporary fix for it. It seems a bit hacky, and it doesn't appear to break anything else. The fix is in the CodoForum core files:

File: /sys/globals/global.php I commented out two lines from the add_js function. the var_dump line seems like debug code that hasn't been removed. Not sure what the ['position'] key is doing. Removing it doesn't seem to break anything.

function add_js($asset, $options = false) {
//    var_dump(debug_backtrace());
    global $stream;
//    $asset['position'] = 'head';
    $stream->addJS($asset, $options);
}