We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18397
    • 3,250 Posts
    To clarify, I mean do the relative urls change to absolutes without the custom template?
    Unfortunately, I’ve been unable to reproduce the problem...
      • 5292
      • 1 Posts
      There is a bug in the code. That’s why relToAbs isn’t working.

      In the following:

      if (in_array("content",$this->fields["display"]["db"]) && $this->format != "html") {
      			$resource['content'] = $this->relToAbs($resource['content'], $modx->config['site_url']);
      		}
      		
      		if (in_array("introtext",$this->fields["display"]["db"]) && $this->format != "html") {
      			$resource['introtext'] = $this->relToAbs($resource['introtext'], $modx->config['site_url']);
      		}
      


      You should replace it with

      if (in_array("content",$this->fields["display"]["db"]) && $this->format != "html") {
      			$placeholders['content'] = $this->relToAbs($resource['content'], $modx->config['site_url']);
      		}
      		
      		if (in_array("introtext",$this->fields["display"]["db"]) && $this->format != "html") {
      			$placeholders['introtext'] = $this->relToAbs($resource['introtext'], $modx->config['site_url']);
      		}
      


      After that, relative to absolute URLs are working perfectly.
        • 18503
        • 45 Posts
        Quote from: ChupacabrasX at May 08, 2009, 11:07 AM

        There is a bug in the code. That’s why relToAbs isn’t working.

        In the following:

        if (in_array("content",$this->fields["display"]["db"]) && $this->format != "html") {
        			$resource['content'] = $this->relToAbs($resource['content'], $modx->config['site_url']);
        		}
        		
        		if (in_array("introtext",$this->fields["display"]["db"]) && $this->format != "html") {
        			$resource['introtext'] = $this->relToAbs($resource['introtext'], $modx->config['site_url']);
        		}
        


        You should replace it with

        if (in_array("content",$this->fields["display"]["db"]) && $this->format != "html") {
        			$placeholders['content'] = $this->relToAbs($resource['content'], $modx->config['site_url']);
        		}
        		
        		if (in_array("introtext",$this->fields["display"]["db"]) && $this->format != "html") {
        			$placeholders['introtext'] = $this->relToAbs($resource['introtext'], $modx->config['site_url']);
        		}
        


        After that, relative to absolute URLs are working perfectly.

        Awesome. I had this problem with Ditto 2.1.0 and this solution fixed it for me. Thanks!
          -dan
          http://wylio.com
          Wylio - Pictures for Bloggers