Confluence
  1. Confluence
  2. CONF-25114

Unable to insert jira issue in comment because I can't click on "Login & Approve" link.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Atlassian Confluence 4.2-CDOG-1684

    • Last commented by user?:
      true

      Description

      note: I'm using opera browser

      I'm trying to insert a new jira issue in my comment (not when editing the confluence page) on EAC and it seems I'm unable to click on "Login & Approve to retrieve data from JAC" button. Javascript issue, or what?

      Steps to reproduce:
      1) I log into EAC, go to some page I can comment.
      2) I click on comment field -> the RTE kicks in and expands
      3) I choose from the comment toolbar "Insert +" -> "JIRA Issue", a dialog pop ups.
      4) Blue " Login & Approve to retrieve data from JAC" appears. I'm not authorized on JAC so OAuth kicks in, that's why I see that message I presume.
      5a) I hit on "Login & Approve" link - nothing happens.
      5b) While I expected I'll be redirected to "Accept/Deny" page on JAC, as it happens when I'm inserting JIRA Issue when editing page, not comment.

      My opera report an uncaught exception:

      Uncaught exception: TypeError: 'AppLinks.authenticateRemoteCredentials' is not a function
      Error thrown at line 6907, column 70 in <anonymous function: createOauthForm>(E):
          AppLinks.authenticateRemoteCredentials(C.authUrl,B.onSuccess,B.onFailure);
      called via Function.prototype.apply() from line 3, column 3152 in <anonymous function: handle>(c) in https://extranet.atlassian.com/s/en_GB/3257/39c36334a8c693d872dc55efce9b7b07ed07f651.65/143/_/download/superbatch/js/batch.js:
          c.handler=j.handler,c.data=j.data,c.handleObj=j;
      called from line 2, column 61714 in <anonymous function: k>(a) in https://extranet.atlassian.com/s/en_GB/3257/39c36334a8c693d872dc55efce9b7b07ed07f651.65/143/_/download/superbatch/js/batch.js:
          return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b
      
      1. appllinks-init-patch.diff
        1 kB
        Paul Curren [Atlassian]

        Activity

        Hide
        Daniel Kjellin [Atlassian] added a comment -

        Seems to be a problem with quick comment

        Show
        Daniel Kjellin [Atlassian] added a comment - Seems to be a problem with quick comment
        Hide
        Paul Curren [Atlassian] added a comment - - edited

        I've confirmed that this is Quick Comment only problem. Even the "traditionally" loaded comment editor (as used when editing a comment) does not have the problem.

        Show
        Paul Curren [Atlassian] added a comment - - edited I've confirmed that this is Quick Comment only problem. Even the "traditionally" loaded comment editor (as used when editing a comment) does not have the problem.
        Hide
        Paul Curren [Atlassian] added a comment -

        The problem is due to the triggering of the AppLinks.Event.READY event.
        This triggered when document.ready (i.e. AJS.toInit) and in the case of it being dynamically loaded in the page, the document is already ready and so it fires the event immediately.

        This means that not all the listeners have bound yet. In this particular case the oauth-dialog.js binds to AppLinks.Event.READY to create the AppLinks.authenticateRemoteCredentials function and this won't be triggered.

        Show
        Paul Curren [Atlassian] added a comment - The problem is due to the triggering of the AppLinks.Event.READY event. This triggered when document.ready (i.e. AJS.toInit) and in the case of it being dynamically loaded in the page, the document is already ready and so it fires the event immediately. This means that not all the listeners have bound yet. In this particular case the oauth-dialog.js binds to AppLinks.Event.READY to create the AppLinks.authenticateRemoteCredentials function and this won't be triggered.
        Hide
        Paul Curren [Atlassian] added a comment -

        Created https://studio.atlassian.com/browse/APL-861 to track this in the AppLinks project.

        Show
        Paul Curren [Atlassian] added a comment - Created https://studio.atlassian.com/browse/APL-861 to track this in the AppLinks project.
        Hide
        Paul Curren [Atlassian] added a comment - - edited

        Once https://studio.atlassian.com/browse/APL-861 has been reviewed and version 3.7.1 of AppLinks released then Confluence should be modified to use this version and the attached patch applied.

        Then...job done

        Show
        Paul Curren [Atlassian] added a comment - - edited Once https://studio.atlassian.com/browse/APL-861 has been reviewed and version 3.7.1 of AppLinks released then Confluence should be modified to use this version and the attached patch applied. Then...job done
        Hide
        Paul Curren [Atlassian] added a comment -

        Releasing AppLinks 3.7.1 has been blocked by: https://jira.atlassian.com/browse/RELENG-451

        Show
        Paul Curren [Atlassian] added a comment - Releasing AppLinks 3.7.1 has been blocked by: https://jira.atlassian.com/browse/RELENG-451
        Hide
        Paul Curren [Atlassian] added a comment -

        applinks-3.7.x has now been merged to master.

        Show
        Paul Curren [Atlassian] added a comment - applinks-3.7.x has now been merged to master.
        Hide
        Paul Curren [Atlassian] added a comment -

        AppLinks 3.7.2 released with the necessary fix and Confluence stable updated to use this version.

        Show
        Paul Curren [Atlassian] added a comment - AppLinks 3.7.2 released with the necessary fix and Confluence stable updated to use this version.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Last commented:
              2 years, 2 days ago