We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40846
    • 13 Posts
    the problem is actually only in the cache manager as everything works fine but the image isn't saved:
    The call, that worked ok using phpTumb to manage cache is
        <img class="img-mid" src="[[+tv.img_midTV:phpthumbof=`
                &w=230
                &h=363
                &f=png
                &fltr[]=ric|11|18
                `]]" alt="dot2" width="230" height="363" />
    

    After changing the system setting to allow pThumb to manage cache this error appeared in the log and the image is not cached:
    [2014-07-20 13:36:19] (ERROR @ /index.php) [pThumb] Resource: 1 || Image: assets/images/carousel/telang_mid.png
    Could not cache thumbnail to file at: /home/fd000507/public_html/assets/image-cache/images/carousel/telang_mid.b51ece24.png
                
    Resizer debug output:
        [0] => Resizer v1.0.1
        [1] => Using GD
        [2] => Input file: assets/images/carousel/telang_mid.png
        [3] => Input options: 
      '
    ____________' => '',
      'w' => '230
                ',
      'h' => '363
                ',
      'f' => 'png
                ',
      'fltr' => 
      array (
        0 => 'ric|11|18
                ',
      )
        [4] => *** Error *** Saving image in "png
                " format is not supported, please use one of the following extensions: "gif", "jpeg", "png", "wbmp", "xbm"
    ----------------------
    

    I see the arguments are parsed as everything going between = and the next &. Thus, the format, instead of being "png" is
    "png
    "
    with all the spaces
    putting everything in just one line without spaces, solves this but my code gets a little less maintainable...
    Hugs, Abner
    [ed. note: magic_creations last edited this post 9 years, 9 months ago.]
      • 40358
      • 40 Posts
      You already identified the problem.

      The Exstra does not trim whitespace and newlines. You would either have to patch it or write it on a single line.
        • 40846
        • 13 Posts
        Quote from: optimuscrime at Jul 23, 2014, 08:01 AM
        You already identified the problem.

        The Exstra does not trim whitespace and newlines. You would either have to patch it or write it on a single line.
        Hi optimuscrsime, yes you're right, my question already contains the answer... It started as a question, but while describing it, I came to identify the problem...
        I didn't eliminate the topic in case someone had encountered the same problem that I did and could benefit from this answer.
        I don't feel comfortable patching the extra as when I upgrade it I have to remember to re-patch it or it'll break again...
        It could also be considered as a minor bug as the extra being a direct replacement for phpThumbOF should work with the exact same code that is used with phpThumbOF.
        It's no big deal, as soon as you know you need to rewrite the call that used to work...
        hugs, Abner