The following error shows up when I load a page that uses jQuery in my iWebView.
I checked if the JS files have any errors, but they all seem fine.
Any clues anyone?
Vasa, the latest 1.x version is 1.11.1:
https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js
You may want to try pointing to that to see if the upgrade has fixed your script error. Also, using the non-minified version for development may give you more detail to line and character.
Related
I have developed the library bertinjs which allows to make svg interative maps. In Observable, require("bertin") works. In Quarto, require("bertin") does not work. The following error is returned: OJS Error. RequireError$1: invalid module. See the issue on Github (see). It's weird. Any help is welcome.
(Quarto dev here) I recently fixed a bug that would cause that behavior you're seeing. Can you try a release later than 0.9.430? Thanks!
Edit: I see now that bertinjs uses modern JS syntax, which the stable versions of the RStudio IDE don't yet support. Your example works on the latest Electron daily builds, the right-most column on the linked page.
I am trying to integrate medium insert plugin(https://github.com/orthes/medium-editor-insert-plugin). I have set it up according to the instructions. Everything works fine except it is giving me the error in the console when i hover over the + button as:
I have not made anything to the example code.
Any help is greatly appreciated.Thanks in advance.
I finally found the solution to this problem.
Since i downloaded the plugin directly from the git repo and installed its dependency using bower, it pulled all the latest plugins and it turns out the latest plugin for medium-editor(ie. v5.21) is not compatible with the current latest version of medium-insert plugin(ie v2.x). So i downloaded v5.9 of it(medium-editor) and voila it worked.
I'm having frequent problems when using Google Polymer with non-Chrome browsers (Firefox/IE). Using Polymer on its own (such as viewing Polymer Element demo pages) does not seem to cause any issues. However, issues arise when using webcomponents.js is included on an existing web-application with many included GUI and utility packages (jQueryUI,
The issue seems to be related to webcomponents.js specifically. If no HTML imports are used and only webcomponents.js is imported, it throws the same error in both Firefox and IE:
webcomponents.js:2114 - SyntaxError: An invalid or illegal string was specified
webcomponents.js:113 - Error: Assertion failed
The specific line of webcomponents.js simply reads:
list = originalDocumentQuerySelectorAll.call(target, selector);
- which seems to have no immediately obvious syntax error.
Due to this error, other GUI elements on the page now exhibit erroneous behavior. There is no other useful console output provided when this happens, and no exceptions thrown by other JS packages. None of this behavior is shown when using Chrome.
I had the same error. I solved it, loading webcomponents.js before jquery.js.
I've tested with the last version of webcomponents.js in the last version of Firefox, simply loading it (no other import used) and it seems to work...
Test here
Plunker here
Did you tried with the last version of webcomponents.js or it was an old one? How about the version of Firefox?
Couldn't test on IE, I'm on linux, sorry.
I had the same problem when loading jQuery(v1.10.2) and polymer(webcomponents.js).
Fixed it using jQuery v2.1.4.
I was able to resolve the issue by removing $(document).ready from the script.
Not quite sure if this is still relevant but I bumped into this recently while running the unit tests using web-component-tester for a Polymer 1.11 based application. This issue start appearing on chrome v81 and was working fine before.
So, in each of the spec file we have an import for webcomponents.min.js which I replaced with webcomponents-lite.min.js and that worked for me.
I've deployed my app in production and precompiled the assets pipeline, so my application.js contains everything.
while it was all working fine in development (where files were split) it's not working any more in production, and tooltips and everything don't work any more.
the only problem I'm seeing in chrome console is:
Uncaught TypeError: Cannot read property 'msie' of undefined
it mentions the line containing the error:
jquery.js:9789
although the application.js (precompiled) at line 9789 is blank, and in my source I don't include explicitly any source file called jquery.js, as the jquery is included inside the application.js.
I found that jquery_bbq may be the problem, in I run: grep -r msie * I have only two occurrences:
config/recipes/templates/nginx_configuration.erb
vendor/assets/javascripts/jquery_ba-bbq.min.js
I'm not sure how to troubleshoot this, any ideas ?
thanks in advance
Something you're including is trying to read the msie property of jQuery.browser. But jQuery doesn't have the jQuery.browser symbol any more (it was deprecated in v1.3 and removed in v1.9).
I can't account for the line number other than to mention that jQuery 1.10.2, un-minified, has exactly that many lines. As for the filename, I assume your HTML or something in your application.js or another script you're loading is loading jquery.js. Chrome's Network tab in the dev tools should tell you what's loading jquery.js.
So the solution is to find out what plug-in or similar you're using that's trying to use jQuery.browser.msie (or $.browser.msie) and deal with the fact it's no longer compatible with jQuery. You've already basically done that and found jquery_ba-bbq.min.js
The other thing is to find and deal with whatever's including jquery.js, if you have jQuery baked into your application.js (presumably an older version, if this was working before you combined things).
I work on an ASP.NET MVC 4 application.
I updated jQuery, jQuery UI and all other nuget packages in my project. Built it and ran it to see that no problems occured. Everything worked so I continiued development for several days.
After a while I published the project to a test-server I have to see how it looked on Ipad, Iphone etc. And then I realized that the jQuery-UI accordion stopped working.
It renders, but does not respond on click. This goes for all browsers. I found this strange since the only difference is that the MVC bundeling i applied in release mode and as far as I understand it either minifies the jQuery file or chooses the minified version (the latter probably beeing what is does here since it is added when updating using nuget).
The jQuery version is: 2.0.3
The jQuery-ui version is: 1.10.3
In Chrome console the error reads:
Uncaught TypeError: Cannot read property 'safari' of undefined
OK, so i realize this might be the result of one of my jQuery assemblies references $.browser that apparently was removed in jQuery 1.9.
However the fact that it works in debug mode (using the non-minified versions) leads me to think that it might not be that. I could almost think that it is a problem with the minified versions, but that should not be possible either.
Anyone knows why this happens and know how to fix it?
Update
As requested I attach most of the code. The strange thing is that this works in debug mode, but not in release. I cannot see why there would be any significant changes that should cause this problem:
_Layout.cshtml
Bundleconfig.cs
The view (which calls a partial view)
The partial view
The jquery code
The javascript error in Chrome
Bigger view of the error in chrome
Just to add. After posting this I removed the duplicate loading of modernizr (the telerik custom one was added without me noticing). The problem still persists.
Update 2
I turned off the optimizations in bundleconfig.
BundleTable.EnableOptimizations = false;
This allowed me to see what was throwing an error in jquery-ui, and it seems indeed to be the $.browser that was removed. It seems that it actually loads two old versions of jquery (current + 1.6.4 and 1.7.1) together with the new one and two versions of jquery-ui (current + 1.8.16) the last one throwing an error. None of these files are loaded in my solution or in the file folder.
This seems to be a publish problem, but disguised by the bundling and minification... I'll try to fix this and see if it works.
OK, so this was not at all a problem with the code itself, and I learned something new that might be of help to others.
Setting
BundleTable.EnableOptimizations = false;
Was what helped me solve this.
Obviously the Asp.Net MVC 4 bundling bundles every script that is found in the folder where it is released, not what is in the solution folder in Visual Studio. I did not think of this at all... But in retrospect it kind of makes sense.
Combined with the fact that VS default publishing settings does not remove files that does not equal the files that you publish means that when removing i.e. an old version of Jquery and adding a new one, the old one still remains on the server.
Add the default bundling using {version} for jquery selection and you have one unreadable jquery file throwing error. Not until you disable bundling and minification it becomes obvious that I in this circumstance loaded 3 versions of Jquery:
Before
After
The solution? Easy, just have to expand a setting called "File publish options" in the publish wizard and check "Remove additional files...":
Thanks for the suggestions. It helped me look the right places, but I was not able to imagine this beeing the problem.
I think you have forgot to add '"~/Content/themes/base/jquery-ui.all.css"'
Note: although you have called all modules separately sometimes calling single file makes difference. As we might miss some dependent file in choosing separate modules.
In BundleConfig.cs you need to add/modify like..
bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
"~/Content/themes/base/jquery-ui.css",
"~/Content/themes/base/jquery-ui.all.css"
));
if in your locals the file of jQueryUI exist that will do the trick for the same(that might be possible problem that makes it working on Local Testing).
Your _layout.cs will be like..
#Scripts.Render("~/bundles/jquery")
#Scripts.Render("~/bundles/jqueryui")
#Styles.Render("~/Content/themes/base/css")
#RenderSection("scripts", required: false)
as you are not rendering jqueryUI that we need to call and render saperately after jQuery.
And your Section script should be called like this,
#section Scripts{
#*#Scripts.Render("~/bundles/jqueryUI")*#
<script type="text/javascript">
$(document).ready(function () {
$("#accordian").accordian();
});
}
This is what I will suggest and should work, with MVC things are really small to identify exact problem, So I have provided all these lines, thank you,
Do post back if problem persist.