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

Leaving task while replace all is running leads to JS and PHP errors

    XMLWordPrintable

Details

    Description

      problem

      If a user starts a replace all action which runs for a longer time, and he leaves the task or logs out, that produces on PHP side:

      ZfExtended_NoAccessException: In the meantime, the task was opened in read-only mode.

      And if he leaves the task (not log out) in JS:

      Uncaught TypeError: Cannot read property 'setLoading' of undefined
      at constructor.showReplaceAllLoading (SearchReplace.js?_dc=1566282172714:1737)

       

      solution

      Fire an event beforeLeaveTask where for example search and replace can listen for. If a search and replace request is running, the beforeLeaveTask should return false so that the task leave can be interrupted.

      Attachments

        Activity

          People

            tlauria Thomas Lauria
            tlauria Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: