Design & Block Template cannot be set due to jQuery error


Am trying to add a Design & Block Template in a Global Area. When I select this option all controls become unavailable. This is likely, because a jQuery error is thrown. This is it (I obfuscated the domain name with xxx) as taken from the Inspector:

GET https://xxx/concrete/js/jquery.js?ccm_nocache=1d463a94354892a3be95dcca13f94abcbd2779b9 https://xxx/index.php/ccm/system/dialogs/block/design?cID=221&arHandle=Main&arGridMaximumColumns=&arEnableGridContainer=0&aID=20&bID=33 500

So it is a HTTP 500 as seen at the end.

Is this known or is there another way I could assign a block template?

Assuming it’s the code in your Block template that’s causing the issue you could stop the block from rendering in edit mode.

Use something like this at the top of the template:

<?php   if ($page->isEditMode()) { ?>
   <div class="ccm-edit-mode-disabled-item">
        <div style="padding: 40px 0px 40px 0px">
           <?php echo t('Block disabled in edit mode.')?>
} ?>

Thank you. Good suggestion. This might work.

I will keep this solution hot. :slight_smile:

Thank you for this snippet.