Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14504

Malformed URLs in civicrm_navigation

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 4.4.5
    • Fix Version/s: 4.5
    • Component/s: None
    • Labels:
      None

      Description

      The majority of the urls in the table civicrm_navigation are malformed. Most don't have the required '?' separator between the path and the query string. Instead they launch straight into the query string using an ampersand '&'.

      Browsers must be forgiving of this as it doens't tend to cause issues, but I'm encountering issues in my own code which expects a valid url.

      I made a temporary fix by issuing the following query:

      UPDATE civicrm_navigation
      SET civicrm_navigation.url = CONCAT(SUBSTRING(url FROM 1 FOR LOCATE('&', url) - 1), '?', SUBSTRING(url FROM LOCATE('&', url) + 1))
      WHERE civicrm_navigation.url LIKE "%&%" AND civicrm_navigation.url NOT LIKE "%?%"

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              torrance123 Torrance
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: