We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9550
    • 123 Posts
    JoZ3: thanks for all your posts too. they were mighty helpful getting to the bottom of this.
      • 22019
      • 390 Posts
      It sounds like your $modx_base_path is still wrong - look in config.inc.php, (you can always see check via [[!++site_url]] - perhaps you’ve overridden it in System Settings? Also check to see if you added anything to .htaccess when it was in a subdir....

      Rerunning setup will usually fix paths as a last resort.
        Writer > E-consultant > MODx developer || Salesforce || modx 2.x || PHP 5.2.13 || MySQL client 5.0.86
        • 9550
        • 123 Posts
        odeclas: thanks for your help.

        [[!++site_url]] spits out the new correct base path > http://raw/

        I posted my config.inc.php here: http://modxcms.com/forums/index.php/topic,63005.0.html

        all links generated by modx till have the wrong base URL >> http://ojs/rawc2/

        the only thing I changed in .htaccess was from RewriteBase / (stock value) to RewriteBase /rawc2/
        and now back to RewriteBase /

        re-ran setup before I wrote any of these posts

        I can navigate manually to any resource just fine. MODx still fails generating new links to resources.

        UPDATE: I forgot to change my Base href tag in my header html (I’m an idiot. apologies for side tracking this support thread with this)
          • 8489
          • 90 Posts
          Solution for the wrong path names when MODx is installed in a subfolder - http://modxcms.com/forums/index.php/topic,63182.0.html - Thanks to MadeMyDay!
            • 17249 ☆ A M B ☆
            • 165 Posts
            zc=T (Zoom Crop: Top) is not working for me, always cropping from center instead of top.
            ImageMagick is a requirement for this, i have it installed (phpinfo says its enabled).

            Using Windows 2003 server.
            My ImageMagick installation is 16 static.

            There’s a blank option in system settings "imagemagick_path" maybe the problem?
            Its supposed to be blank? Whats the default installation folder for imagemagick under linux/windows?
            Tried pointing to the folder where ImageMagick is installed ej: "C:\ImageMagick" and still no top cropping.
            Every other aspect of phpthumof seems to be working ok.

            Here’s my call(the output of tv is text and everything is working good except the crop)
            No erros in the console.


            [[*image:phpthumbof=`w=420&h=160&zc=T&f=jpg`]]
            


            Is there a way i can instantiate ImageMagick in a small snippet just to test if it exist?
            Asking for its version or something simple.

            Please help.

              • 28215
              • 4,149 Posts
              lithiumlab,

              I think that was a bug in phpThumb that was fixed in 2.1.0:

              https://github.com/modxcms/revolution/commit/cc1fee261694cd9e73e281492246026b112ad7f3
                shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
                • 17249 ☆ A M B ☆
                • 165 Posts
                Patched the file ( using 2.0.8 ) but still nothing.

                From PHPThumb Documentation:
                zc = zoom-crop. Will auto-crop off the larger dimension
                so that the image will fill the smaller dimension
                (requires both "w" and "h", overrides "iar", "far")
                Set to "1" or "C" to zoom-crop towards the center,
                or set to "T", "B", "L", "R", "TL", "TR", "BL", "BR"
                to gravitate towards top/left/bottom/right directions
                (requies ImageMagick for values other than "C" or "1")

                Seems to be if zc is set then far is not used?

                Thanks for the quick reply.
                  • 17249 ☆ A M B ☆
                  • 165 Posts
                  Here’s my call now.

                  [[*image:phpthumbof=`w=420&h=160&far=T&f=jpg`]]


                  Image now maintains aspect ratio and fit the image to the smallest w/h instead of cropping from top.
                  Still not what i need.

                  Any hints?
                    • 17249 ☆ A M B ☆
                    • 165 Posts
                    Even forcing the default value to crop from top in the same file doesn’t work.
                    (Lines 1392-1392)


                    Guess the patch is not related.


                    								case '1':
                    								case 'C':
                    								default:
                    									$commandline .= ' -gravity north';
                    									break;
                    							}
                    



                    I need a way to make sure ImageMagick its been called. I’m not sure yet.
                    Cropping works fine in the galleryItem TV in the Template Variables section of my resources. Is ImageMagick used for this?
                      • 18463
                      • 121 Posts
                      Martijn van Turnhout Reply #50, 15 years, 3 months ago
                      I have the same issue here. ZC=T just doesn’t work.