Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-59908

Make sure restore deals with https links

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.2.5, 3.3.2
    • Component/s: Backup
    • Labels:
    • Testing Instructions:
      Hide
      1. Install ngrok (only if you don't have https set up locally, otherwise just use that)
      2. Run it on your site
      3. Go to the http url ngrok gives you
      4. Create a module of your choosing (e.g. forum or book)
      5. Copy the link to it
      6. Create a page
      7. Paste the link in atto. Turn it into a hyperlink
      8. Save
      9. Backup the course
      10. Log out and go to the https url
      11. Restore the backup
      12. Go to the page
      13. Make sure the link is now https
      14. (regression test)
      15. Backup the newly restored course
      16. Restore it
      17. Make sure the link is still https, but links to the new id for your module in this new course
      Show
      Install ngrok (only if you don't have https set up locally, otherwise just use that) Run it on your site Go to the http url ngrok gives you Create a module of your choosing (e.g. forum or book) Copy the link to it Create a page Paste the link in atto. Turn it into a hyperlink Save Backup the course Log out and go to the https url Restore the backup Go to the page Make sure the link is now https (regression test) Backup the newly restored course Restore it Make sure the link is still https, but links to the new id for your module in this new course
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull Master Branch:
      MDL-59908-master
    • Sprint:
      3.4 Sprint 4

      Description

      Raised while discussing MDL-46269

      Comment from Marina -

      When a module contains links to pages in this module they are automatically converted during restore to use new ids. Example in book: https://github.com/moodle/moodle/blob/master/mod/book/backup/moodle2/restore_book_activity_task.class.php#L75

      They are processed somewhere in https://github.com/moodle/moodle/blob/master/backup/util/helper/restore_decode_rule.class.php

      if sourcewwwroot was https but the present links were still http at the moment of backup, such links wouldn't be changed during restore

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Sep/17