0

I am trying to pull images from the FF Matrix field of a weblog to go into a slider on my webpage (here). Currently, I can have it pull from the weblog, but if I try to call the images, I get a server error.

My code on the page is

    {exp:weblog:entries weblog="wrv" entry_id="{segment_4}" disable="trackbacks|categories|member_data"}

    {if cf_wrv_images!=""}
     <div id="slider2">
    {cf_wrv_images}
        <img src="{exp:imgsizer:size src="{cf_wrv_main_img}" width="360" justurl="yes"}" rel="{exp:imgsizer:size src="{cf_wrv_main_img}" height="40" justurl="yes"}">
    {/cf_wrv_images}
    </div>
    {/if}
    {/exp:weblog:entries}

The weblog category is wrv. Currently, the page is pulling the main image (which is used on this page) instead of the entry's images. The code that isn't working is

        {exp:weblog:entries weblog="wrv" entry_id="{segment_4}" disable="trackbacks|categories|member_data"}

    {if cf_wrv_images!=""}
     <div id="slider2">
    {cf_wrv_images}
        <img src="{exp:imgsizer:size src="{img}" width="360" justurl="yes"}" rel="{exp:imgsizer:size src="{img}" height="40" justurl="yes"}">
    {/cf_wrv_images}
    </div>
    {/if}
    {/exp:weblog:entries}

"img" is the column name that I'm trying to pull from, but when I insert it into src, I get a server error telling me that the page isn't formatted correctly.

Help would be greatly appreciated!

4
  • what is the exact server error you are getting?
    – AllInOne
    Jul 3, 2013 at 22:26
  • if you eliminate the second imagesizer call do you get the result you expected? I've seen issues before with calling imagesizer repeatedly from the same template, especially when using the self closing version as you are doing here.
    – AllInOne
    Jul 3, 2013 at 22:29
  • The main text in the server error says: "The website encountered an error while retrieving hoekstratruck.com/index.php/work_ready/test/vehicle/78. It may be down for maintenance or configured incorrectly." The bottom text (that says the actual error) says: "HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request." When I eliminate the second imagesizer, I get the exact same error Jul 9, 2013 at 18:07
  • The issue is apparently with the first imagesizer, '{exp:imgsizer:size src="{img}" width="360" justurl="yes"}"'. Unfortunately, I need this line of code to get the images to fit into the slider that I'm using. Any suggestions? Jul 9, 2013 at 19:00

1 Answer 1

1

Apparently the issue was that the images were larger than the server allowed. This meant that the imagesizer couldn't even access them since the server would intercept the request and deny it.

Thanks to AllInOne for your suggestions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.