Add Layout Error

Permalink Browser Info Environment
1. When I add a layout to the main area and then publish, the whole main area becomes a blank white, and nothing shows?

Type:
Status: Resolved
deanhawthornthwaite
View Replies:
formigo replied on at Permalink Reply
formigo
There is a bug in concrete5 which means any blocks within a layout are not classed as 'blocks' - there is a test within the theme to see if a block exists or is in edit mode. If this test fails then the area will not render. As is the case here

If you add a blank content block in to the main area this should remedy the issue.
AHRMAVintage replied on at Permalink Reply
AHRMAVintage
After researching this issue for our site, I found others had solved it via updating the check for the area content to include populated layouts. I updated the relevant area's that might have a layout in each of the theme's pages in the packages/venture/themes/venture directory and it works quite well.

An example of what worked for us is below.

From:
<?php  
   $a = new Area('Main');
   if ($c->isEditMode() || $a->getTotalBlocksInArea($c) > 0 ) {
       echo '<div class="pad-top pad-bottom pad-left pad-right">';
       $a->display($c);
       echo '</div>';
}
?>

To:
<?php  
   $a = new Area('Main');
   $adump = $a->getAreaLayouts($c);
   if (($a->getTotalBlocksInArea($c) > 0) || !empty($adump) || ($c->isEditMode()) ) {
       echo '<div class="pad-top pad-bottom pad-left pad-right">';
       $a->display($c);
       echo '</div>';
   }
?>


Original thread:http://www.concrete5.org/community/forums/customizing_c5/disappeari...
formigo replied on at Permalink Reply
formigo
Nice one. Will keep this in mind.

concrete5 Environment Information

# concrete5 Version
5.6.3.2

# concrete5 Packages
Maintenance Editor (1.2.2), Show Page Title (1.0), Venture (1.0.3).

# concrete5 Overrides
languages/nb_NO, languages/zh_TW, languages/ro_RO, languages/sk_SK, languages/fa_IR, languages/el_GR, languages/es_MX, languages/nl_NL, languages/fi_FI, languages/es_AR, languages/cs_CZ, languages/fr_FR, languages/es_ES, languages/it_IT, languages/vi_VN, languages/de_DE, languages/ja_JP, languages/sl_SI, languages/tr_TR, languages/pt_PT, languages/da_DK, languages/ru_RU, languages/ar, languages/sv_SE, languages/es_PE

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off

# Server Software
Apache

# Server API
cgi-fcgi

# PHP Version
5.3.29

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, ereg, exif, ffmpeg, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, ionCube Loader, json, libxml, mbstring, mcrypt, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, pspell, Reflection, session, SimpleXML, soap, sockets, SourceGuardian, SPL, SQLite, sqlite3, ssh2, standard, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, Zend Guard Loader, zip, zlib.

# PHP Settings
max_execution_time - 60
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 256M
post_max_size - 128M
safe_mode - Off
safe_mode_exec_dir - <i>no value</i>
safe_mode_gid - Off
safe_mode_include_dir - <i>no value</i>
sql.safe_mode - Off
upload_max_filesize - 128M
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - nocache
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
safe_mode_allowed_env_vars - PHP_
safe_mode_protected_env_vars - LD_LIBRARY_PATH

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:33.0) Gecko/20100101 Firefox/33.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.