Updating to Wakanda 11: "[Backend] Cannot read property 'replace' of undefined in undefined on line undefined" - wakanda

I am looking to move my Wakanda application, created in Enterprise Studio v10, to Enterprise Studio/Server v11. I can start the solution successfully, but when I try to view my webapp in browsers, Wakanda Studio logs the error:
[Backend] Cannot read property 'replace' of undefined in undefined on line undefined
and the browser shows just a white page with some console errors (below).
Edit: commenting out all occurrences of .replace() does not solve the problem. I do not believe it is possible that this issue is the result of .replace() statements that I've written.
I do use string.replace() with regular expressions in a few places. The code works perfectly fine in v10 and am confused about what could be wrong.
Here is an example of how I am using replace() in the code:
var tempString = "";
tempString = tempEntity.sourceProjects;
tempString = tempString.replace(/,/g, " ");
tempString = tempString.replace(/other_/, "Other: ");
The code was more streamlined before- I broke it out into pieces in an attempt to get rid of the error, but no dice.
Browser with console errors:
What I see when I click on "Loader.js: 2073"

1) Quit Wakanda
2) Delete the old index.package.json file inside of index.waPage
3) Restart Wakanda and let Wakanda v11 regenerate it

You have the error : "Cannot read property 'replace' of undefined" because in line 2, tempEntity is an empty string and you write tempEntity.sourceProjects.
The value of tempEntity.sourceProjects is "undefined", so when you try to use replace in line 3 you get this error.
Issam

Related

How to fix "Cannot read property 'apply' of undefined" trying to get the location using Protractor?

I'm trying to get an element's location using the Protractor (v6.0.0) method call getLocation(), however I'm getting the following exception:
TypeError: Cannot read property 'apply' of undefined
at <Jasmine>
at actionFn (/usr/lib/node_modules/protractor/built/element.js:95:44)
at <Jasmine>
at actionResults.getWebElements.then(/usr/lib/node_modules/protractor/built/element.js:468:44)
at <Jasmine>
at ElementArrayFinder.applyAction_(/usr/lib/node_modules/protractor/built/element.js:466:29)
Any clue how to resolve the issue?
Actually my code is really simple.
it('should compare login page with a baseline', async () => {
let input = element(by.id('mat-input-1'));
await input.getLocation();
});
I expect the coordinates of the input which has id mat-input-1, but unfortunately I'm getting that exception.
Protractor's CHANGELOG.md has a link to the selenium-webdriver CHANGELOG, it lists:
Changes for W3C WebDriver Spec Compliance
Replaced WebElement.getSize() and WebElement.getLocation() with a
single method, WebElement.getRect().
So it looks like you should use .getRect().
Now for Protractor 6 itself, this is clearly an issue with documentation. We recommend using 5.4.2 for now.

How to return CKEditorFuncNum?

$funcNum = $_GET['CKEditorFuncNum'] ; is not returning the number.
I tried creating the upload.php for ckeditor uploadimage plugin according to
https://stackoverflow.com/a/44553006/8719001 (sorry can't add comments yet)
which includes echo "<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction($funcNum, '$url', '$message');</script>";
However when I drop images it doesn't work and in the console I get the Response Text which doesn't show any funcNumber:
"<script type='text/javascript'>window.parent.CKEDITOR.tools.callFunction(, 'https://example.com/upload/test.jpg', '');</script>"
I think this might be part of filebrowser plugin?
Which I have enabled and also declared $settings['filebrowserUploadUrl'] =
Try to setup config.js insert config.filebrowserUploadMethod = 'form';,if you got CKEditor additional arguments empty,(CKEditor,langCode,CKEditorFuncNum). There are some errors occur,
Incorrect server response. and [CKEDITOR] Error code: filetools-response-error..
please refer,https://github.com/ckeditor/ckeditor-dev/issues/1894
This is the version problem.
I tried 2 hours and couldn't get the parameter CKEditorFuncNum with java like you.
After I changed my 4.9.1 version to 4.7.3, it worked.

Angular2-meteor cant read property "meteorInstall"

I'm converting an old angular2 project over to use meteor to act as an admin panel style thing for a project that is based off the ionic2-meteor whatsapp tutorial.
So I'm building the website in the client folder inside api.
I'm pretty sure I've got things correct (based off the old socially tutorial) for the angular2 client.
I'm getting these as errors though.
modules.js:13538 Uncaught SyntaxError: Unexpected token export
es5-shim.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
at es5-shim.js:17
at es5-shim.js:2789
promise.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
at promise.js:17
at promise.js:582
ecmascript-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
at ecmascript-runtime.js:17
at ecmascript-runtime.js:4630
babel-runtime.js:17 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
at babel-runtime.js:17
at babel-runtime.js:160
random.js:18 Uncaught TypeError: Cannot read property 'meteorInstall' of undefined
at random.js:18
at random.js:368
I imagine that I have probably missed an import or something somewhere but can't work out where.
Any help would be awesome.
These are the packages I have installed.
meteor-base#1.0.4
mobile-experience#1.0.4
mongo#1.1.15
reactive-var#1.0.11
jquery#1.11.10
tracker#1.1.2
standard-minifier-css#1.3.3
standard-minifier-js#1.2.2
es5-shim#4.6.15
ecmascript#0.6.3
shell-server#0.2.2
angular2-compilers
barbatus:typescript
accounts-base#1.2.14
npm-bcrypt#0.9.2
accounts-password#1.3.4
reywood:publish-composite
http#1.2.11
alanning:roles
check#1.2.4
dispatch:mocha-phantomjs
tmeasday:publish-counts
hwillson:stub-collections
practicalmeteor:mocha
xolvio:cleaner
~Edit
///the error comes from #angular/http module, I'm going to try rolling it back to see if it helps.
/**
* \#experimental
*
*/
export var QueryEncoder = (function () {//<---- this is the line causing the error
function QueryEncoder() {
}
QueryEncoder.prototype.encodeKey = function (k) { return standardEncoding(k); };
QueryEncoder.prototype.encodeValue = function (v) { return standardEncoding(v); };
return QueryEncoder;
}());
rolling back and forward didn't help at all.
I had the same problem. For me it was due to recently installed ionic plugin. It has started working normal after removing that plugin. Please try removing your recently added plugin. I hope you have tried that by now.

Capybara debug, don't even know where has this error

I am debugging, then the error message pop up like following:
http://127.0.0.1:56121/apps/quicktip/quicktip_model.js|84|=============================checkShownBefore
Started request to "http://127.0.0.1:56121/apps/quicktip/ejs/quicktip.ejs"
Received 200 from "http://127.0.0.1:56121/apps/quicktip/ejs/quicktip.ejs"
http://127.0.0.1:56121/apps/quicktip/quicktip_model.js|31|=============_setTip
http://127.0.0.1:56121/apps/quicktip/quicktip_controller.js|153|======================currentTip
http://127.0.0.1:56121/apps/quicktip/quicktip_controller.js|153|==============finish currentTip
http://127.0.0.1:56121/apps/quicktip/quicktip_model.js|31|=============_setTip
http://127.0.0.1:56121/apps/quicktip/quicktip_controller.js|153|======================currentTip
http://127.0.0.1:56121/apps/quicktip/quicktip_controller.js|153|==============finish currentTip
undefined|0|TypeError: 'undefined' is not a function
It didn't even mention which file is complaining the type error, I tried to use console.log in quicktip_controller.js, to see whether there is anything wrong after this page. But I can get nothing. Any suggestion??
Suggestion is that the undefined is valid in js, but invalid for pure rails environment. So you haveto look into apps/quicktip/ejs/quicktip.ejs or around files for the occurines of undefined keyword in ruby code.

when using remapColumns in different event, sort icon doesn't show when clicking a header

I saved my column permutation info into a table. This information can be reloaded in beforeRequest event:
mynewperm = {....};
myGrid.jqGrid("remapColumns", mynewperm, true);
The columns are reordered correctly. However I lost the header icon. Now if I click any column header, I can not see
the sort icon anymore, then can not sort any column. How can I get it back?
Thank you,
yh
if you are able to change the code, you could test for an undefined of a.grid.headers[a.p.lastsort].
In the source file it could look like this:
// old
var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el
// new:
var previousSelectedTh = ts.grid.headers[ts.p.lastsort] ? ts.grid.headers[ts.p.lastsort].el : null
Indeed if you look at the jquery.jqGrid.src.js source, the line is:
var previousSelectedTh = ts.grid.headers[ts.p.lastsort].el, newSelectedTh = ts.grid.headers[idxcol].el;
Line #1982 in my version. I fixed it by modifying the file and added this just before that line:
if (ts.p.lastsort < 0) // johnl.
ts.p.lastsort = 0;
The problem was that ts.p.lastsort was -1.
I've just managed to fix this issue myself but not using the methods described above. I was receiving the following error message when trying to sort columns in a jqgrid:
TypeError: a.grid.headers[a.p.lastsort] is undefined js/jqgrid/jquery.jqGrid.min.js?1.4:86
I should note that it was Firebug that produced this error message. Our company develops web applications for Chrome but Chrome's Javascript console produced a very uninformative error message:
Uncaught TypeError: Cannot read property 'el' of undefined
After stripping out all but the jqGrid declaration on the page causing the issue, it transpired that removing the "multiSelect" option declaration for the jqGrid solved the issue. Apparently, declaring this option causes an additional hidden column to be added into the grid rendered which enables users to select multiple grid rows at a time. I'm not exactly sure why this caused an issue but after consultation with the programming director here our best guess is that there is a for loop somewhere in the jqGrid library code which is called when column sorting is applied and the loop is not taking into account this extra column which results in it not being defined.
Strange answer to a strange issue but hopefully this will help somebody out in future and save them around 3 hours of debugging!
I've the same issue :
It append to me since i apply the "remapColumns" method in the "loadComplete" event (i get back user column configuration from a cookie).
So when I try to sort a column nothing happen. I got this error in firebug :
a.grid.headers[a.p.lastsort] is undefined -> jquery.jqGrid.min.js (line 93)
maybe it will be helpful to find what the problem is
Thank you

Resources