N°2060 fix portal crash if css not yet compiled

Was using services.yaml parameters before they were defined
This commit is contained in:
Pierre Goiffon
2019-07-16 09:57:30 +02:00
parent dd620022a8
commit f3572e82ec

View File

@@ -313,13 +313,13 @@ class Basic extends AbstractConfiguration
foreach (MetaModel::EnumPlugins('iPortalUIExtension') as $oExtensionInstance) foreach (MetaModel::EnumPlugins('iPortalUIExtension') as $oExtensionInstance)
{ {
// Adding CSS files // Adding CSS files
$aImportPaths = array($oContainer->getParameter('combodo.portal.base.absolute_path').'css/'); $aImportPaths = array($_ENV['COMBODO_PORTAL_BASE_ABSOLUTE_PATH'].'css/');
foreach ($oExtensionInstance->GetCSSFiles($oContainer) as $sCSSFile) foreach ($oExtensionInstance->GetCSSFiles($oContainer) as $sCSSFile)
{ {
// Removing app root url as we need to pass a path on the file system (relative to app root) // Removing app root url as we need to pass a path on the file system (relative to app root)
$sCSSFilePath = str_replace(utils::GetAbsoluteUrlAppRoot(), '', $sCSSFile); $sCSSFilePath = str_replace(utils::GetAbsoluteUrlAppRoot(), '', $sCSSFile);
// Compiling SCSS file // Compiling SCSS file
$sCSSFileCompiled = $oContainer->getParameter('combodo.absolute_url').utils::GetCSSFromSASS($sCSSFilePath, $sCSSFileCompiled = utils::GetAbsoluteUrlAppRoot().utils::GetCSSFromSASS($sCSSFilePath,
$aImportPaths); $aImportPaths);
if (!in_array($sCSSFileCompiled, $aUIExtensions['css_files'])) if (!in_array($sCSSFileCompiled, $aUIExtensions['css_files']))