We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33968
    • 863 Posts
    I might be wrong, but it's likely the context settings are cached so when you try to call makeUrl it uses the cached site_url instead of the dynamically set value. I've run into similar issues with this previously.

    It shouldn't be a big code change to use the relative makeUrl call; I would go with that instead of using up all your time trying to find the perfect solution.
      • 41098
      • 10 Posts
      Quote from: okyanet at Nov 21, 2012, 08:01 PM
      I might be wrong, but it's likely the context settings are cached so when you try to call makeUrl it uses the cached site_url instead of the dynamically set value. I've run into similar issues with this previously.

      It shouldn't be a big code change to use the relative makeUrl call; I would go with that instead of using up all your time trying to find the perfect solution.

      I tried using a relative path makeUrl but the options are just ignored. No matter what i set it's still the full url. SwitchContext doesnt help either.

      But i guess you already know that:

      https://forums.modx.com/thread/71512/dynamic-site-url-setting-within-context#dis-post-398941
      http://tracker.modx.com/issues/5999

      I ended up using str_replace - not pretty but it works...