MultipleDefine xspClientDojo.js and dojo.js error - dojo

I having a problem with MultipleDefine xspClientDojo and dojo.
I have implemented select2 version 4.0.3 in a xPage theme.
But I get an error in the browser console, when loading the page.
The select2 fields are working, but some other dojo things are not.
Does anyone have a clue why this happens and how to resolve it?

Not familiar with "select2 version 4.0.3 theme", but multi-define error is usually the result of conflict of having more than one widget with the same id.

I found a simular problem here Xpages Getting Select 2 to work with current Extension Library
And the solution was to outcomment the AMD part in the start of the select2.js file.

Related

Problem using Firefox ESR 45.4.0 and Vuejs 2

I am trying to deploy a vue application. I have to use Firefox ESR as browser (45.4.0) but I get the following error: TypeError: Object.values is not a function. If I use a different browser it works fine.
Could anyone help me?
Thank you
Support for Object.values was introduced in Firefox 47.
Your browser is from 2015. That is hideously ancient in Internet terms. Upgrade it.
(If you really want to to get the Vue application to work, you'll need to set up a Polyfill for Object.values. There is one linked from the MDN page I linked to above. It should also be available in core-js which can be used with Babel in the transpiling step of your build process.)

Object doesn't support property or method 'getRootNode' Polymer 2.x Internet Explorer ERROR

I am having an issue in IE11 and EDGE 14
Object doesn't support property or method 'getRootNode'
from webcomponents-hi-sd-ce.js
Any Ideas how to resolve this?
I am serving es5 code built using polymer-build
I have noticed that the Node.prototype.getRootNode function does exists in my page in ie11. This means that the polyfill is loaded by the time that get to the console and can log something
Using compilation for your project you may consider to add at the top of your entry point
import 'core-js'
At the moment core-js polyfill library is the easiest way to make Cross Browser Support

dojo-amd-factory-scan:false seems not to work

I try to load an external JavaScript library like jQuery mobile to my IBM Notes Database. When i add this library i run i to the known amd loader problem.
I found an article that says when i add
xsp.client.script.dojo.djConfig="dojo-amd-factory-scan": false
to the xps.properties, this will fix this problem but for me it does not work.
Is there anythink else is miss?
Here is the article
http://xomino.com/2013/05/14/xpages-nd9-dojo-1-8-does-not-work-with-other-amd-loaders-and-the-work-around/
[UPDATE]
Using the Extension Library is not a solution
jQuery is part of the latest Extension Library release on OpenNTF. That's the best practice method for including jQuery.
This solution works for me. hasselba.ch/blog/?p=1216

Overriding Dojo version for a particular Xpages database

Apple's iOS 8 breaks certain tap functionality in versions of dojo prior to 1.9.4 (see Xpages mobile controls not working in iOS8
The current version of Dojo in Domino 9.0.1 FP2 is 1.9.2 but that does not fix the issue. You have to use at least 1.9.4.
I have downloaded 1.9.4 and placed it in the correct folder on our test server. But I cannot get things to work. I changed the folder name of dojo 1.9.4 to 1.4.0 as I only want to use this version for 2 dbs that are having the problem.
Question 1:
What line do I put in the xsp.properties file:
xsp.client.script.dojo.version = 1.4.0
xsp.client.script.dojo.path = / domjs / dojo-1.4.0
Question 2:
There are so many things to download when I go to the dojo download page. I downloaded the zip file and used that.
When I run code to test what version of dojo I have I get 1.9.4. But when I try to load my page, I get an error.
dojo._loaders: TypeError: dojo._loaders is undefined
Any help would be GREATLY appreciated.
You probably have the right dojo zip, this one: http://download.dojotoolkit.org/release-1.9.4/dojo-release-1.9.4.zip. As you say, unzip that to the dojo-1.9.4 folder in <server-install>\data\domino\js\, or name the folder 1.4.0 if you want to specify it for only a few apps.
You will indeed need to copy the IBM folder from the <server-install>\osgi\shared\eclipse\plugins\com.ibm.xsp.dojo_9.0.1.<date-stamp>\xsp.dojo.jar into your new 1.9.4 (or 1.4.0) dojo folder. Little chance of anything working without it. Copying the ibm folder from the 1.5.2 folder is a bad idea as that is old code, and you'd certainly have issues with it working with dojo 1.9.4. In Fix Pack 2, the ibm folder from the plugin was tested/designed to work with dojo 1.9.2 (the version in that jar), so it should play fairly nice with 1.9.4.
In your XPages app, in the xsp.properties, you should only need the line:
xsp.client.script.dojo.version = 1.9.4
Rebuild your app, restart the server etc, and you should be good to go.
DISCLAIMER: This is a work-around, not a supported solution by IBM. There may be unexpected issues using this approach. It's used at your own risk.
You commented already on that topic here so I think you tried this one? http://hasselba.ch/blog/?p=323
This is the SO thread: XPages mobile controls not working with iOS 8

Installing Dojo into Aptana

How would I install support for dojo into Aptana?
Basically I want to have auto completion working for dojo. Is there a way to do it?
The process has changed. Instead, you drop a library API file into your project:
http://wiki.appcelerator.org/display/tis/Using+JavaScript+Libraries
You do drop a library API file in your project as described in the link Ingo Muschenetz provided. However, no plugin that I have found currently FULLY supports Dojo content assist or auto completion. As in dojo.byId or dijit.byId are not supported through Aptana.
Here is the updated link to install Dojo support for Aptana:
http://docs.appcelerator.com/titanium/latest/#!/guide/JavaScript_Library_Support
Just follow the instructions under Dojo.