Resolving Unexpected token < in Chrome for Custom 403 Page - javascript

I saw some previous topics related to this but was unable to find a related solution.
On my WordPress blog, WeLearnChess.com, I created a custom 403 error page, and now I am getting a seemingly related syntax error in Chrome. I enabled script debugging in the wp config file and checked with developer tools in Chrome, and I get this error:
Uncaught SyntaxError: Unexpected token < inaccessible:1
This appears to refer to my custom 403 page (http://www.welearnchess.com/inaccessible/). I have BulletProof Security Pro installed, so, to create the custom 403, I replaced the default 403 code with the following line of code via the BPS custom code field:
ErrorDocument 403 http://www.welearnchess.com/inaccessible/
From various tutorials that I saw online, this seems like it should be correct, but I'm new to this so perhaps I've made a mistake that is causing the error. Another interesting point is that, after a hard browser refresh, sometimes the syntax error temporarily changes from :inaccessible to :index or maybe it was:index1 (I'm having trouble reproducing it now).
So, have I done something incorrect with my 403 custom code that could be causing the aforementioned error? Thanks in advance for any assistance you can provide, and please let me know if I need to clarify the question further.

You plugin directory is throwing a 403 error, which means when including <script> tags with src like http://www.welearnchess.com/wp-content/plugins/ultimate-social-deux/public/assets/js/min/us.script-min.js?ver=6.0.4 get redirected to your custom 403 page which is http://www.welearnchess.com/inaccessible/. There are a few instances of this for plugins: ultimate-social-deux, zf-wordpress-category-accordian, rain - where their assets that should be publicly accessible are 403ing. Which means, instead of the actual script your custom page is loaded in the script tag, which is as expected, is invalid JavaScript and hence the errors in your console.

Related

Error code in WordPress? public_html/.htaccess: RewriteRule: bad argument line '^index\\.php$', referer:

My WordPress page was giving me WSOD, so I looked out on the internet for its solution. After inserting a line of code in the PHP file it showed Internal Server error.
I am expecting it to be functioning so I can access my wp-admin and make updates.
I suggest you check your website's or localhost's htaccess file. Maybe it got a bad line of code because your error seems to be a 500 internel server error.
Or try to disable the plugins in case one of them might be the cause of the issue.
Also if you have an error debug log file, try to access it.
And if you have the ability to contact your webhost and they offer support, you can try this as well.

Getting 'Uncaught TypeError: Cannot set property 'timestamp' of undefined' when using jQuery

I have an error which appear when I import jQuery lib only. I don't know what I can do. I know that it's coming from the file jquery.min.js.
Here is my simple page causing this error :
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
What I get from my console :
This error has nothing to do with jQuery or its CDN.
From the error log, you can see that the error originates from webspeed.js. Since you precise that you only import the jQuery script, this shows that this error originates from an extension.
The script tries to contact speedtest.net and the request gets blocked by CORB, thus throwing an uncaught error. This also gives a hint that the extension is made likely to be offered by speedtest.net or a related corporation. As #alon-eitan found, this is indeed the case: the speedtest extension includes such a script that has been known for triggering similar errors.
Pausing the extension or configuring it not to run on your website is likely to fix the error. I'd recommend removing it completely, as network speed analysis and much more can already be natively performed by Chrome thanks to Lighthouse.

Telerik Error - Parameter name: panelsCreated[6]

I have a simple page that uses telerik:RadAjaxManager.
For some reason on page load I'm getting this error in browser console:
I googled it, and found lots of articles where they say I need to switch off debug mode in web.config. So it would hide the error, but it doesn't solve it at all.
Any suggestions?

Javascript Conflict?

this page is working
is an example of what I want to display on the following page:
this page is not working and I don't know why
although the code is identical the results are not the same, I'm assuming that there is some form of conflict with my wordpress themes javascript. Can anyone tell me what is causing this not to work and also how to recognise problems like this in the future?
Thanks in advance!
I have noticed that there are few errors in your site.
Unexpected token <
and the second one is map API key error.
Google Maps API error: MissingKeyMapError
Please check Unexpected token error and try to solve it, fix all 400 error and set map API key. might be the reason is because of this errors showing in your console.

Why isn't my html file suddenly not working?

I'm trying to work on a html file. But I'm getting this error. I'm working on windows xp. I don't know what the error means. I tried running the files on my laptop running on windows 10 and it's giving the same error. I'm attaching a screenshot.
As Adam Axad said, the postimage.org denying access to the images, since its a 403 error.
Make sure whether the postimage.org has o+x (public enter) permission and image has o+r (public read) permission.
Hope it helps :)
The 403 Forbidden error is an HTTP status code which means that accessing the page or resource you were trying to reach is absolutely forbidden for some reason.
Just replace the images to you local once or which you have access to and it will work.
Adam and Thinker answered it, but 403 means you don't have permission to access that url. As the other two said, just try putting the images elsewhere and then linking to them at their new destination.
For future reference, here is a list of all the HTTP response codes. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
These make it easier to troubleshoot various issues like the one you're facing here, and they are good to know anyways!

Categories

Resources