3

On "Dashborad" or "WorkflowActivities" view, when I run $display.getView() in the console of the browser, I get the desired result as below:

enter image description here

But if I leave the page idle for sometime, the same code start throwing the exception as below:

enter image description here

Any idea why is it behaving like this?

1
  • Not sure if it's related, but I had issues selecting things in the console because of the slide out navigation pane. Here's an explation from PeterK about extra frames and a work-around from @UIBeardCore: tridion.stackexchange.com/q/7418/46 (window.top.frames[0].Tridion.getApplicationWindow()). Commented Oct 14, 2016 at 22:47

1 Answer 1

4

If it worked before and it doesn't after you

leave the page idle for some time

Then either:

  • something is killing the $display parameter (in which case I'm sure you'd see a plethora of errors):
    • perhaps you've some script that executes in between it working and not working (is there a consistent timeframe for example) and causes a refocus on another frame without access to your require params/$display.view
  • or something within the context of the debug console has changed

Can you confirm if, after the error presents itself, you are viewing the same frameset as identified below (note that there may be more than 1 dashboard displayed and not all will necessary behave the same with regards available parameters etc.)

enter image description here

I presume that this is a problem that's causing some script you're writing to fall over (as opposed to purely being angry that the console debug fails you - I've been there, believe me!) - is it possible to simply test that you have access to the correct params in your code and gracefully fall over?

Or perhaps you could attach an event to the item you're losing focus from and use breakpoints or similar to track where it's going which may lead to why (especially if the console gives you access to the call stack etc.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.