Problem/Motivation

This is a follow-up to #2545520: The same link "available updates" links to two different pages in the same paragraph when there is a problem checking available updates. The following changes were considered out of scope for that issue, especially since changing the text would break existing translations.

See the screenshots for various cases listed in Comment #122 on that issue. Also see Comment #124.

1. When there is a problem checking for updates (to Drupal core or to contributed modules and themes) the status report includes this text from _update_message_text():

There was a problem checking [available updates] for Drupal.

or

There was a problem checking [available updates] for your modules or themes.

(with the link going to /admin/reports/updates).

We considered using the same text in both cases, removing " for Drupal" or " for your modules or themes".

Proposed resolution

(a) Status Report:

Status report screenshot

(b) Status Report - no update manager access:

Status report screenshot - no update manager access

(c) Updates available email:
Updates available email

Remaining tasks

Review how this will affect the Status report and the e-mail generated by update_mail().
Use the simpler text for both cases.
Add before/after screenshots to the issue summary

User interface changes

Before

Status report
TBA
email
TBA
.

After

Status report
TBA
email
TBA

API changes

None.

Data model changes

None.

Issue fork drupal-2919559

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

benjifisher created an issue. See original summary.

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

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now 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.

benjifisher’s picture

Issue summary: View changes
Issue tags: +Nashville2018, +Novice
jds1’s picture

Hi All!

I am working this issue at Drupalcon Nashville right now. Feel free to stop by room 103 if you want to connect. I'm in a yellow shirt.

Thanks!

jds1’s picture

Scratch that. I am moving onto something more frontend. This issue is open!

garypigott39’s picture

I'm gonna have a go at this one.

garypigott39’s picture

Status: Active » Needs review
StatusFileSize
new2.72 KB

So have done the text mods detailed in the ticket. I have also split the long t() commands into single lines as per coding conventions and replaced the deprecated url function. The mods have been tested both as an admin and authenticated user with status report access.

borwickja’s picture

Status: Needs review » Needs work

This is just about there. Excellent. Patch applied cleanly. Text is replaced per specification, and method is replaced per specification. To meet coding standards empty line at 574 needs to be removed, and commas need to be placed after closing paren on lines 122, 130. Did not check email response.

