Return text in hook_help() for case 'entity.action.edit_form': is not wrapped within <p> tag. Rerolling the patch in #2.

Comments

Prashant.c created an issue. See original summary.

prashant.c’s picture

Status: Active » Needs review
StatusFileSize
new846 bytes
naveenvalecha’s picture

Category: Bug report » Task
Status: Needs review » Reviewed & tested by the community

I believe this is not a bug but an improvement.
Thanks!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: action-help-2807807-2-8.3.x-dev.patch, failed testing.

prashant.c’s picture

Status: Needs work » Reviewed & tested by the community
cilefen’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/action/action.module
@@ -30,7 +30,8 @@ function action_help($route_name, RouteMatchInterface $route_match) {
-      return t('An advanced action offers additional configuration options which may be filled out below. Changing the <em>Description</em> field is recommended in order to better identify the precise action taking place.');
+      $output = '<p>' . t('An advanced action offers additional configuration options which may be filled out below. Changing the <em>Description</em> field is recommended in order to better identify the precise action taking place.') . '</p>';
+      return $output;

I do not see the need to add this variable in this patch.

prashant.c’s picture

Status: Needs work » Needs review

To keep the consistency we should add $output,as this is being used in all the switch statement cases in hook_help() for this module.

amit.drupal’s picture

StatusFileSize
new2.04 KB
new1.62 KB

@Prashant.c Improve your patch.

please review .

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

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now 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.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now 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.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.

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.

andypost’s picture

Status: Needs review » Needs work

No reason to make changes outside of the scope of the issue https://www.drupal.org/core/scope

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.

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.

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.

danielveza’s picture

Issue summary: View changes
StatusFileSize
new823 bytes

Makes sense to add the p tags for consistency. Rerolling the patch from #2

danielveza’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 22: 2807807-22.patch, failed testing. View results

elber’s picture

I will do a new rerrol

elber’s picture

Assigned: Unassigned » elber
elber’s picture

Assigned: elber » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.08 KB

Hi I did a reroll, please revise!

danielveza’s picture

AS per #13, patch 27 introduces out of scope changes. I think #22 should be used as the patch for this issue. The fails were random fails from ckeditor5. Rerunning the test now.

elber’s picture

Assigned: Unassigned » elber
Status: Needs review » Needs work

Ok I will revise it

elber’s picture

Assigned: elber » Unassigned
Status: Needs work » Needs review

Moving to needs review

elber’s picture

Assigned: Unassigned » elber
elber’s picture

Assigned: elber » Unassigned
Status: Needs review » Needs work

Moving back to needs work because patch #22 failed in Drupal tests (#24) and reroll removed the output variable.

danielveza’s picture

Status: Needs work » Needs review

#22 is passing tests - You can see its green if you look undernealth the patch. The first fail was a random fail from ckeditor5 unreleated to this patch.

We don't need to introduce an $output variable, we can just return the markup.

lucienchalom’s picture

Status: Needs review » Reviewed & tested by the community

The test are passing and the patch in #22 does exactly as asked in the issue summary.
and as said in other comments, is passing the tests.
Its RTBC in my opinion.

xjm’s picture

Title: Action module hook_help() improvement » Properly wrap action module help for the "add" and "edit" options in a <p> tag

Thanks everyone for your efforts on this documentation improvement.

As has been explained numerous times on this issue, we do not need to set $output here and should not introduce out-of-scope changes to the patch. The fact that it passes tests does not make it RTBC. There is no test coverage for the content of a help page, so the test result isn't actually all that relevant here. Someone should have manually tested it. I did.

The patch in #22 applies fine and is what we want, so I am going to commit that. I am removing credit for the unnecessary reroll in #27 and other scope creep.

Please take care in the future to read all the issue comments of the issue, so that you don't end up spending time rerolling a patch for an approach that was already rejected. Less code is better.

  • xjm committed 6d7ec44e on 10.1.x
    Issue #2807807 by Prashant.c, DanielVeza, cilefen: Properly wrap action...
xjm’s picture

Issue summary: View changes
Priority: Normal » Minor
Status: Reviewed & tested by the community » Fixed
StatusFileSize
new153.78 KB

This is the only change in scope for this issue:

A colored word diff, showing that only the opening and closing paragraph tags are being adde

Committed #22 to 10.1.x. Thanks!

Status: Fixed » Closed (fixed)

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