We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26401
    • 247 Posts
    I’ve found that phpthumb in modx sometimes doesn’t show images.

    I’m surprised that even when I reload/refresh the page it still won’t show up, but if I click on the link to go to the same page it works, but if I go back and refresh, it doesn’t.


    This is what I found out. when using absolute path, the paths have to match.
    so if you have http://www.domain.com/image.php?src=http://domain.com/assets/images/image.jpg etc. it will not work

    so ow I’m off to fix the absolute paths.
    but I still don’t understand what would cause the page to redirect without the www


    when using relative paths, the images still tend to not render sometimes. looking in firebug the images look like they are there, but a refresh didn’t fix it. Visiting another site and coming back works in this case though. I’m thinking of removing the hash to see if that helps.

    anyone have any info or can shed some light on this?

      • 31309
      • 70 Posts
      1)put <base href="[(site_url)]" /> in head section
      2)make sure you have right paths to folders (tools->configuration->Interface & Features) in next fields:
      File base path ($_SERVER[DOCUMENT_ROOT]/assets/)
      File Browser URL (assets/)
      3)if it not works - check path in phpThumbs config file..
        • 26401
        • 247 Posts
        I fixed my .htaccess file, to pre-pend the www if it is not there. I haven’t needed to do that before so I hadn’t done it previously. tisk tisk, I know ... smiley
          • 20349 ☆ A M B ☆
          • 453 Posts
          I have the exact problem on my site! sad
          Can you please explain what have you done exactly.... so maybe I can work this thru on my site also smiley


          Thanks in advance wink
            BASE - Web Design Studio
            MODX Ambassador

            Website
            • 26401
            • 247 Posts
            no problem,

            in the .htaccess file you have these lines

            # Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
            #RewriteCond %{HTTP_HOST} .
            #RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
            #RewriteRule (.*) http://www.example.com/$1 [R=301,L]


            I un-commented these (the last three) and replaced example with my domain
              • 20349 ☆ A M B ☆
              • 453 Posts
              I have these on all of my sites and I always forgot to un-comment it smiley


              Are you sure this is the solution for the phpthumb issue? (not yet had time to test it)
                BASE - Web Design Studio
                MODX Ambassador

                Website
                • 26401
                • 247 Posts
                well I’m sure that this was the solution to MY phpthumb issue
                  • 33410
                  • 14 Posts
                  Yes thats true most of the times such problem can occur due to .htaccess rules do you have suphp enabled on your server?