We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    this is an odd one.
    I have my mobile site as another context subdomain.

    I have set in both the web and mobile context the base_url and site_url.
    When I link to images from the mobile site I use
    [[+web]]assets/image/image.png
    but it only works on some pages and on others it looks as broken image link?

    both pages have same template and I can't figure how can it be.

    here is a working page:
    http://m.zebrasecurity.com/aldelo_point_of_sale

    and here is a non working page:
    http://m.zebrasecurity.com/facility_wifi_network
    anyone have any idea what it can be?
      • 42562
      • 1,145 Posts
      What is [[+web]] representing? path to main context (main folder) or mobile context (m sub folder)?

      If the path works in one page, I suppose it should work in another, of the same context, unless the actual files are missing.
      The second link has at least 10 items reporting 404 error - a great deal of Javascript missing.

      The one image, unifi-small.png, does not even exist in the image folder. Whereas the first link has pos.png, which exists.
      aldelo.jpg
      cable-wiring.jpg
      pos.jpg
      pos.png
      wiring.jpg
      zebra.png

      Just a question of physical files.
      If you want the http://m.zebrasecurity.com/ site to have its own images, best to populate its assets folder with all necessary files.
      If you want the http://m.zebrasecurity.com/ site to use files stored on http://zebrasecurity.com/, best to make [[+web]] absolute, that is,
      [[+web]]assets/image/image.png will, in whatever context, always produce
      http://zebrasecurity.com/assets/image.png instead of
      http://m.zebrasecurity.com/assets/image.png
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 3749
        • 24,544 Posts
        Are you sure you don't want this?


        [[++site_url]]assets/image/image.png
          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
          • 42562
          • 1,145 Posts
          Yea right? I reckoned he was aware of what he was doing...and thus created a custom placeholder [[+web]]...
          If not, then [[++site_url]] is the issue...

          Still though, he'll need to make sure the [[++site_url]] points to a domain that has existing physical files
            TinymceWrapper: Complete back/frontend content solution.
            Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
            5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
            • 27330
            • 884 Posts
            Thanks guys.
            Yes I indeed wanted [[+web]] to redirect to the main site assets directory and to use the same images so I can upload from modx file manager.
            I didn't realized I had created in the past actual directory on the server to hold the mobile images.
            using [[++web]] now works as I wanted. thanks for the help.