MyBB Community Forums

Full Version: Various errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Solved:
I fixed it with the help of google. Turns out this happens if you don't load the js file before the jscripts (facepalm)

Hello all I am getting a couple different errors.

On every page:  (This is from Last Post Avatar Plugin)  Does anyone know why this error would appear?
Uncaught ReferenceError: $ is not defined

    at avatarep.js?ver=299:7
On Showthread.php
Thread-The-Road-Ahead?pid=5054:1034 Uncaught ReferenceError: Report is not defined
    at Thread-The-Road-Ahead?pid=5054:1034
(anonymous) @ Thread-The-Road-Ahead?pid=5054:1034
thread.js:186 Uncaught TypeError: $(...).editable is not a function
    at HTMLDivElement.<anonymous> (thread.js:186)
    at Function.each (jscripts.js:1)
    at ie.fn.init.each (jscripts.js:1)
    at Object.quickEdit (thread.js:180)
    at HTMLDocument.<anonymous> (thread.js:5)
    at c (jscripts.js:1)
    at Object.fireWith [as resolveWith] (jscripts.js:1)
    at Function.ready (jscripts.js:1)
    at HTMLDocument.s (jscripts.js:1)

View Forum
Forum-News-Announcements:735 Uncaught TypeError: Cannot read property 'sortbyprefix' of undefined

    at Forum-News-Announcements:735

My forum link (which is still under construction) is https://www.runebay.com

Thanks for any and all help!
Can you post the contents of your headerinclude template here?
(2020-11-24, 04:40 PM)Ben Wrote: [ -> ]Can you post the contents of your headerinclude template here?
Thank you for the reply, here is my template:

<script language="javascript" type="text/javascript" src="{$mybb->settings['bburl']}/jscripts/myadvertisements.js"></script>{$avatarep_script}{$stylesheets}
<link rel="prefetch" href="https://runebay.com/images/runebay/headerimage.png">
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin>
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500" rel="stylesheet" type="text/css" />
<!--<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />-->
<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Refresh" content="3200">
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jscripts.js"></script>
<!--[if lte IE 8]>
<script src="{$mybb->settings['bburl']}/jscripts/html5.js" type="text/javascript"></script>
<![endif]-->
<script type="text/javascript">
<!--
    var cookieDomain = "{$mybb->settings['cookiedomain']}";
    var cookiePath = "{$mybb->settings['cookiepath']}";
    var cookiePrefix = "{$mybb->settings['cookieprefix']}";
    var cookieSecureFlag = "{$mybb->settings['cookiesecureflag']}";
    var deleteevent_confirm = "{$lang->deleteevent_confirm}";
    var removeattach_confirm = "{$lang->removeattach_confirm}";
    var loading_text = '{$lang->ajax_loading}';
    var saving_changes = '{$lang->saving_changes}';
    var use_xmlhttprequest = "{$mybb->settings['use_xmlhttprequest']}";
    var my_post_key = "{$mybb->post_code}";
    var rootpath = "{$mybb->settings['bburl']}";
    var imagepath = "{$theme['imgdir']}";
    var yes_confirm = "{$lang->yes}";
    var no_confirm = "{$lang->no}";
    var MyBBEditor = null;
    var spinner_image = "{$theme['imgdir']}/spinner.gif";
    var spinner = "<img src='" + spinner_image +"' alt='' />";
    var modal_zindex = 9999;
// -->
</script>
<script type="text/javascript" defer>
$(document).ready(function () {
$(window).scroll(function () {
var height = $(document).height()*5/10;
if ($(this).scrollTop() > height) {
  $('#backtop').fadeIn(200);
} else {
  $('#backtop').fadeOut(200);
}
});
});
</script>{$myalerts_js}{$avatarep_script}{$stylesheets}{$myprofile_headerinclude}

Solved by moving some js scripts around. Simple fix.