Incorrect logic means that the wrong information (particularly concerning the profile's dependencies) can be returned.

Comments

David_Rothstein’s picture

Status: Active » Needs review
StatusFileSize
new8.35 KB
new4.36 KB

The first patch contains tests only and should have two failures. The second patch also contains the fix and should pass.

While writing this patch, it occurred to me that the fact that install_profile_info() even takes a langcode as the second parameter is a little suspect (the way it's used it seems like it would be better as separate logic in the installer rather than hardcoded in an API function). But that's only half the bug anyway, and we can't remove this parameter here if we want to backport this fix to Drupal 7, so I've fixed both issues for the time being. I may open a followup about removing that parameter in Drupal 8, though.

kscheirer’s picture

Issue tags: -Needs backport to D7

#1: install-profile-info.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, install-profile-info.patch, failed testing.

cilefen’s picture

cilefen’s picture

Title: install_profile_info() function has caching bugs and returns inconsisent data » install_profile_info() returns inconsisent data
Issue summary: View changes
Status: Needs work » Active

I changed the scope of this issue and setting back to active because of the time passed and because #2474537: Installing in a non-English language fails for command-line installations (Drush, ...) will take care of the caching behavior.

cilefen’s picture

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

sime’s picture

Status: Active » Closed (cannot reproduce)

I started stubbing out the new test using KernelTestCase (the old one using DrupalWebTestCase).
The old test loads three sets of profile data.

$testing_info = install_profile_info('testing');
$standard_info = install_profile_info('standard');
$es_info = install_profile_info('testing', 'es');

I couldn't see any discrepancy in the returned data, and it's not clear what the discrepancy should look like. One of the assertions check that the locale module is set as a dependency of the spanish one, and it appears to be fine. So I guess I can't reproduce and I want to assume that something is fixed in the last 9 years.

The raw array data from the above code is below.

# Standard profile

array(12) {
  ["config_install_path"]=>
  NULL
  ["core_incompatible"]=>
  bool(false)
  ["core_version_requirement"]=>
  string(9) "9.1.0-dev"
  ["dependencies"]=>
  array(0) {
  }
  ["description"]=>
  string(77) "Minimal profile for running tests. Includes absolutely required modules only."
  ["hidden"]=>
  bool(true)
  ["install"]=>
  array(5) {
    [0]=>
    string(10) "page_cache"
    [1]=>
    string(18) "dynamic_page_cache"
    [2]=>
    string(10) "path_alias"
    [3]=>
    string(6) "system"
    [4]=>
    string(4) "user"
  }
  ["name"]=>
  string(7) "Testing"
  ["php"]=>
  string(5) "7.3.0"
  ["themes"]=>
  array(1) {
    [0]=>
    string(5) "stark"
  }
  ["type"]=>
  string(7) "profile"
  ["version"]=>
  string(9) "9.1.0-dev"
}


# Standard profile for spanish

array(12) {
  ["config_install_path"]=>
  NULL
  ["core_incompatible"]=>
  bool(false)
  ["core_version_requirement"]=>
  string(9) "9.1.0-dev"
  ["dependencies"]=>
  array(0) {
  }
  ["description"]=>
  string(77) "Minimal profile for running tests. Includes absolutely required modules only."
  ["hidden"]=>
  bool(true)
  ["install"]=>
  array(6) {
    [0]=>
    string(10) "page_cache"
    [1]=>
    string(18) "dynamic_page_cache"
    [2]=>
    string(10) "path_alias"
    [3]=>
    string(6) "system"
    [4]=>
    string(4) "user"
    [5]=>
    string(6) "locale"
  }
  ["name"]=>
  string(7) "Testing"
  ["php"]=>
  string(5) "7.3.0"
  ["themes"]=>
  array(1) {
    [0]=>
    string(5) "stark"
  }
  ["type"]=>
  string(7) "profile"
  ["version"]=>
  string(9) "9.1.0-dev"
}

# Test profile

array(12) {
  ["config_install_path"]=>
  NULL
  ["core_incompatible"]=>
  bool(false)
  ["core_version_requirement"]=>
  string(9) "9.1.0-dev"
  ["dependencies"]=>
  array(0) {
  }
  ["description"]=>
  string(51) "Install with commonly used features pre-configured."
  ["hidden"]=>
  bool(false)
  ["install"]=>
  array(38) {
    [0]=>
    string(4) "node"
    [1]=>
    string(7) "history"
    [2]=>
    string(5) "block"
    [3]=>
    string(10) "breakpoint"
    [4]=>
    string(8) "ckeditor"
    [5]=>
    string(5) "color"
    [6]=>
    string(6) "config"
    [7]=>
    string(7) "comment"
    [8]=>
    string(10) "contextual"
    [9]=>
    string(7) "contact"
    [10]=>
    string(17) "menu_link_content"
    [11]=>
    string(8) "datetime"
    [12]=>
    string(13) "block_content"
    [13]=>
    string(9) "quickedit"
    [14]=>
    string(6) "editor"
    [15]=>
    string(4) "help"
    [16]=>
    string(5) "image"
    [17]=>
    string(7) "menu_ui"
    [18]=>
    string(7) "options"
    [19]=>
    string(4) "path"
    [20]=>
    string(10) "page_cache"
    [21]=>
    string(18) "dynamic_page_cache"
    [22]=>
    string(8) "big_pipe"
    [23]=>
    string(8) "taxonomy"
    [24]=>
    string(5) "dblog"
    [25]=>
    string(6) "search"
    [26]=>
    string(8) "shortcut"
    [27]=>
    string(7) "toolbar"
    [28]=>
    string(8) "field_ui"
    [29]=>
    string(4) "file"
    [30]=>
    string(3) "rdf"
    [31]=>
    string(5) "views"
    [32]=>
    string(8) "views_ui"
    [33]=>
    string(4) "tour"
    [34]=>
    string(14) "automated_cron"
    [35]=>
    string(10) "path_alias"
    [36]=>
    string(6) "system"
    [37]=>
    string(4) "user"
  }
  ["name"]=>
  string(8) "Standard"
  ["php"]=>
  string(5) "7.3.0"
  ["themes"]=>
  array(2) {
    [0]=>
    string(6) "bartik"
    [1]=>
    string(5) "seven"
  }
  ["type"]=>
  string(7) "profile"
  ["version"]=>
  string(9) "9.1.0-dev"
}