MyBB Community Forums

Full Version: Jquery Errors along with some other errors
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi guys,

There is probably some other topics about these issues - I have looked at inline moderation topics about trying to fix some issues and it seems to have just made it worse.

I have the following errors:

Uncaught ReferenceError: jQuery is not defined
    at index.php:11

index.php:2596 Uncaught TypeError: $(...).tipsy is not a function
    at index.php:2596

Uncaught TypeError: $(...).inewsticker is not a function
    at HTMLDocument.<anonymous> (theme.js:23)
    at j (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at Function.ready (jquery.min.js:2)
    at HTMLDocument.J (jquery.min.js:2)

Any specific links or information about this would be amazing. I do apologise if there is already topics about this.

I'm using the latest version of MyBB.

I think that this error is caused by your theme. What theme are you using? Can we have your forum url?
(2017-02-13, 05:32 PM)chack1172 Wrote: [ -> ]I think that this error is caused by your theme. What theme  are you using? Can we have your forum url?

The theme I am using is NetPen - Version 5

The forum / theme seems more broken than I thought! - It was working at first but just doesn't seem to now and shows those errors.
Please move this in theme template headerinclude from top to bottom of that template

<script type="text/javascript">
$(".forumbit_subforums").each(function () {
  $(this).parents(".rowbit").find("a[data-subforum]").addClass("smalltext").attr("data-subforum", "true");

Also remove this from headerinclude template:

<script type="text/javascript" src=""></script>

Also search in headerinclude template for:
var cookiePrefix = "";

and insert after that line:
var cookieSecureFlag = "0";
Hello I have the same problem with the Netpen Theme.

In my headerinclude you can find the content:

<script type="text/javascript">
$(".forumbit_subforums").each(function () {
  $(this).parents(".rowbit").find("a[data-subforum]").addClass("smalltext").attr("data-subforum", "true");
<link rel="stylesheet" href="">

<script type="text/javascript" src=""></script>
var jq1111 = jQuery.noConflict();
<script type="text/javascript" src=""></script>
<script src=""></script>

var jq172 = jQuery.noConflict();
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="alternate" type="application/rss+xml" title="{$lang->latest_threads} (RSS 2.0)" href="{$mybb->settings['bburl']}/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="{$lang->latest_threads} (Atom 1.0)" href="{$mybb->settings['bburl']}/syndication.php?type=atom1.0" />

<link href=",600,700" rel="stylesheet"> 
<link rel="stylesheet" href="">
<link href="{$mybb->settings['bburl']}/images/green/css/jquery.tipsy.css" rel="stylesheet" type="text/css" />

<meta http-equiv="Content-Type" content="text/html; charset={$charset}" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.js?ver=1813"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/jquery.plugins.min.js?ver=1813"></script>
<script type="text/javascript" src="{$mybb->asset_url}/jscripts/general.js?ver=1813"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/green/js/jquery.cookie.js"></script>
<script type="text/javascript" src="{$mybb->settings['bburl']}/images/green/js/theme.js"></script>


<link href="{$mybb->settings['bburl']}/images/green/css/responsive.css" rel="stylesheet" type="text/css" />
<link href="{$mybb->settings['bburl']}/images/green/css/index.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
	lang.unknown_error = "{$lang->unknown_error}";

	lang.select2_match = "{$lang->select2_match}";
	lang.select2_matches = "{$lang->select2_matches}";
	lang.select2_nomatches = "{$lang->select2_nomatches}";
	lang.select2_inputtooshort_single = "{$lang->select2_inputtooshort_single}";
	lang.select2_inputtooshort_plural = "{$lang->select2_inputtooshort_plural}";
	lang.select2_inputtoolong_single = "{$lang->select2_inputtoolong_single}";
	lang.select2_inputtoolong_plural = "{$lang->select2_inputtoolong_plural}";
	lang.select2_selectiontoobig_single = "{$lang->select2_selectiontoobig_single}";
	lang.select2_selectiontoobig_plural = "{$lang->select2_selectiontoobig_plural}";
	lang.select2_loadmore = "{$lang->select2_loadmore}";
	lang.select2_searching = "{$lang->select2_searching}";

	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 type="text/javascript">
jQuery(document).ready(function() {
    var offset = 100;
    var duration = 250;
    jQuery(window).scroll(function() {
        if (jQuery(this).scrollTop() > offset) {
        } else {
    jQuery('.scrolltotop').click(function(event) {
        jQuery('html, body').animate({scrollTop: 0}, 600);
        	return false;

Can somebody tell me what the problem is, actually everything is as said by SvenPu.

greetings l3n0x
^ use of multiple jQuery scripts & noconflicts is a problem with some themes.

ALSO theme might need updating to work with recent versions of MyBB
perhaps it would be better to contact theme coder for the related fixes ..

if a helper offers direct help then you may have to provide admin panel access to check ..
I have the problem (netpen theme also) and it seems also related to Jquery Error.

As I described in topic

I have error when deleting attachment: after delete confirmation, the attachment stays at page. It changes only after page refresh.

There is no such problem with default theme.

Here is log of error when loading page:
Uncaught ReferenceError: jQuery is not defined
    at editpost.php?pid=42555&processed=1:10
editpost.php?pid=42555&processed=1:1320 Uncaught TypeError: $(...).error is not a function
    at editpost.php?pid=42555&processed=1:1320
2jquery.sceditor.defaultdark.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)

Here is continuation when deleting attachments:
jquery.sceditor.bbcode.min.js?ver=1822:3 GET net::ERR_ABORTED 404 (Not Found)

Is there any way to fix it or replace wrong code with working one from default theme?
(2020-07-03, 05:52 PM)owlman Wrote: [ -> ]I have the problem (netpen theme also) and it seems also related to Jquery Error.
Is there any way to fix it or replace wrong code with working one from default theme?


please follow the steps given by SvePu few answers before:
Dear SvePu and NoRules ,
let me thank you for your assisstance!

At least one step towards debug Smile

After precise following steps from #4, I got editor dissapeared, and after pressing "delete" (image) I was redirected me to thread without changes.
Errors are following:

VM2040 jquery.js:2 Uncaught TypeError: $(...).inewsticker is not a function
    at HTMLDocument.<anonymous> (VM2044 theme.js:24)
    at l (VM2040 jquery.js:2)
    at c (VM2040 jquery.js:2)

VM2042 general.js:137 Uncaught TypeError: Cannot read property 'OPEN' of undefined
    at Object.prompt (VM2042 general.js:137)
    at Object.removeAttachment (VM2053 post.js:97)
    at HTMLInputElement.onclick (editpost.php?pid=42555&processed=1:1150)
prompt @ VM2042 general.js:137
removeAttachment @ VM2053 post.js:97
onclick @ editpost.php?pid=42555&processed=1:1150
VM2053 post.js:178 Uncaught ReferenceError: php_max_file_uploads is not defined
    at HTMLFormElement.checkAttachments (VM2053 post.js:178)
    at HTMLFormElement.dispatch (VM2037 jquery.min.js:3)
    at HTMLFormElement.r.handle (VM2037 jquery.min.js:3)
checkAttachments @ VM2053 post.js:178
dispatch @ VM2037 jquery.min.js:3
r.handle @ VM2037 jquery.min.js:3

Navigated to
thread-8-post-42555.html:975 Uncaught TypeError: $(...).popupMenu is not a function
    at thread-8-post-42555.html:975

Some details: I have following cookie code:

	var cookiePrefix = "{$mybb->settings['cookieprefix']}";
	var cookieSecureFlag = "{$mybb->settings['cookiesecureflag']}";

Change cookieSecureFlag to 0 not changed situation.

At the moment I returned my previous headerinclude code (except that I permanently deleted <script type="text/javascript" src=""></script>).

So, the last test shows:
  • after delete image it stays in the editor
  • after hitting Update post it refresh page, stays in editor and not showing deleted image anymore
  • after hitting Update post one more time I'm redirecting to updated thread.

I need to copy/paste us the headerinclude template of the theme you're using in your forum (in the Ungrouped Templates section)
Pages: 1 2