Cache Problem on Custom Layout

Permalink 0 0 Browser Info Environment
I work with a theme that dont' have Layout presets in a Concrete 5.8 Installation. If the block cache is enabled all layout breaks. I discovered that the custom css for the layout are not added to the header. Example row:
<link href="https://www.immobilienfrey.ch/ccm/system/css/layout/29" rel="stylesheet" type="text/css" media="all">

In the controller I find the line for adding the css inside the view() function:

if ($this->arLayout instanceof CustomLayout) {
$asset = new CssAsset();
$asset->setAssetURL(URL::to('/ccm/system/css/layout', $this->arLayout->getAreaLayoutID()));
$asset->setAssetSupportsMinification(false);
$asset->setAssetSupportsCombination(false);
$this->requireAsset($asset);
}

I the block will be cached, that function don't will be executed and the css don't will be added to the header. I've moved the snipplet on top of the setupCacheSettings() function so the code will be executed even if block cache is enabled and the problem is solved.


Status: New
Adp replied on at Permalink Reply
Update: Mentioned updated does'nt fix the problem, after a page reload the problem persists. All custom layout break
Adp replied on at Permalink Reply
Problem still the same in Version 8.5.1

Custom Layout does'nt work

concrete5 Environment Information

# concrete5 Version
Core Version - 8.4.3
Version Installed - 8.4.3
Database Version - 20180716000000

# concrete5 Packages
ExchangeCore reCAPTCHA (1.1.1), Migration Tool (0.9.0), Page Redirect (2.0), Thumb Gallery (1.0.3)

# concrete5 Overrides
themes/immobilienfrey/blog_entry.php, themes/immobilienfrey/default.php, themes/immobilienfrey/description.txt, themes/immobilienfrey/full.php, themes/immobilienfrey/index.html, themes/immobilienfrey/left_sidebar.php, themes/immobilienfrey/main.css, themes/immobilienfrey/thumbnail.png, themes/immobilienfrey/typography.css, themes/immobilienfrey/view.php, themes/immobilienfrey/css/reset.css, themes/immobilienfrey/css/960_24_col.css, themes/immobilienfrey/css/text.css, themes/immobilienfrey/css, themes/immobilienfrey/elements/footer.php, themes/immobilienfrey/elements/blog_header.php, themes/immobilienfrey/elements/header.php, themes/immobilienfrey/elements, themes/immobilienfrey/images/BACKGROUND.png, themes/immobilienfrey/images/icon_email.png, themes/immobilienfrey/images/icon_facebook.png, themes/immobilienfrey/images/icon_twitter.png, themes/immobilienfrey/images, themes/immobilienfrey

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4

# Server API
cgi-fcgi

# PHP Version
7.2.16

# PHP Extensions
apcu, bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, exif, fileinfo, filter, ftp, gd, geoip, gettext, gmp, gnupg, hash, iconv, imagick, imap, intl, jsmin, json, ldap, libxml, mailparse, mbstring, mcrypt, mongodb, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, PDFlib, PDO, pdo_dblib, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, recode, Reflection, scrypt, session, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, ssh2, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, yaml, Zend OPcache, zip, zlib

# PHP Settings
max_execution_time - 30
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 1000
memory_limit - 128M
post_max_size - 16M
upload_max_filesize - 16M
ldap.max_links - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
odbc.max_links - Unlimited
odbc.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5
opcache.max_accelerated_files - 4000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0