msankhala’s picture

  1. +++ b/core/modules/update/update.install
    @@ -114,10 +114,20 @@ function _update_requirement_check($project, $type) {
    +            [':pending_updates' => \Drupal\Core\Url::fromRoute('update.report_update')->toString()]
    

    Drupal\Core\Url is already imported so you can directly use Url.

  2. +++ b/core/modules/update/update.install
    @@ -114,10 +114,20 @@ function _update_requirement_check($project, $type) {
    +            [':available_updates' => \Drupal\Core\Url::fromRoute('update.status')->toString()]
    

    Same as above.

  3. +++ b/core/modules/update/update.module
    @@ -567,12 +567,12 @@ function _update_message_text($msg_type, $msg_reason, $langcode = NULL) {
    +        [':update-report' => \Drupal\Core\Url::fromRoute('update.status')->toString() ],
    

    Same as above.

garypigott39’s picture

StatusFileSize
new2.69 KB
new1.57 KB

Thanks @borwickja and @msankhala - I have made those changes and rerun my previous manual tests.

garypigott39’s picture

Status: Needs work » Needs review
msankhala’s picture

+++ b/core/modules/update/update.module
@@ -567,12 +567,11 @@ function _update_message_text($msg_type, $msg_reason, $langcode = NULL) {
+      // \Drupal::url('update.status')

Remove commented code. Sorry missed this in first round of review.

garypigott39’s picture

StatusFileSize
new2.65 KB
new521 bytes

@msankhala - thanks for that. Removed now.

benjifisher’s picture

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

From #9:

Drupal\Core\Url is already imported so you can directly use Url.

If the class had not already been imported, then the Drupal coding standards say that we should add a use statement.

I will set the status to NW for the point raised in #12. Also,

+++ b/core/modules/update/update.module
@@ -567,12 +567,11 @@ function _update_message_text($msg_type, $msg_reason, $langcode = NULL) {
+        [':update-report' => Url::fromRoute('update.status')->toString() ],

it looks as though there is a space before the closing bracket. If you look at the testbot's page and click on the link "1 coding standards message", then you will see that the testbot caught that, too. If you set up your IDE or editor to integrate with PHPCodeSniffer, then you can catch things like this earlier in the process.

We also need screenshots before this can be fully reviewed. See the links in the issue summary. It is OK to hack core for the purpose of generating the screenshots.

garypigott39’s picture

Status: Needs work » Needs review
StatusFileSize
new2.65 KB
new551 bytes
new30.96 KB
new31 KB

Hi @benjifisher - thanks for that

- spaces before closing array bracket resolved
- both files already use Drupal\Core\Url
- #12 dealt with in #13 commit
- screenshots below show status report page in both scenarios
- will do email screenshot imminently

benjifisher’s picture

@garypigott39: Nice work! When you upload the screenshot of the e-mail, please also update the issue summary and add all the screenshots with img tags (or use the picture-embed button). The can go under the "Proposed resolution" header.

Also update the "Remaining tasks" section. Maybe you will be able to clear that out.

garypigott39’s picture

StatusFileSize
new39.65 KB

Updates available email screenshot

garypigott39’s picture

Issue summary: View changes
esod’s picture

StatusFileSize
new11.06 KB
new13.52 KB

Working on this patch at Design4Drupal in Boston.

Rerolled the patch with these changes:
Change \Drupal::url to Url::fromRoute.
Put use Drupal\Core\Url; in alphabetical order.

Interdiff attached.

Status: Needs review » Needs work

The last submitted patch, 19: simplify_updates_text-2919559-19.patch, failed testing. View results

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

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now 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.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.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.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). 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.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

pavnish’s picture

Assigned: Unassigned » pavnish
pavnish’s picture

StatusFileSize
new598 bytes

@esod Hi All the things are alredy solved on latest code. So the thing only need to do is
"Put use Drupal\Core\Url; in alphabetical order."
So i am creating a new patch for this.

pavnish’s picture

Assigned: pavnish » Unassigned
Status: Needs work » Needs review
dww’s picture

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

Thanks for moving this forward, everyone.

A) I don't see what this issue has to do with 'Accessibility', and see no mention of why that tag is here in any comment. Removing the tag. If someone thinks this issue has accessibility implications, please explicitly mention them in the Problem/Motivation section of the summary.

B) Patch #26 doesn't make sense. That's definitely not the only change needed here. What happened to the rest of #19?

C) #19 needs a re-roll, and #26 isn't it. ;) Tagging for a genuine re-roll.

Thanks,
-Derek

saurabh-2k17’s picture

Assigned: Unassigned » saurabh-2k17
saurabh-2k17’s picture

Assigned: saurabh-2k17 » Unassigned
Status: Needs work » Needs review

Hi @dww,
1. Patch #19 doesn't apply with 9.1.x dist.
2. I went through core/modules/update/update.install and checked what was changed in #19.
3. "\Drupal::url" has been replaced by "Url::fromRoute", so there is no requirement of that patch.
4. Also in core/modules/update/update.module there is no requirement of the changes.

dww’s picture

Issue tags: -Needs reroll
StatusFileSize
new2.84 KB
new2.72 KB

Hi @Saurabh_sgh, thanks for looking. Re: #30:

1. Agreed, #19 doesn't apply anywhere, anymore. ;)
2: No, that's not the only change in update.install. There's also the wording change, which is the original/main purpose of this issue.
3: Agreed, that change (which was out of scope for this issue, anyway) has already been fixed in the modern branches of core. Sadly, looks like most of the changes introduced in #19 were out of scope. Oh well.
4. Again, mostly agreed, but there are some specific wording changes that should be kept.

Here's an accurate re-roll/re-do of #19 based on the current state of core. It's wildly different from earlier patches, so an interdiff is basically meaningless.

I doubt this will be eligible for a backport all the way to 8.8.x (since it's changing strings). But on the off chance it's considered, also including a re-roll for that branch. The raw 2919559-31.patch applies cleanly to 9.1.x, 9.0.x and 8.9.x branches.

dww’s picture

StatusFileSize
new2.52 KB
new1.15 KB
  1. +++ b/core/modules/update/update.install
    @@ -128,10 +128,21 @@ function _update_requirement_check($project, $type) {
    +          '#markup' => t('Review and install <a href=":pending_updates">pending up
    +dates</a>.',
    

    Stray newline. Sorry.

  2. +++ b/core/modules/update/update.install
    @@ -128,10 +128,21 @@ function _update_requirement_check($project, $type) {
    -        $requirement['description'][] = ['#prefix' => ' ', '#markup' => t('See the <a href=":available_updates">available updates</a> page for more information.', [':available_updates' => Url::fromRoute('update.status')->toString()])];
    +        $requirement['description'][] = [
    +          '#prefix' => ' ',
    +          '#markup' => t('See the <a href=":available_updates">available updates</a> page for more information.',
    +            [':available_updates' => Url::fromRoute('update.status')->toString()]
    +          ),
    +        ];
    

    Upon closer inspection, I think this is out-of-scope code style play. I'm going to undo it.

Also, I'm going to not bother with 8.8.x patches until this lands in a higher branch and a core committer requests a backport. ;)

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

robertoperuzzo’s picture

Assigned: Unassigned » robertoperuzzo
Issue tags: +ddd2022

I'm going to create the issue fork in order to review it using DrupalPod.

dww’s picture

Thanks for reviving this issue! FYI: DrupalPod can work with patches, too. ;)

robertoperuzzo’s picture

StatusFileSize
new41.57 KB

From my test using patch #32: the new message appears correctly in the Drupal status page:

Drupal update status

I'm going to create the merge request.

robertoperuzzo’s picture

Assigned: robertoperuzzo » Unassigned

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs usability review

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

Seems there were failures in the MR.

Not sure what needs to be done for translation updates

Also since this is a UX change tagging for usability review.

carolpettirossi’s picture

Issue tags: -Needs screenshots

I'm removing the "Needs screenshots" tags as the Issue summary has been updated on #18 with the screenshots needed.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Issue summary: View changes
Issue tags: +Needs screenshots

For item 2 in the Issue Summary. The text in update.install was changed in #3182405: Do not use verb "Install" for things other than turning on modules/themes and Url:fromRoute was added in #2731817: Replace all calls to the deprecated Drupal::url() function in Core. The text is now
See the <a href=":available_updates">available updates</a> page for more information and to update your software.
It was changed to remove 'install'.

Item #1. This is still valid. That text was added in 2006, #94154: update.module in core (formerly known as update_status), and has not been changed since.

This should have before and after screenshots, made after the MR is updated.

sourabhjain made their first commit to this issue’s fork.

sourabhjain’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Per 46

sourabhjain’s picture

Status: Needs work » Needs review

I have already addressed the issue mentioned in #46 @smustgrave. Please review my latest commit in #47 in 2082 MR.
Let me know if I have missed anything.

smustgrave’s picture

Status: Needs review » Needs work

Don't think you read the full comment :) It says to include screenshots

kostyashupenko’s picture

Status: Needs work » Needs review
StatusFileSize
new38.67 KB
new23.07 KB

Before:
before

After:
after

kostyashupenko’s picture

StatusFileSize
new37.35 KB
kostyashupenko’s picture

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @kostyashupenko!

longwave’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs screenshots +Needs issue summary update

Unfortunately this is still tagged for usability review.

The issue summary also doesn't describe the proposed solution. There is also a task regarding the update email notification, and it's not clear whether that should be changed as part of this issue or not.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.