MyBB Community Forums

Full Version: Uncaught error: Syntax error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm having some problems with this error showing up on this page.


Quote:Uncaught Error: Syntax error, unrecognized expression: title]
    at Function.db.error (jquery.min.js:2)
    at ob (jquery.min.js:2)
    at xb (jquery.min.js:2)
    at Function.db [as find] (jquery.min.js:2)
    at n.fn.init.find (jquery.min.js:2)
    at new n.fn.init (jquery.min.js:2)
    at n (jquery.min.js:2)
    at HTMLDocument.<anonymous> (VM20987 showthread.php:175)
    at j (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)


Any idea how to resolve?
The following piece of code is loading jQuery 1.1, which is not supported in the latest MyBB versions. The default jQuery version for your MyBB version is jQuery v3.5.1 (which is loaded in your headerinclude template).
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

The solution would be to remove this and fix subsequent issues caused by this action.
(2021-09-02, 09:56 AM)Omar G. Wrote: [ -> ]The following piece of code is loading jQuery 1.1, which is not supported in the latest MyBB versions. The default jQuery version for your MyBB version is jQuery v3.5.1 (which is loaded in your headerinclude template).
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>

The solution would be to remove this and fix subsequent issues caused by this action.

I removed that, and was met with 34 errors. Not sure how to fix all of those ..... See screenshots of said errors below.

[Image: IJyc5iS.png]
[Image: istDFTH.png]
[Image: Afy3xg9.png]

I noticed it was mentioning the 'title]' in this code below. Does this mean anything? 

<script>
jQuery(document).ready(function($) {
    $('title]').tooltip();
});
</script>
$('title]') should be $('[title]')
(2021-09-22, 10:29 AM)Matt Wrote: [ -> ]$('title]') should be $('[title]')

I changed it to $('[title]'), but then received this error. 

[Image: yEGQQXE.png]
[Image: qfVGHjw.png]
It's not a core MyBB thing so it's something that's been added to the theme, it'll require a 3rd party javascript library, but we won't know what that's supposed to be or what was set up in the theme originally.
probably jquery-ui or bootstrap is needed
Also note that this on your index page is causing an error, although I don't know which template it's from:
	<script>
		if($('.weatherBox).length){
  // show or hide another div
  $('.packClaim').hide();
}
	</script>
The error is due to the missing closing single quote after .weatherBox.