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

    I'm having a problem using phpthumbof 1.4.0 after I updated from MODX 2.2.4 to MODX 2.2.6 on modx cloud.

    I have the following code in a chunk:

    [[phpthumbof? &input=`01_webarkiv/07_JPG/[[+tv.producent]]/[[+tv.varenr]].jpg` &options=`&w=185&h=123&zc=0&aoe=0&far=C`]]


    But since the update, the far=C part doesn't work anymore. Phpthumbof simply outputs a image that complies with either the height or the width parameter.

    Hasa anyone else encountered this error or have any suggestions on how to fix it?

    This question has been answered by MathiasD. See the first response.

      Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
    • discuss.answer
      • 18608
      • 112 Posts
      And I found a solution myself, unfortunately it requires editing core files:

      In core/model/phpthumb/phpthumb.class.php on line 1116

      I changed this line:
      if ($which_convert && ($which_convert{0} == '/') && (function_exists('stream_resolve_include_path') ? @stream_resolve_include_path($which_convert) : @file_exists($which_convert))) {


      Into this:
      if ($which_convert && ($which_convert{0} == '/') && @file_exists($which_convert)) {


      Apparently there is some problems detecting ImageMagic in the new version, fortunately the code from the 2.2.4 version works, at least on modx cloud servers...
        Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
        • 1343 ☆ A M B ☆
        • 2,213 Posts
        Could you file this on tracker.modx.com so they can get it fixed in future releases?
          Patrick | Server Wrangler
          About Me: Website | Tweets |  MODX Hosting
          • 18608
          • 112 Posts
          I found an issue on it already, and wrote it there:

          http://tracker.modx.com/issues/9006

          This is were it went wrong (for the setup i'm running):
          https://github.com/modxcms/revolution/commit/b807d06c5d86f200c0646f1aa2f8c97fa5970b45
            Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang
            • 36416
            • 589 Posts
            Quote from: MathiasD at Dec 14, 2012, 04:20 AM
            I found an issue on it already, and wrote it there:
            http://tracker.modx.com/issues/9006

            This is were it went wrong (for the setup i'm running):
            https://github.com/modxcms/revolution/commit/b807d06c5d86f200c0646f1aa2f8c97fa5970b45

            Could you please specify your setup?
              • 18608
              • 112 Posts
              Quote from: danilocuculic at Dec 14, 2012, 05:52 AM

              Could you please specify your setup?

              MODX 2.2.6 on modxcloud.com server.

              As far as I understand the error is connected with the php version the server run, and if it is able to correctly detect ImageMagic (that is needed for the zc and far parameters) on the server. So presumably this works on other setups...
                Mathias Dannevang | Webdesigner at dannevang.org | Tweets @dannevang