Problem/Motivation

Follow-up to #2338167: Update ProjectInfo class to reflect changes to extension system and #2034879: [Meta] Fix documentation that refers to enabling/disabling of modules
The ProjectInfo class still uses the word disabled when it actually mean uninstalled.

Proposed resolution

Fix it.

Remaining tasks

Write patch
Review
commit

User interface changes

String changes.

API changes

None

Data model changes

None

Comments

alexpott created an issue. See original summary.

pravin ajaaz’s picture

Status: Active » Needs review
StatusFileSize
new4.64 KB

@alexpott: Replaced all disabled with "uninstalled" in the comment blocks

pravin ajaaz’s picture

StatusFileSize
new4.94 KB

Trimmed the line which exceeded 80 characters

duaelfr’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Hi, thank you for your work!
I'd like to apply that patch to review it but I can't.
Can you reroll it please?

While rerolling, please check again that 80 chars limit, I see a lot of comments that are longer.
In case you don't know, we count 80 chars from the beginning of the line, including leading spaces.

deepakaryan1988’s picture

Assigned: Unassigned » deepakaryan1988
deepakaryan1988’s picture

Assigned: deepakaryan1988 » Unassigned
StatusFileSize
new4.2 KB

Re-rolled the patch

deepakaryan1988’s picture

Status: Needs work » Needs review
duaelfr’s picture

Status: Needs review » Needs work
Issue tags: -Needs reroll

Thank you @deepakaryan1988 for your reroll.

+++ b/core/lib/Drupal/Core/Utility/ProjectInfo.php
@@ -24,13 +24,13 @@ class ProjectInfo {
-   * disabled code should be included in the Available updates report or not),
-   * those are only processed after $projects has been populated with
-   * information about the enabled code. 'Hidden' modules and themes are
-   * ignored if they are not installed. 'Hidden' Modules and themes in the
-   * "Testing" package are ignored regardless of installation status.
+   * uninstalled modules or themes should be included in the Available updates
+   * report or not), those are only processed after $projects has been populated
+   * with information about the enabled code.
+   * 'Hidden' modules are always ignored. "Testing" package are ignored
+   * regardless of installation status.

Source comment has been changed in #2338167: Update ProjectInfo class to reflect changes to extension system.
We should not rewrite that comment again here as it does not mention the "disabled" state anymore.
Can you remove that part of the patch, please?

deepakaryan1988’s picture

Assigned: Unassigned » deepakaryan1988

@DuaelFr On it!

deepakaryan1988’s picture

Assigned: deepakaryan1988 » Unassigned
Status: Needs work » Needs review
StatusFileSize
new4.07 KB

Re-rolled again!

sudheeshps’s picture

Status: Needs review » Reviewed & tested by the community

changes seems to be fine

duaelfr’s picture

+1 RTBC

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 11: update_projectinfo-2553909-11.patch, failed testing.

alexpott’s picture

+++ b/core/lib/Drupal/Core/Utility/ProjectInfo.php
@@ -111,7 +111,7 @@ function processInfoList(array &$projects, array $list, $project_type, $status,
         $project_display_type .= '-disabled';

@@ -131,18 +131,19 @@ function processInfoList(array &$projects, array $list, $project_type, $status,
         $projects[$project_name]['disabled'][$file->getName()] = $file->info['name'];

This needs changing too... and therefore all the theme functions and any css

deepakaryan1988’s picture

ok @alexpott but why patch #11 is now failed? Any idea?

duaelfr’s picture

@deepakaryan1988 RTBC patches are now automatically retested every 24 hours so the code base may have changed since your first submission. In this case it does not seem to be related to the patch so I'll ask the bot to retest your change.

Status: Needs work » Needs review
deepakaryan1988’s picture

@DuaelFr Thanks for the info!!

duaelfr’s picture

Status: Needs review » Needs work
Issue tags: +Novice, +php-novice, +CSS novice

See #14

goz’s picture

Status: Needs work » Needs review
StatusFileSize
new6.21 KB

I found nothing about "disabled" state in css, but delete it in ProjectInfo class and update-project-status theme.

goz’s picture

StatusFileSize
new4.13 KB
duaelfr’s picture

StatusFileSize
new3.32 KB

More readable this way ;)

Status: Needs review » Needs work

The last submitted patch, 21: update_projectinfo-2553909-21.patch, failed testing.

The last submitted patch, 21: update_projectinfo-2553909-21.patch, failed testing.

goz’s picture

Status: Needs work » Needs review
StatusFileSize
new4.48 KB
new685 bytes

Forget my previous patch, patch #11 is the good one.

"Disabled" is confusing. We don't disable modules or themes anymore, but "disabled" name is used in display where "enabled" is used.
See https://www.drupal.org/node/2470145

So i think we have no more things to change after #11 patch, except removing reference to this issue

+++ b/core/lib/Drupal/Core/Utility/ProjectInfo.php
@@ -20,14 +20,14 @@ class ProjectInfo {
* @todo https://www.drupal.org/node/2553909 update class since extensions can
-   *   no longer be disabled.
+   *   no longer be uninstalled.

@Todo Reference to this issue can be removed once this issue is fixed

duaelfr’s picture

@GoZ what about #15?

goz’s picture

+++ b/core/lib/Drupal/Core/Utility/ProjectInfo.php
@@ -111,7 +111,7 @@ function processInfoList(array &$projects, array $list, $project_type, $status,
         // If we're processing uninstalled modules or themes, append a suffix.
         $project_display_type .= '-disabled';
@@ -131,18 +131,19 @@ function processInfoList(array &$projects, array $list, $project_type, $status,
        // If we have a project_name that matches, but the project_display_type
        // does not, it means we're processing a uninstalled module or theme
        // that belongs to a project that has some enabled code. In this case,
        // we add the uninstalled thing into a separate array for separate
        // display.
         $projects[$project_name]['disabled'][$file->getName()] = $file->info['name'];

This 2 parts of code are used to display uninstalled modules or themes in "Disabled" Area.
The "disabled" term is still used in this case because it's used for screens where "Enabled" term is used and not "Installed".
See https://www.drupal.org/node/2470145 for the discussion about "Disabled" / "Uninstalled" use for those screens.

duaelfr’s picture

Status: Needs review » Reviewed & tested by the community

Ok it looks good to me.
Let's delay a bit the removal of all the mentions to the "disabled" word so we can ship this tiny fix before the 8.0.0 release.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice work.

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 03e60eb on 8.0.x
    Issue #2553909 by GoZ, deepakaryan1988, Pravin Ajaaz, DuaelFr, alexpott...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.