We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37165
    • 89 Posts
    Hi, I'm having an usual problem. I have 8 different urls all under the same modx install. about.presbyterianhomes.org, lakeforestplace.org, seniorcareanswerteam.org, tentwentygrove.org, themooringscarecenter.org, themooringsofarlingtonheights.org and westminsterplace.org. All of these sites use the same interior page template that has a TV that sets a header image. In my chunk that TV is output using PHPThumbOf. This works on all the sites except one, kinghome.info.

    Here is my chunk code:

    
    <main class="rowWrapper clearfix">
    					
    <article class="column sixtySix typography">
    						
    [[*longtitle:is=``:then=`<h1 class="serif">[[*pagetitle]]</h1>`:else=`<h1 class="serif">[[*longtitle]]</h1>`]]
    <figure class="marginBottom"><img src="[[!phpthumbof? &input=`[[*uploadImg]]` &options=`&w=800&aoe=1&h=300&zc=1`]]" alt="[[*longtitle:default=`[[*pagetitle]]`]]" ></figure>
    
    


    When I run this on any page of any site except kinghome.info I get a normal output. However when I run it on the Kinghome page, the whole chunk is processed except the image tag which outputs as :

    <img src alt="Assisted Living">
    


    No value is passed into the SRC field. I can't figure out why this would work on every other site except this one. Does anyone have any ideas?
      • 44195
      • 293 Posts
      The only strange thing I can see at first glance is in the options param you've got &w=800. You shouldn't need the & if it's the first one.

      I haven't used phpthumbof in a while so unsure of it's quirks. If removing the above doesn't work, I'd recommend installing the pthumb extra instead. It should work with the same code you've got.
      Another option is to try it as an output filter instead

      [[*uploadImg:phpthumbof=`w=800&aoe=1&h=300&zc=1`]]
      



      Edit: Although if this is the same chunk for all sites, it's highly unlikely to be a problem with the chunk. Could it be a context permissions problem?
        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
        • 37165
        • 89 Posts
        Thanks Murray,

        I tried removing the '&' and installed pthumb. Both had no change. I switched to an output modifier and it showed the original image path in my SRC value, not the php image cache.

        I looked at my context settings and access permissions and they are identical to my sites that are working(except for details like url, etc.). I have to think you are right though, that it's not an issue with the chunk...

        Any other ideas?


        Quote from: muzzstick at Dec 12, 2016, 09:03 PM
        The only strange thing I can see at first glance is in the options param you've got &w=800. You shouldn't need the & if it's the first one.

        I haven't used phpthumbof in a while so unsure of it's quirks. If removing the above doesn't work, I'd recommend installing the pthumb extra instead. It should work with the same code you've got.
        Another option is to try it as an output filter instead

        [[*uploadImg:phpthumbof=`w=800&aoe=1&h=300&zc=1`]]
        



        Edit: Although if this is the same chunk for all sites, it's highly unlikely to be a problem with the chunk. Could it be a context permissions problem?