We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38357
    • 178 Posts
    Hello all,
    When I insert an image into a blog the URL of the image is truncated - src="images/Blog%20Images/296A3372ps500x323.jpg" instead of src="http://www.mysite/images/Blog%20Images/296A3372ps500x323.jpg"

    When I call the blog into an RSS feed in some browsers the images do not show. My research indicates that this may be because the complete URL is not being provided? How to I force the full URL to be used?

    Thanks

      • 3749
      • 24,544 Posts
      When you use a link tag in your Tpl chunk, add &scheme=`full` to it. Here's an example:
      [[~[[+id]] &scheme=`full`]]
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 38357
        • 178 Posts
        Thanks Bob,
        The rss code I am using seems to be showing the full URL for the first image but not the subsequent ones. My code is:
        <item>
          <title>[[+pagetitle:htmlent]]</title>
          <link>[[~[[+id]]? &scheme=`full`]]</link>
          <description>
        [[+content:cdata]]
          </description>
          <pubDate>[[+publishedon:strtotime:date=`%a, %d %b %Y %H:%M:%S %z`]]</pubDate>
          <guid isPermaLink="false">[[~[[+id]]? &scheme=`full`]]</guid>
          <dc:creator>
              [[+createdby:userinfo=`fullname`]]
          </dc:creator>
        </item>


        Firefox accepts the truncated URLs for the subsequent images and displays them but Chrome does not, only displaying the first image with the full URL ?
          • 38357
          • 178 Posts
          Further investigation of this returns me to a problem I have had before editing code in Revolution.

          If I edit the code for the blog in the Content editor (TinyMCE in my case) and change the URL of an image from src="images/Blog%20Images/296A3372ps500x323.jpg" to src="http://www.mysite/images/Blog%20Images/296A3372ps500x323.jpg" manually and save the html code directly the images then show up - they have the full URL shown in the source code of the RSS in the browser now.

          However, if I toggle back to the editor view and the toggle again to the code view again, the code has been changed back to the truncated URL by the editor. If I don't save it the image still shows up ok in the RSS feed, but saving it removes the full URL and it won't show again. The Editor is removing code when I swap views - and it insists on using the shortened URL when choosing an image to insert using the editor view.

          I have had this experience before with swapping views and the editor changing my code from pdf to shockwave-flash. http://forums.modx.com/thread/91337/editor-appears-to-alter-code#dis-post-500618

          Can anyone else confirm this behaviour and is there a solution? Use of the editor by non-coders is causing problems.
          [ed. note: bobd72 last edited this post 8 years, 11 months ago.]