Helix Ultimate - Coming Soon And Error Pages Presets Issue. - Question | JoomShaper

Helix Ultimate - Coming Soon And Error Pages Presets Issue.

A

Alvaro

Helix Framework 23 hours ago

Hi there.

The following is a chronic problem with Helix Ultimate.

Error Page In templates/helixultimate_template/error.php, you have the following code:

$presetData = json_decode($params->get('preset', '{"preset":"preset1"}'));
$preset = isset($presetData->preset) ? $presetData->preset : 'default';

If you read the code, you'll see that 'default' (the most used by users) will never be selected because $presetData->preset will always have a value, whether from the selected preset or 'preset1' passed in the code, regardless of whether Custom Style is enabled.

Our tested solution for when a preset is selected, when no preset is selected ( return preset1), or when Custom Style is enabled:

$custom_style = $params->get('custom_style');
$preset = ($custom_style) ? 'default' : json_decode($params->get('preset', '{"preset":"preset1"}'))->preset;

Coming Soon Page in plugins/system/helixultimate/overrides/layouts/comingsoon.php they try to add the correct preset with: $theme->add_css('presets/' . $params->get('preset', 'preset1') . '.css');

This works if no preset is selected and 'preset' returns null; in that case, it will load preset1. Otherwise, it adds the entire JSON because the value of $params->get('preset', 'preset1') is JSON.

To fix this, we need to add the following to the code:

$custom_style = $params->get('custom_style');
$preset = ($custom_style) ? 'default' : json_decode($params->get('preset', '{"preset":"preset1"}'))->preset;

Then change $theme->add_css('presets/' . $params->get('preset', 'preset1') . '.css'); to $theme->add_css('presets/' . $preset . '.css');

I've attached the corrected files; please review them. https://limewire.com/d/unhqc#LYGlPDrJNi

Regards

0
1 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 14 hours ago #216056

Hi Alvaro,

thanks again, we will check and correct. I will inform our team on Monday.

0