We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27194
    • 9 Posts
    Hello folks,

    Before I start, this is the first support I’ve needed, because the core code of MODx is clearly excellent. People have clearly put in the hours to make this CMS really good. I’m only just begining to explore it’s potential. Thank you to everyone involved.

    One thing I have found, though, concerns the editors, both TinyMCE and FCKEditor (once added from the Repository) fail to be able to handle images inserted through the user interface on my setup (MODx 0.9.5 on LAMP), by whatever means. I’m having more success with FCKEditor, so I’ll start with that. What follows holds true for accessing the editor through both QuickEdit and the manager interface.

    • Open a page to edit, and start editing a content area either with QuickEdit or the manager interface
    • Click in any point in the text, then click the image insert button
    • In the resulting dialogue, click browse and select the uploaded image file from the server image gallery thing
    • Note that the preview shows a broken image link with the ’Lorem ipsum’ preview text.
    • Note that the reason for the break is the image URL: http://www.udivorce.co.uk/assets/plugins/fckeditor/editor/dialog/fck_image/assets/images/child.jpg
    • Carry on with the image insert, only to discover that there is a broken image displayed in the editor window, too.

    By the looks of it, the editor is using the wrong base URL for its dialogues and the edit box itself. I have tried turning off the rewrite functions, but no improvement.

    Any ideas? Many thanks,
    J.
      • 27194
      • 9 Posts
      Ahem... *BUMP*

      Any ideas, people?

      J.
        • 25663 MODX Staff
        • 12,272 Posts
        WIthout knowing any more about your server config no clue. Broken previews are typically a result of not having the images folders being set to the right permissions, as the FTP user and Apache/PHP user are frequently two different beasts. Make your images folder and any subfolders 777 and see if that helps. If not, please see the stickied post in the general support section about the info we need before making help requests.
          Ryan Thrash, MODX Co-Founder
          Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
          • 10313
          • 375 Posts
          Hi there,

          I think I have the same problem here. I have set up my first MODx test site a few days ago and I am learning by doing. I just used TinyMCE to edit page content including an image. I can create new folders, upload images as i like, the preview in the file manager is rendered correctly, I can select the image, and then it happens:

          In the text field appears a wrong url to the image file resulting in the broken image icon in the preview.

          My test site is set up as a subdomain: modx.mysitename.de wich is redirected to www.mysitename.de/subdomains/modx/
          Additionally, mysitename.de is a co-domain for an international umlaut-domain. And that’s what happens with the image url: It is determined as:
          www.mymaindomainname.de/assets/images/myfolder/myimage.jpg

          This can’t work. And I have no idea where MODx gets that main domain name from. While installing, I only used the subdomain (for the co-domain) mentioned above, and even later I never told MODx about that main domain name.

          I just noticed that the same problem occurs when I use a TV set to "Image". I cant pick the Image and in the textfield appears the wrong domain name.

          Any Ideas? The Server is running on a LAMP server.

          Thx and greetings from Germany
          Martin
            • 4041
            • 788 Posts
            Perhaps take a look at the site configuration options (Interface and features tab likely) and make sure all the paths are correct is the first thing to look at I think, the software automagically sets a couple of them so that may be the culprit.

            Also, just for the sake of it do a clearing of the cache...
              xforum
              http://frsbuilders.net (under construction) forum for evolution
              • 10313
              • 375 Posts
              Thank you for the fast answer. And yes, it was exactly the problem. I don’t know how that wrong domain name came into the configuration and why I did not checkt it before. Now it works exactly as it is supposed to. Great.

              Thx
              Martin
                • 22303 MODX Staff
                • 10,725 Posts
                MODx determines the hostname from the PHP server configuration ($_SERVER), so whatever the server is reporting is what is automatically configured during install. You’ll want to make sure that you use relative paths in these configurations if you want these things to work when accessed from different domains (for instance when testing through a temporary domain), and make sure that you don’t cache any content that includes the full site_url with the domain name.

                I believe this is an area that needs improvement (i.e. always have it use relative paths by default) in the installation processes...and is something I am attempting to address in the new installer that was developed for 0.9.7.