You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Display profile task only when there is more than one non-hidden profile.$hidden_profile_count = 0;
foreach ($install_state['profiles'] as$profile) {
$profile_info = install_profile_info($profile->name);
$hidden_profile_count += empty($profile_info['hidden']);
}
$display_select_profile = $hidden_profile_count > 1 && count($install_state['profiles']) != 1;
The code counts the number of hidden installation profiles, not the number of non-hidden installation profiles; $display_select_profile will be TRUE when there is more than one hidden installation profile, not when there is more than one non-hidden profile. (Backdrop core includes three different installation profiles, so count($install_state['profiles']) != 1 is TRUE.)
The correct code would be the following one.
// Display profile task only when there is more than one non-hidden profile.$visible_profile_count = 0;
foreach ($install_state['profiles'] as$profile) {
$profile_info = install_profile_info($profile->name);
$visible_profile_count += !isset($profile_info['hidden']) || empty($profile_info['hidden']);
}
$display_select_profile = $visible_profile_count > 1 && count($install_state['profiles']) != 1;
The text was updated successfully, but these errors were encountered:
avpaderno
changed the title
install_select_profile() would be added as installation task, even when all the installation profiles were hidden
install_select_profile() would be added as installation task even when all the installation profiles were hidden
Dec 29, 2024
install_tasks()
contains the following code.The code counts the number of hidden installation profiles, not the number of non-hidden installation profiles;
$display_select_profile
will beTRUE
when there is more than one hidden installation profile, not when there is more than one non-hidden profile. (Backdrop core includes three different installation profiles, socount($install_state['profiles']) != 1
isTRUE
.)The correct code would be the following one.
The text was updated successfully, but these errors were encountered: