-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: TypeError: Cannot read property "0" from undefined #4
Comments
Hi, Please note that the grouping grid requires one, and one only, primary key on the foundset is bound to. |
Hi Paolo, The grid is bound to a in memory datasource, which previously did not have a pk. I added changed one column to a PK, but I am still getting the same issues. To answer your questions, it does still show the ungrouped rows, and the error in the browsers console is the same as the error in servoy-admin. |
Hi, the error is server side, the log you posted in your first message doesn't say much unfortunately because the javascript code is compiled. servoy.disableScriptCompile=true Regards, |
Hi Paolo, I am now seeing two different errors, one is coming from a grid that is bound to an in memory table. Here is the error:
The other error is coming from a different grid who's foundset is a ProgressDB table. This table has multiple PKs:
|
Hi, the first type of error is related to the in-mem datasource itself; it may happen for example when the executed query does an "ORDER BY" on a column of type TEXT which doesn't have a length defined (in the design of the in-mem table you can set the length of the column). The query indeed contains an ORDER BY; is the invoice number of type TEXT ? you may be able to reproduce the same error just trying to sort on the column invoice_number. To resolve this error just set a length in the column properties. The second error is indeed notifying you that grouping is not supported on foundset of multiple primary keys. To use the grouping functionality of the grid component the foundset must have a single pk. Regards, |
Hi Paolo, Thank you for the answers. It seems to work now. |
Hi, since the error is server side, the log you posted in your first message doesn't say much unfortunately because the javascript code is compiled. servoy.disableScriptCompile=true Regards, |
Hi Paolo, We added that property to the Servoy.properties file, and redeployed the solution, the end result is the same. We get the same exact errors. Eros |
Hi Paolo, Do we have an update on this? |
Hi Eros, unfortunately i have no updates yet on this matter. Regards, |
Hi Paolo, I can never get this to work in production, not even once. It works only when running from Servoy Developer. I can show you the issue through GoToMeeting. Eros |
Hi Eros, no need for the GoToMeeting session. Since in your case is always reproducible, Thank you, |
Hi Eros, Have you managed to replicate the issue in a sample solution ? I have attached here a patched version of the ag-grid component, where i have enabled some logging into the server-side scripting that is failing. Hopefully will help to better understand what is going on. You can use this component in your project; remove the existing ag-grid you currently use and import the attached zip package into the Web Packages. Note: to enable the logging on server side you must set the Debug level to INFO: Can you do some testing and provide me the servoy_log.txt ? Regards, |
Getting the following error in servoy-admin when grouping a column. Note that this works in developer without any issues, but when deployed it gives this error and it doesn't group:
org.mozilla.javascript.EcmaError: TypeError: Cannot read property "0" from undefined at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3772) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3756) at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3777) at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3793) at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3804) at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1456) at org.mozilla.javascript.gen.C__tomcat_webapps_WebClient_aggrid_groupingtable_groupingtable_server_js_9._c_anonymous_1(Unknown Source) at org.mozilla.javascript.gen.C__tomcat_webapps_WebClient_aggrid_groupingtable_groupingtable_server_js_9.call(Unknown Source) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:406) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3204) at org.mozilla.javascript.gen.C__tomcat_webapps_WebClient_aggrid_groupingtable_groupingtable_server_js_9.call(Unknown Source) at com.servoy.j2db.server.ngclient.component.RuntimeWebComponent.executeScopeFunction(RuntimeWebComponent.java:150) at com.servoy.j2db.server.ngclient.NGFormServiceHandler.executeMethod(NGFormServiceHandler.java:411) at org.sablo.websocket.WebsocketEndpoint$5.run(WebsocketEndpoint.java:333) at org.sablo.eventthread.Event$1.run(Event.java:100) at org.sablo.websocket.CurrentWindow.runForWindow(CurrentWindow.java:77) at org.sablo.eventthread.Event.execute(Event.java:90) at org.sablo.eventthread.EventDispatcher.dispatch(EventDispatcher.java:125) at org.sablo.eventthread.EventDispatcher.run(EventDispatcher.java:89) at com.servoy.j2db.server.ngclient.eventthread.NGEventDispatcher.run(NGEventDispatcher.java:55) at java.lang.Thread.run(Unknown Source)
The Grid is located in a responsive form.
The text was updated successfully, but these errors were encountered: