Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4163

Plugin lifecycle hooks aren't working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 4.1.0
    • 4.0.2
    • Site add-ons
    • Hide
      1. Install the local_sandbox plugin attached to this issue in a Moodle site.
      2. Connect to the site using the mobile app.
      3. Open the more menu, and click on "Sandbox".
      4. Leave or refresh the page, and you should see a message saying "The plugin component has been destroyed". Before the fix, this message would not appear.
      Show
      Install the local_sandbox plugin attached to this issue in a Moodle site. Connect to the site using the mobile app. Open the more menu, and click on "Sandbox". Leave or refresh the page, and you should see a message saying "The plugin component has been destroyed". Before the fix, this message would not appear.
    • MOODLE_400_STABLE
    • MOODLE_401_STABLE
    • Moodle App 4.1.0

      In the current version of the app, overriding lifecycle hook such as ngOnDestroy is not working as expected. It is possible that this broke during the upgrade to Ionic 5, but we didn't notice until now.

      Doing some tests I've asserted that the problem originates from the way we're declaring the lifecycle hooks, which is overriding them at runtime. This is something that may have changed in newer versions of Angular, given that these hooks are dependant on implementing a Typescript interface which shouldn't have any bearing at runtime but is used by Angular's compilation process.

            noeldemartin Noel De Martin
            noeldemartin Noel De Martin
            Dani Palou Dani Palou
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.