Hi All,
We haven't touched the application in a while and we just came back to redesign some screens. I started with giving every screen a Custom URL however I noticed one of the screens give the following error in the console:
(Environment and Application are stand-ins for the actual values)
Logger.js:503 [2023-02-21T14:47:35.064Z]: Object with name '0.ebe8xf6v7tp' not found.
Error: Object with name '0.ebe8xf6v7tp' not found.
at Dom.GetElementByUniqueId (Environment/Application/scripts/OutSystemsUI.OutSystemsUI.js?qQCYPzfeGPKwG54fle1ElA:1943:27)
at Sidebar._setCommonHtmlElements (Environment/Application/scripts/OutSystemsUI.OutSystemsUI.js?qQCYPzfeGPKwG54fle1ElA:2267:57)
at Sidebar.build (Environment/Application/scripts/OutSystemsUI.OutSystemsUI.js?qQCYPzfeGPKwG54fle1ElA:2298:22)
at Sidebar.build (Environment/Application/scripts/OutSystemsUI.OutSystemsUI.js?qQCYPzfeGPKwG54fle1ElA:7306:27)
at Object.Initialize (Environment/Application/scripts/OutSystemsUI.OutSystemsUI.js?qQCYPzfeGPKwG54fle1ElA:12440:29)
at Environment/Application/scripts/OutSystemsUI.controller.js?JBKabuYJa0GcTbiKfLS_WQ:22005:37
at e.safeExecuteJSNode (Environment/Application/scripts/OutSystems.js?RnlDcii3Xz75iIHHERIZtA:16:12288)
at OutSystemsUIController.default.sidebarInitialize$Action (Environment/Application/scripts/OutSystemsUI.controller.js?JBKabuYJa0GcTbiKfLS_WQ:21972:12)
at Controller._onReady$Action (Environment/Application/scripts/OutSystemsUI.Interaction.Sidebar.mvc.js?c4g5IWEi8aeSXzlQKOPFQw:448:32)
at Environment/Application/scripts/OutSystems.js?RnlDcii3Xz75iIHHERIZtA:16:23640
I thought it had something to do with the Custom URL so I changed it back but it continues to give me this error. Then because of the "SideBar" mentioned in the errors I added a new SideBar widget on the page and removed the old one and finally I tried removing the Javascript webblock however all of those don't seem to fix the issue...
Does anybody have a suggestion how to continue troubleshooting this issue?
The screen widget tree:
Narrowed it down to a bug in OutSystems. When using Custom URL, if your screen has optional parameters or/and a boolean as an input parameter it will cause the screen to malfunction and also give script errors. The workaround is to change the boolean to an integer and use 1/0 and for the optional parameters to use -1 as a null value instead of nullidentifier(). I reported the bug
Hi Bart van Orizande,
Great to hear that you found the solution. Please mark your this as resolved.
ThanksPankaj
I also faced this kind of issues sometimes. Then I do follow things.
Option-1Let say you are working in Screen1, then create a new copy of the screen lets say Screen2, check if everything is working fine in Screen2 then remove Screen1 and rename Screen2 to Screen1.
If Option-1 does not work.
Option-2Create a new screen let's say Screen2 then copy the content one by one from Screen1 to Screen2. After each copy publish and see if there is the issue occurred or not. So, as your problem seems with UI so you can add a widget one by one in new screen to see if error comes or not.
Hi Pankaj,
Thanks for the suggestion, I tried both options and if I don't add the sidebar widget I don't get the error.. obviously however I can't just leave it out...
I also ran into the Object not found in combination with the Sidebar.
Was doing some screen design with the Sidebar and pulling filtered data by a screen input parameter (mandatory entity identifier).
Since this page was in the menu and I had no current implementation to dynamically set the Identifier in the link of the menu, I just defined it as 1 (which of course gives you a warning but for the given stage was fine).
Now actually the page worked a little bit with the Sidebar but after some more changes and deployments the "Object with name .... not found" error appeared.
After reading this thread about input parameters, I changed the link parameter from 1 to IntegerToidentifier(1) and it fixed the bug.
Quite nasty...
--------------------
Update: It seemed to be fixed but now is back :( not sure why. Seems to be a loading sequence issue as the error does not appear after every refresh. PS: I put the sidebar in the footer but didn't help either
Update #2: I build the screen from scratch and put all the content of the sidebar into a web block. For now it looks good