tagEditor , facing Cannot read property 'maxTags' of undefined ERROR - jquery-tageditor

I am working with tagEdotor jQuery , When try to populate date from different rows its throwing Cannot read property 'maxTags' of undefined error .
if i refresh the page and then click again it works fine.
I used $('#new_os_EmailAddress').tagEditor('destroy'); as well before initialising it ... but facing same issue.

Related

Is there any way to handle `Cannot read property 'cards' of null` error?

I am using Embedly in React.js application to show URL preview in the page that has arrow navigation, and I am getting an error when switching page before embed content loaded.
The error message received is:
Uncaught TypeError: Cannot read property 'cards' of null
at n.done (platform.js:7)
at e.done (platform.js:8)
at e.each (platform.js:8)
at e.<anonymous> (platform.js:8)
at n.<anonymous> (platform.js:7)
at platform.js:7
at Array.forEach (<anonymous>)
at Object.e.each (platform.js:8)
at platform.js:7
at Array.forEach (<anonymous>)
Setting Chrome to pause on exceptions, and using its pretty print to make the code more easily readable, we see that the contentWindow property of parameter b is null, hence the error. However, this error is coming from the third party Platform.js, so I cannot amend that code myself to work around the issue there.
In order to recreate the issue, open this JS Fiddle. In the lower right pane you'll see the running example. Click the Next button several times very quickly, after a few attempts the error will appear in the console / Chrome will pause execution (if set to do so).
Question
Is there anything I can do in my own code to prevent this exception from occurring in platform.js?

EXTJS store related error when switching tabs: ext-all-debug.js:53117 Uncaught TypeError: Cannot read property 'isSynchronous' of null

I have a simplified fiddle that shows the issue I'm seeing:
https://fiddle.sencha.com/#view/editor&fiddle/2nbs
The application has two tabs. Each tab contains an instance of a component made up of a tree panel and a grid. Clicking a node in the tree populates the grid. If you visit both tabs before clicking a node in either tree then the application behaves. However, if you click a tree node in the first tab and thus populate the grid, then visiting the 2nd tabs throws this error:
ext-all-debug.js:53117 Uncaught TypeError: Cannot read property 'isSynchronous' of null
at constructor.loadsSynchronously (ext-all-debug.js:53117)
at constructor.createMask (ext-all-debug.js:106694)
at constructor.onRender (ext-all-debug.js:105766)
at constructor.finishRender (ext-all-debug.js:38449)
at constructor.finishRenderItems (ext-all-debug.js:76675)
at constructor.finishRender (ext-all-debug.js:76992)
at constructor.finishRenderChildren (ext-all-debug.js:79000)
at constructor.afterRender (ext-all-debug.js:37909)
at constructor.finishRender (ext-all-debug.js:38463)
at constructor.finishRenderItems (ext-all-debug.js:76675)
I'm building in extjs 5.1.3, but this reproduces in the latest version (6.6). I suspect I'm missing something stupidly obvious...
I found the problem...
the code that was destroying the old store was also destroying ext-store-empty - used by all empty grids etc
so I did this:
if (oldStore && oldStore.storeId !== 'ext-empty-store') {
oldStore.destroy();
}
there might be a neater way, but this works.

AngularJS - Cannot read property 'fieldName' of undefined when using $scope.formName.fieldName.$viewValue

We have a form on submission of which we show a modal dialog. The modal also contains a form, whose values i am trying to retrieve.
I can get the value using ng-model, but in case of validation failure, it returns undefined. In those cases I am trying to get the value by using $viewValue like
$scope.formName.fieldName.$viewValue
This works on the main page, but in the modal i am getting an error
Cannot read property 'fieldName' of undefined
i am using angular-ui-bootstrap for the modal.
jsfiddle : http://jsfiddle.net/agadbnLr/2/
Why i am not able to get the field value in the modal using $viewValue, whereas it is possible to get the field value which directly in the page.

marionette example not working

I have all the HTML , JS code here on codepen : http://cdpn.io/nbuGB
I started learning marionette JS. Somehow this simple example is not working.
It throws error :
Uncaught TypeError: undefined is not a function
how to resolve this ?
Your problem is in these lines:
ContactManager.reqres.setHandler("contact:entities",function(){
return API.getContactEntities;
});
You need to write API.getContactEntities() otherwise you're returning a function reference instead of your contacts collection. This causes the undefined error.
See: http://codepen.io/anon/pen/jALtq

angularjs and select2: not able to select option without $digest error

I have a problem with a select2 select box (http://ivaynberg.github.io/select2/) in an angularjs project. If I try to select an option in the select box from javascript (I do this in a directive to update the UI when the model changes), I always get the error
Error: $digest already in progress
Although I get the error, the UI behaviour is correct. Afterwards, the right option in the select box is select. But, an error is thrown every time.
I created a little example on plunker: http://plnkr.co/edit/ZLQPr3
I see the error in the firefox/firebug and chrome console on mac.
While this is not the best solution, you may want to try this
http://plnkr.co/edit/zidLr3?p=preview
AFAIK The problem is in the trigger that causes multiple $digest.

Resources