Some background on this issue is probably in order for the uninitiated.

The idea: Create a set of unified end user documentation for modules

I can't seem to find the original issue(s) where this was talked about, but the jist is that the administer >> help section in Drupal used to be a big mess; most modules just plain had no documentation. The ones that did were all over the map in how they were presented -- some in first person, some in third person, some were several screens long, others were just a couple sentences.

So a bunch of people got together and created a set of guidelines for writing module documentation pages, and wrote a consistent set of documentation for each module that followed a common format of two paragraphs describing the module, followed by a list of links that lead to "tasks" you can do with them. The result is now found in the Drupal modules and features and Contributed modules sections.

The challenge: Synchronizing the handbook pages with module help

The next step was to take all this nice documentation that people had written, and get it into the core and contrib modules' help hooks. To solve this, I originally wrote the docbook2helphook script, which took a docbook export of the main modules book page, ran through and parsed out the page titles, help text and threw it into proper t() calls and all that stuff. After many (many, many, MANY ;)) revisions, this effort eventually culminated in a huge, 133K+ core patch that synchronized the two. And all was good. For awhile. ;)

And now, onto the problems... ;)

There are numerous issues we now face:

1. The docbook exporting functionality was removed from core during the 4.7 development cycle. So there are no longer handy "export" links on any of the pages.
2. The export functionality has now been moved to contrib modules such as Export Docbook. None of these are installed on Drupal.org, so there is no longer a way to create an export of all module handbook pages.
3. The Export Docbook module has system requirements which Drupal.org does not have. This means the current script will not work anymore to generate additional patches to keep the two synched.
4. In various "clean up" tasks that have gone on in 4.7 since the initial patch, a lot of re-wording has happened both at the core module help level and at the handbook level. As a result, the two are now out of sync in certain places.
5. This method of synchronization also creates problems in that we either need to have horrifically complicated markup syntax to delineate links (like >strong class="drupal-admin-help">administer >> help>/strong>), _or_ we have broken links/access denied all over the place on the "you can" links which is pretty sad for "official" documentation. :\
6. The link "for more information, see the XXXX handbook page" at the bottom leads to a page on Drupal.org that says _exactly_ the same thing as they were just reading (with the exception that sometimes more sub-pages are found).
7. Because not everyone has edit permissions to the handbook, doing it this way creates a barrier to people who want to make changes to the text that's currently there. They need to make a documentation issue about it and wait for one of the site admins to get a chance to change it. This is particularly irksome if I'm a contrib module author and I want to update my module's handbook page... I _could_ wait around for some person to change it, or I could just change my hook_help directly.. I know which one people will choose in most cases. :P

Some partial solutions

There are a couple possible partial solutions:

1. Use the Export DXML module instead, and rewrite the docbook2helphook script to parse dxml2helphook. This has a number of advantages... DXML outputs additional semantic information, which means far, far less parsing will probably be required on the part of the script. This also opens up the possibility of other sites importing Drupal handbook pages using the book import module. #5 is still an issue.

2. Do the opposite; update help text _only_ in core/contrib modules and have the handbook just execute the help hooks to display them as a user would normally see (with the exception that it would preg_replace the links with strong tags). While this is pretty logical, it comes with a couple strong disadvantages:

a) It requires people who want to contribute to documentation to submit patches... since a lot of really good writers are not coders, and since there are very few people contributing to documentation, the barrier to participation is something worth considering... coders are often not the best people to write end-user documentation.

b) There are security issues involved; while core modules would have a guarantee to be free of any nastiness, we would definitely not be able to apply this same strategy to contrib module documentation, which might contain who knows what. :P

So. Any ideas? ;)

Comments

cel4145’s picture

Two thoughts:

1) IMHO,the help hook method is a bad idea. This was the old method. Help documentation rarely ever got updated.

2) Another possible solution. Save the HTML code from the handbook for a module in a file. Parse that to generate the patch. Repeat. to generate additional patches for each module. Make the script available in CVS, allowing everyone to help in generating the patches and contrib developers to patch their code with new help text versions whenever they like.

Amazon’s picture

Nice recap. I'll have to let you know the full story ;-)

Thanks for doing the detailed explanation of the issues.

If the export DHTML module works let's use that on Drupal.org. Djun? Adding a class to the admin help stuff doesn't seem like that big an issue once we standardize on it.

Kieran

RobRoy’s picture

For #5 could we add a custom handbook filter to transform any links to admin/* to something like this? It's a bit hackish I know, so any other suggestions are welcome.

if (!user_access('access administration pages')) {
  // Change link to a bold http://www.example.com/admin/*
}

So for 4.7 are we going to be pulling the handbook pages out of the modules with Export DXML or something? If we do end up doing that we can always change the book pages to include an inline call / filter with a conditional to see if the viewing user has admin rights.

Amazon’s picture

Rob, you rock!

Thanks for following through.

Kieran

cel4145’s picture

That's a good idea. Here is the original method that webchick and I had thought about and I implemented for core modules. Problems since then do suggest your method might be better (and certainly easier--the core module pages were a pain to code the links that way). Note that we still have to deal with the special case of cron.php (see example in that linked page).

anschinsan’s picture

Project: Documentation » Drupal core
Version: » 7.x-dev
Component: Installation » documentation
jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Category: task » feature

I guess this is a feature request for Drupal 8 at this point?

jhedstrom’s picture

Version: 8.0.x-dev » 8.1.x-dev
jhodgdon’s picture

Component: documentation » help.module

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.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.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.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.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.

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.

smustgrave’s picture

Status: Active » Closed (outdated)

Closing this as outdated as the help module is transition to the help_topic which will offer a new approach.

Would recommend reviewing that module and see if you have any questions!