Problem/Motivation

The help page for media library shows a duplicate paragraph. The two versions are the same, except the first has a link in it.

Screenshot of media library help page. The same paragraph appears twice.

Proposed resolution

Remove the duplicate paragraph.

Remaining tasks

Patch.

User interface changes

None.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andrewmacpherson created an issue. See original summary.

andrewmacpherson’s picture

andrewmacpherson’s picture

The problem is where hook_help has some conditional text. First it checks to see if Views UI is enabled, to decide whether to include a link or not. But then it outputs another copy of the paragraph anyway:

      if (\Drupal::moduleHandler()->moduleExists('views_ui') && \Drupal::currentUser()->hasPermission('administer views')) {
        // output a paragraph which includes a link
      }
      else {
        // output the same paragraph without the link
      }
      // output the same paragraph without the link    
panshulk’s picture

Assigned: Unassigned » panshulk
Issue tags: +DIACWApril2020
panshulk’s picture

Hey @andrewmacpherson
Thanks for the patch.

Applied the patch and tested the changes on the Module Help Page.
I am able to see that the help text is non-duplicated and the patch was applied successfully.

output

Hence moving this to "Reviewed and Tested By Community".

Thanks !

panshulk’s picture

Assigned: panshulk » Unassigned
Kristen Pol’s picture

Status: Needs review » Reviewed & tested by the community

@panshulk Forgot to mark it RTBC so doing that based on #5.

xjm’s picture

Thank you for reviewing this issue @panshulk!

The automated testing infrastructure tells us whether the patch applies, so we do not need people to review that or post screenshots of the patch applying. For next time, a screenshot of the user interface before and after would be more helpful.

  • xjm committed 167d020 on 9.0.x
    Issue #3099528 by andrewmacpherson: Duplicate paragraph in Media Library...

  • xjm committed 04c4b7b on 9.1.x
    Issue #3099528 by andrewmacpherson: Duplicate paragraph in Media Library...

  • xjm committed 2aaed93 on 8.9.x
    Issue #3099528 by andrewmacpherson: Duplicate paragraph in Media Library...

  • xjm committed a9e15ef on 8.8.x
    Issue #3099528 by andrewmacpherson: Duplicate paragraph in Media Library...
xjm’s picture

Version: 9.0.x-dev » 8.8.x-dev
Status: Reviewed & tested by the community » Fixed

Normally we wouldn't make string changes in 8.8.x at this point, but it's not actually a string change per se; it's just removing a silly redundant copy of the string. For that reason, I consider this patch-safe.

Committed to 9.1.x through 8.8.x. Thanks!

Status: Fixed » Closed (fixed)

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