Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-1954

Unable to get property 'query' of undefined or null reference

      problem

      If the iframe is not ready in Editor.plugins.VisualReview.controller.SegmentMapping::getSegmentDom, it can come to the following JS error:
      "Unable to get property 'query' of undefined or null reference" in line 381!

      If the extFrame is falsy the whole function should return also false.

      aleksandar please fix, but with minimal effort so that this may not cause future complications with other functionality in the code (see below discussion)

      Exception details:

       

      Browser / Device:

      Browser: Microsoft Edge 16.16299 
      OS: Windows 10
      Window size: 1536 x 747
      Device pixel ratio: 1.25
      UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299
      Touch:  
      Language: de-DE
      Installed Plugins:
      • Edge PDF Viewer Portable Document Format

      Application:

      Environment:  
      Version identifier: development
      Framework: ExtJS 620
       

      This happening after switchting the view:

       user.click #editorViewport #visualReviewActionButtons #taskActionButtons #switchEditorModeBtn => .x-btn-icon-el

          [TRANSLATE-1954] Unable to get property 'query' of undefined or null reference

          marcmittag basicly you have right. But I don't have a good feeling on leaving known null references in the code, smells like a boomerang. With the loading mask we reduce the chance of getting that problem via user interaction, but what is if the actions causing that errors are triggered other ways (ajax callback or so).

          What is if VisualReview gets more features where the iframe content changes or so?

          Thomas Lauria added a comment - marcmittag basicly you have right. But I don't have a good feeling on leaving known null references in the code, smells like a boomerang. With the loading mask we reduce the chance of getting that problem via user interaction, but what is if the actions causing that errors are triggered other ways (ajax callback or so). What is if VisualReview gets more features where the iframe content changes or so?

          tlauria As I wrote above, we will implement a loading mask that prevents any user interaction, until everything is loaded (VISUAL-46: Loading screen until everything loaded). So I would say visual-45 is obsolete and can not happen any more after VISUAL-46 is implemented, correct?

          Marc Mittag [Administrator] added a comment - tlauria As I wrote above, we will implement a loading mask that prevents any user interaction, until everything is loaded (VISUAL-46: Loading screen until everything loaded). So I would say visual-45 is obsolete and can not happen any more after VISUAL-46 is implemented, correct?

          marcmittag I fell into a similar issue while testing my current work.

          The reason for this bug is simple: When trying to access the iframe while it is loading this error happens.

          As far as I can see no where is a check if the iframe is ready or not.

          So the question is, shall we allow the user to open and save segments while the iframe is not ready or not.

          Thomas Lauria added a comment - marcmittag I fell into a similar issue while testing my current work. The reason for this bug is simple: When trying to access the iframe while it is loading this error happens. As far as I can see no where is a check if the iframe is ready or not. So the question is, shall we allow the user to open and save segments while the iframe is not ready or not.

          marcmittag I don't know. Regardless of the loading mask aleksandar should investigate the issue, since there could be also other reasons why the iframe is falsy there.

          Thomas Lauria added a comment - marcmittag I don't know. Regardless of the loading mask aleksandar should investigate the issue, since there could be also other reasons why the iframe is falsy there.

          tlauria We will implement a loading mask so that the user can not do anything in visualReview until all components are loaded. This would also solve this issue correct? So we can set this issue here to "won't fix"?

          Marc Mittag [Administrator] added a comment - tlauria We will implement a loading mask so that the user can not do anything in visualReview until all components are loaded. This would also solve this issue correct? So we can set this issue here to "won't fix"?

            aleksandar Aleksandar Mitrev
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: