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

Store internal / local contexturl for notifications as relative URL only.

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 3.4.3, 3.5
    • Messages
    • MOODLE_34_STABLE, MOODLE_35_STABLE

      Summary:

      I would propose to change the data stored in the contexturl column of to mdl_message table in this way:

      • URLs pointing to external ressources should be stored as absolute URLs as it is now.
      • URLs pointing to internal ressources, for example a forum post, should be stored as relative URL only. It might be necessary to differentiate these two cases when the context URL is output in message_popup.

      Background discussion from DevChat:

      abias:

      Hey Mark et al,
      while testing and hotfixing MDL-62658 in our production instance, I have seen that the contexturl in the mdl_message table contains the FQDN of the Moodle instance.
      In our test and dev Moodle instances which have mirrored DBs from prod, this has the result that the links in the notification popup are broken because the redirect simply ends in a dead end.

      I would like to ask of storing the contexturl with FQDN and not relative to wwwroot was made by design (because of some MNet feature or something like that) or if this should be considered as bug and filed in the tracker

      markn:

      Hi Alex, thanks for the ping. TBH I never considered that situation. I suppose it's possible notifications link to an external URL (in a lot of our tests we were using http://google.com) so we just went with storing the full URL. Perhaps, in your sitaution, we can come up with a way to signal the the URL is an internal URL and then use wwwroot to generate the full link dynamically.

      abias:

      Thanks for your response. I think just storing relative URLs for internal notifications and absolute URLs for external notifications would be pragmatic.

            Unassigned Unassigned
            abias Alexander Bias
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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