Forum

Thread tagged as: Problem

Specific Perch Block causing HTTP 500 server errors when used + template placed...

Hi, We've handed over a fully working Perch site to a client who's now advised that one of our blocks (Gallery Block) when used and saved, crashes the page and causes server HTTP 500 error on the browser. I notice when this happens, the region gets put into draft/preview mode? We have not changed a single thing on the site's code since going live, so it seems odd that this is happening now. The one and only image the client is trying to use is 600k (small). Other perch blocks within this template and working, just the gallery one. Any idea why this might be happening? Could their hosting/SQL be the problem?

Here are the diagnostic report

Debug Message - Perch 3.0.2
[1] SELECT u.*, r.* FROM perch3_users u, perch3_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='da4963e71e681b77029e60b971d4a916' LIMIT 1
UPDATE perch3_users SET userHash='25f2960f81564b7c79ad1247f4039d64' WHERE userID='1'
[35] SELECT p.privKey FROM perch3_user_privileges p
[14] SELECT settingID, settingValue, userID FROM perch3_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
[7] SELECT itemValue FROM perch3_menu_items WHERE itemType='app'
[1] SELECT * FROM perch3_content_regions WHERE regionID=599 LIMIT 1
[1] SELECT * FROM perch3_pages WHERE pageID='105' LIMIT 1
Using template: /templates/content/blocks.html
[1] SELECT * FROM perch3_content_items c WHERE c.regionID=599 AND c.itemRev=4 ORDER BY c.itemOrder ASC
Using template: /templates/content/blocks.html
[1] SELECT * FROM perch3_content_items c WHERE c.regionID=599 AND c.itemRev=4 ORDER BY c.itemOrder ASC
Using template: /templates/content/blocks.html
Form not posted or did not validate
Setting alert: You are editing a draft. Preview (draft)
[1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
[2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
[1] SELECT itemTitle FROM perch3_menu_items WHERE itemType='app' AND itemValue='content' LIMIT 1
[1] SELECT * FROM perch3_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
[2] SELECT mi.*, p.privKey FROM perch3_menu_items mi LEFT JOIN perch3_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
File: /core/apps/content/modes/edit.form.post.php
[1] SELECT * FROM perch3_resources WHERE resourceID='814' LIMIT 1
Array
(
    [assetID] => 814
    [title] => Rope Walk 5
    [_default] => /perch/resources/rope-walk-5.jpg
    [bucket] => default
    [path] => rope-walk-5.jpg
    [size] => 237630
    [w] => 1200
    [h] => 1600
    [mime] => image/jpeg
    [sizes] => Array
        (
            [thumb] => Array
                (
                    [w] => 112
                    [h] => 150
                    [target_w] => 150
                    [target_h] => 150
                    [density] => 2
                    [path] => rope-walk-5-thumb@2x.jpg
                    [size] => 21751
                    [mime] => image/jpeg
                    [assetID] => 815
                )

            [w1800hc0] => Array
                (
                    [w] => 1200
                    [h] => 1600
                    [target_w] => 1800
                    [target_h] => 
                    [crop] => 
                    [density] => 1
                    [path] => rope-walk-5-w1800.jpg
                    [size] => 237630
                    [mime] => 
                    [assetID] => 850
                )

        )

)

and here is the template:

<perch:blocks>
<!--Gallery Block-->
<perch:block type="text3" label="Gallery Block"> 
     <div class="container-wide">
      <div class="gallery-wrapper">
        <div class="w-row">

          <div class="cat-col w-col w-col-3 w-col-medium-6">

           <perch:repeater id="repeatCol1" label="Column 1">
            <div class="practice-block">
              <a class="w-inline-block w-lightbox <perch:content type="select" id="selector" label="Select Image Orientation" options="Square|square, Landscape|landscape, Portrait|portrait" />" data-ix="scroll-in1" rel="group" href="<perch:content type="image" id="galleryImage" label="Gallery Image"/>" style="background-image:url('<perch:content type="image" id="galleryImage" />'); background-position: 50% 50%; background-size: cover;"><img class="image" src="<perch:content type="image" id="galleryImage" label="Image" /> ">

         <script class="w-json" type="application/json">
            { "group": "Gallery", "items": [{
              "type": "image",

              "url": "<perch:content type="image" id="galleryImage" width="1800"/>",
              "caption": "<perch:content type="text" id="caption" label="Image Caption"/>"
            }] }
          </script>

              </a>
              <div class="blue-line"></div>
               <perch:if exists="galleryfeatText"> <perch:content type="textarea" editor="redactor" html="true" id="galleryfeatText" label="Feature Text" /></perch:if>
            </div>
          </perch:repeater>  

          </div>

         <div class="cat-col w-col w-col-3 w-col-medium-6">

           <perch:repeater id="repeatCol2" label="Column 2">
            <div class="practice-block">
              <a class="w-inline-block w-lightbox <perch:content type="select" id="selector" label="Select Image Orientation" options="Square|square, Landscape|landscape, Portrait|portrait" />" data-ix="scroll-in1" rel="group" href="<perch:content type="image" id="galleryImage" label="Gallery Image"/>" style="background-image:url('<perch:content type="image" id="galleryImage" />'); background-position: 50% 50%; background-size: cover;"><img class="image" src="<perch:content type="image" id="galleryImage" label="Image" /> ">


         <script class="w-json" type="application/json">
            { "group": "Gallery", "items": [{
              "type": "image",

              "url": "<perch:content type="image" id="galleryImage" width="1800"/>",
              "caption": "<perch:content type="text" id="caption" label="Image Caption"/>"
            }] }
          </script>

              </a>
              <div class="blue-line"></div>
                <perch:if exists="galleryfeatText"> <perch:content type="textarea" editor="redactor" html="true" id="galleryfeatText" label="Feature Text" /></perch:if>
            </div>
          </perch:repeater>  

          </div>

          <div class="cat-col w-col w-col-3 w-col-medium-6">

           <perch:repeater id="repeatCol3" label="Column 3">
            <div class="practice-block">
              <a class="w-inline-block w-lightbox <perch:content type="select" id="selector" label="Select Image Orientation" options="Square|square, Landscape|landscape, Portrait|portrait" />" data-ix="scroll-in1" rel="group" href="<perch:content type="image" id="galleryImage" label="Gallery Image"/>" style="background-image:url('<perch:content type="image" id="galleryImage" />'); background-position: 50% 50%; background-size: cover;"><img class="image" src="<perch:content type="image" id="galleryImage" label="Image" /> ">

         <script class="w-json" type="application/json">
            { "group": "Gallery", "items": [{
              "type": "image",

              "url": "<perch:content type="image" id="galleryImage" width="1800"/>",
              "caption": "<perch:content type="text" id="caption" label="Image Caption"/>"
            }] }
          </script>

              </a>
              <div class="blue-line"></div>
                <perch:if exists="galleryfeatText"> <perch:content type="textarea" editor="redactor" html="true" id="galleryfeatText" label="Feature Text" /></perch:if>
            </div>
          </perch:repeater>  

          </div>

          <div class="cat-col w-col w-col-3 w-col-medium-6">

           <perch:repeater id="repeatCol4" label="Column 4">
            <div class="practice-block">
              <a class="w-inline-block w-lightbox <perch:content type="select" id="selector" label="Select Image Orientation" options="Square|square, Landscape|landscape, Portrait|portrait" />" data-ix="scroll-in1" rel="group" href="<perch:content type="image" id="galleryImage" label="Gallery Image"/>" style="background-image:url('<perch:content type="image" id="galleryImage" />'); background-position: 50% 50%; background-size: cover;"><img class="image" src="<perch:content type="image" id="galleryImage" label="Image" /> ">

         <script class="w-json" type="application/json">
            { "group": "Gallery", "items": [{
              "type": "image",

              "url": "<perch:content type="image" id="galleryImage" width="1800"/>",
              "caption": "<perch:content type="text" id="caption" label="Image Caption"/>"
            }] }
          </script>

              </a>
              <div class="blue-line"></div>
                <perch:if exists="galleryfeatText"> <perch:content type="textarea" editor="redactor" html="true" id="galleryfeatText" label="Feature Text" /></perch:if>
            </div>
          </perch:repeater>  

          </div>


     </div>
    </div>
  </div>
</perch:block>


 </perch:blocks>
Cormac Kerrigan

Cormac Kerrigan 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

The first thing to do is update to the current version.

If you're still then having a problem, check your server's error log to find the actual error. HTTP 500 is just a status code that says an error has occurred - they'll also be a full error message in the logs.