Problem/motivation
Due to the new Multilingual module group introduced in #1833184: Find a consistent naming scheme for translation-related modules, update module does not treat language, content translation and interface translation modules as part of core. This does not regress any functionality, since the modules are grouped to be under project "" (empty string), and ignored for update module. Since there are other core modules, core itself is checked for updates. The only visible resulting problem is these modules are not listed anymore as part of core on the available updates page:
Proposed solution
Do not use the 'Core' package as sole indication of a module being in core. The fix in #1871328: Modules in new Multilingual package are no longer tested by Module\EnableDisableTest for example used new conditions to check for the path. The problematic code is:
function update_get_project_name($file) {
$project_name = '';
if (isset($file->info['project'])) {
$project_name = $file->info['project'];
}
elseif (isset($file->info['package']) && (strpos($file->info['package'], 'Core') === 0)) {
$project_name = 'drupal';
}
return $project_name;
}
Also would need a small extension to tests to enable Language module and check it shows up on the available updates page (or if we want to test the pure functionality, to check if language module is part of the core project as decided by update_get_project_name().
Comment | File | Size | Author |
---|---|---|---|
#15 | 1879732-language-available-update-page-15.patch | 2.02 KB | vijaycs85 |
#13 | 1879732-language-available-update-page-13.patch | 608 bytes | vijaycs85 |
#2 | 1879732-language-available-update-page-1.patch | 814 bytes | vijaycs85 |
LanguageModulesUpdate.png | 75.52 KB | Gábor Hojtsy |
Comments
Comment #1
Gábor HojtsyFix title.
Comment #2
vijaycs85Patch for package to path change.
Comment #3
tstoecklerRTBC in case it comes back green. (If not the bot will set it to needs work.)
Comment #5
vijaycs85#2: 1879732-language-available-update-page-1.patch queued for re-testing.
Comment #7
vijaycs85#2: 1879732-language-available-update-page-1.patch queued for re-testing.
Comment #9
vijaycs85Every time getting failed in different test case and seems they are fine locally. Guessing it is testbot.
Comment #10
YesCT CreditAttribution: YesCT commentedAre they all near the end of the tests? This lasted 57 minutes. In think the time out is at 90 min or even higher now so that's probably not it.
Maybe http://drupal.org/node/1859714 or other issues in that queue might have hints.
After reading the "differences between local and test bot" (a link in that issue) I think it would be ok to open a testbot issue.
Comment #11
Gábor HojtsyWhat is the role of the isset() anymore?!
Comment #12
Gábor Hojtsy#2: 1879732-language-available-update-page-1.patch queued for re-testing.
Comment #13
vijaycs85Updated patch with review comment in #11
Comment #14
Gábor HojtsyLooks good :) Can we expand on this in the tests to check for the Language module's appearance on this page for example, so we avoid this regression in the future :) Thanks!
Comment #15
vijaycs85Updating test case...
Comment #16
Gábor HojtsyLooks superb! Thanks for the fix!
Comment #17
YesCT CreditAttribution: YesCT commentedRock on @vijaycs85 ! :)
Comment #18
vijaycs85Thanks @Gábor Hojtsy and @YesCT.
Comment #19
webchickGreat!
Committed and pushed to 8.x. Thanks!
Comment #20
Gábor HojtsySuperb, thanks! :)
@vijaycs85: Thanks for your great work! If you are looking for something on a similar scale, #1853720: Hide language selection option is backwards and #1869328: Restore simplicity of language list are such issues. Eg. the later one needs some simple code updates to ensure weight setup is proper and tests.
Comment #21
vijaycs85Thank you @Gábor Hojtsy. I will check them.
Comment #22.0
(not verified) CreditAttribution: commentedAdd needs tests description.