Recently encountered a problem with a long standing asp.net c# program.
In my default.aspx amongst other things we have...
<script src="https://maps.googleapis.com/maps/api/js?key=...&libraries=geometry"></script>
<script src="/js/date.js" type="text/javascript"></script>
date.js is a utility library from http://www.datejs.com/
Just recently (last 6 weeks) our map is failing to draw anything, after a bit of investigation it seems that there's a toString() in one of the maps library files that tries to use the toString() from the date.js file and fails miserably.
Uncaught TypeError: format.replace is not a function
at Date.toString (date.js:40)
at iq (common.js:65)
at Object._.Bq (common.js:75)
at map.js:83
For the moment I can specify the version of google maps, 3.40 works fine, anything later doesn't.
Does anyone have a solution to this or has anyone seen this problem? Granted date.js is very old library now but I wondered if there's anything simply I can do.
Google suggests pointing to a more recent version of date.js https://github.com/datejs/Datejs/issues/88
I haven't checked it yet but confirmed it is failing with an old date.js
I am also getting the same error in version 3.41,
but after changing it to version 3.40, It works!
Ran into this same issue in a Rails app, updating data.js to a more recent version fixed it. There's a more recent fork that's available here that fixed the issue for me: https://github.com/abritinthebay/datejs
Related
One of our SW6 plugins comes with fairly basic javascript code. Before shipping it to the SW plugin store, I use the bin/build-frontend.sh script to compile the js assets just as described in the documentation:
https://developer.shopware.com/docs/guides/plugins/plugins/storefront/add-custom-javascript
This has always worked without problems for me. But somewhere in the 6.4.x series, more and more customers reported incompatiblities with their Shopware version. I often have trouble reproducing the error. Most customers report this JS error:
Uncaught TypeError: Cannot read properties of undefined (reading 'call')
My workaround so far has been to install a demo shop with the Shopware version they are using, install my plugin, compile the JS and ship this version to them - with does not seem right at all. Is there any compatibility table or maps which lets me know if a new Shopware Version breaks bw compatiblity when I compile my JS? Or am I missing something?
Any help is very much appreciated.
Maybe this issue is the same like this one: https://github.com/shopware/platform/issues/2420
There was a problem with compiled admin plugins with shopware versions smaller than 6.4.5.0. The compiled code was not compatible with newer shopware versions, but worked with the old ones. When you compile it with a version greater or equal than 6.4.5.0 it will work with all shopware versions.
Maybe this bug also exists for compiled frontend plugins?
Solution for this was to compile it with a Shopware version greater or equal 6.4.5.0 to be compatible with all versions.
No way of knowing without having the actual code.
Generally speaking there shouldn't be breaking changes between minor releases, as long as you're using the provided APIs as intended, e.g. as per the documentation. Most certainly breaking changes are never intended outside of new major releases. The more you move outside of the bounds of the intended implementations however, there will be less of a guarantee for that.
If you can reproduce the error, you can to find which line causes the error by debugging storefront javascript errors. Then you can provide a sample of the corresponding code.
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 including the OpenEars plugin into phonegap/cordova using this plugin https://github.com/karljacuncha/OpenEarsPlugin
I followed the Readme but i ended up with an error of missing files, all these files are not found :(
Any help/suggestion on how to integrate the library?
thank you any advice appreciated!
As already mentioned on a comment, new, non-backwards compatible version (2.0) of OpenEars was released on 5th of December in 2014. This of course prevents it from working with old code such as the plugin in this case.
Basically there would be two options to get it working:
Use older version of OpenEars (last one was 1.7.1) but that doesn't seem to be possible as I wasn't able to download it from anywhere after extensive search.
Fix the code to work on newest OpenEars. It shouldn't be that hard and the code of plugin is only ~400 lines of code. Most of the changes are quite straightforward as described in the upgrade guide. Feel free to fork the project in GitHub or try to contact the original author of that plugin to make the fixes necessary.
I have recently integrated MomentJS library into my application and have been running into a weird issue. Browser I have to use is IE9.
When I launch the application for the first time with zh-cn locale, I see a few junk characters in place of date and time. When I log out and log in again, then the characters load properly.
I check the encoding on screen and see it is UTF-8 both times. The issue is not consistent. I am at a loss as in what should I do to debug or get to the root of this issue. Any pointers about what I should check would be appreciated.
For integrating the MomentJS library, instead of
<script src="moment-with-locales.js"></script>
use this
<script src="moment-with-locales.js" charset="UTF-8"></script>
This is a really weird problem that I have been having. When I download Scriptaculous from the official web site, script.aculo.us, bundled in the ZIP is prototype.js version 1.6.0.1. This works perfectly fine, I can follow along the wiki examples and begin learning. However, when I upgrade to prototype 1.6.0.2 (the latest version) from prototypejs.org everything breaks. I have read the documentation, named the new file prototype.js and nothing works. Any help is greatly appreciated!
scriptaculous is a JS library built on top of prototype. As such, they will be behind prototype in their release schedule. To ensure that scriptaculous works only use it with the prototype file that came in the download.
Sure, given enough time and energy, you can find all the changed references from prototype 1.6.0.1 to 1.6.0.2 but is there really something in the newer version of prototype that you need today? If not, then just wait for the scripaculous to update.
Get the latest script.aculo.us version driectly from their source code repository. The zipped version provided on their website is ancient. I'm running the latest script.aculo.us taken from their repo last week with the latest Prototype (1.6.0.3) without a glitch.