Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4251

Generate Password modal button may not always work to generate a password

    Details

      Description

      The Generate button works intermittently. Client report with details below:

      The bug can been seen in the SolusVM module when generating a password. See the attached screenshot if any further clarification is needed.

      Expected Behavior

      When the "Generate Password" modal is created, content is loaded from 'client/dialog/password/' which includes a button with classes '.btn.generate'. The content should be loaded before the modal is shown. When the modal is shown, a "click" event handler is added to the button which will generate a random password.

      Actual Result

      A race condition exists between the modal contents being retrieved via an AJAX request and the click event handler being attached.
      Depending on the speed of 'client/dialog/password/', the modal may be shown before the button exists. If this happens, no click event handler is attached to the button and clicking it will do nothing.

      Steps to Reproduce

      An easy way to reproduce this is to intentionally slow down 'client/dialog/password/' by adding a `sleep(1);` in app/controllers/client_dialog.php to the method ClientDialog::password().

        Activity

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Description The Generate button works intermittently. Client report with details below:

        The bug can been seen in the SolusVM module when generating a password. See the attached screenshot if any further clarification is needed.

        ## Expected Behavior
        When the "Generate Password" modal is created, content is loaded from 'client/dialog/password/' which includes a button with classes '.btn.generate'. The content should be loaded before the modal is shown. When the modal is shown, a "click" event handler is added to the button which will generate a random password.

        ## Actual Result
        A race condition exists between the modal contents being retrieved via an AJAX request and the click event handler being attached.
        Depending on the speed of 'client/dialog/password/', the modal may be shown before the button exists. If this happens, no click event handler is attached to the button and clicking it will do nothing.

        ## Steps to Reproduce
        An easy way to reproduce this is to intentionally slow down 'client/dialog/password/' by adding a `sleep(1);` in app/controllers/client_dialog.php to the method ClientDialog::password().
        The Generate button works intermittently. Client report with details below:

        The bug can been seen in the SolusVM module when generating a password. See the attached screenshot if any further clarification is needed.

        h2. Expected Behavior
        When the "Generate Password" modal is created, content is loaded from 'client/dialog/password/' which includes a button with classes '.btn.generate'. The content should be loaded before the modal is shown. When the modal is shown, a "click" event handler is added to the button which will generate a random password.

        h2. Actual Result
        A race condition exists between the modal contents being retrieved via an AJAX request and the click event handler being attached.
        Depending on the speed of 'client/dialog/password/', the modal may be shown before the button exists. If this happens, no click event handler is attached to the button and clicking it will do nothing.

        h2. Steps to Reproduce
        An easy way to reproduce this is to intentionally slow down 'client/dialog/password/' by adding a `sleep(1);` in app/controllers/client_dialog.php to the method ClientDialog::password().
        admin Paul Phillips made changes -
        Rank Ranked higher
        admin Paul Phillips made changes -
        Rank Ranked lower
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.2.0 Sprint 1 [ 134 ]
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour, 24 minutes [ 5040 ]
        Worklog Id 14978 [ 14978 ]
        jonathan Jonathan Reissmueller made changes -
        Fix Version/s 5.1.0-b1 [ 11703 ]
        Fix Version/s Short Term [ 10800 ]
        Original Estimate 0 minutes [ 0 ]
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              8/Jun/21

              Time Tracking

              Estimated:
              Original Estimate - 0 minutes
              0m
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 24 minutes
              1h 24m

                Agile