No Code Attached Yet bug
avatar particthistle
particthistle
14 Feb 2021

The Joomla 4 Help index is missing a number of help documents.

When you attempt to rebuild the list manually, there's an error, but rebuilding the list manually should not be something expected of end users - the helptoc.json I would think is provided to users in the Joomla package and when they update their websites.

Steps to reproduce the issue

To view the index go to Help > Joomla! Help in the Joomla 4 administrator dashboard.
image

Two examples of missing items are help pages on Mail Templates (eg https://docs.joomla.org/Help4.x:Mail_Templates) and Workflow (eg https://docs.joomla.org/Help4.x:Workflows_List)

To attempt to rebuild the index execute php build/helpTOC.php (which needs NPM and Composer run to install dependencies)

Expected result

The help index should match the number of Joomla 4 help items available (235 at time of raising the issue).

Actual result

The help index currently only has 86 help pages in the index.
Running the index build command php build/helpTOC.php returns an error if you have not got NPM installed.

System information (as much as possible)

Issue exists in Joomla version, ‎4.0.0-beta8-dev

Additional comments

After discussion, the issue has transformed considerably. There is nothing wrong with the build/helpTOC.php process directly.

The problem is that there's a significant number of language strings missing for the additional pages. A PR will follow.

Previous related issues:
#19308 Issue initially raised
#29788 Variation raised
#29804 PR for 29788, but may not have been fully tested before merging?

avatar particthistle particthistle - open - 14 Feb 2021
avatar joomla-cms-bot joomla-cms-bot - change - 14 Feb 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Feb 2021
avatar brianteeman
brianteeman - comment - 14 Feb 2021

The script is a command line script and based on your screenshot you are trying to run it in the browser.

I have just run the script at the command line and it runs without error and generates 86 pages.

Why do you expect there to be more pages

avatar brianteeman
brianteeman - comment - 14 Feb 2021

/*
* Check to make sure a COM_ADMIN_HELP string exists, don't include in the TOC if not
*/

avatar brianteeman
brianteeman - comment - 14 Feb 2021

In summary. If there is no language string found then it is not included

avatar particthistle
particthistle - comment - 16 Feb 2021

The issue has three parts to it now...

Part 1: Abstract Method error in PHP stops the index being generated.

Command line failed for me too, giving the same error message as showed at the top of the browser screen shot.
Error: Class MediawikiCli contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Joomla\CMS\Application\CMSApplicationInterface::getName)

I've tested it via PHP 7.4.9 and 7.3.21 - both threw the error. PHP 5.6 doesn't throw the error, but also doesn't rebuild the toc.json file for me.

image

Part 2: What's the language string that is being looked at?

So from your note @brianteeman I've looked at the code closer and the TOC is created by:

  • opening /administrator/language/en-GB/com_admin.ini
  • looking for strings with "COM_ADMIN_HELP" as their prefix
  • processing those strings into the TOC.

So I've manually done that to see what I could see.

86 of 89 current strings are included in the current Help TOC. These three did not make it into the TOC (or the TOC that I'm currently seeing via nightly builds).

COM_ADMIN_HELP_COMPONENTS_ACTIONLOGS="Action Logs"
COM_ADMIN_HELP_COMPONENTS_SEARCH="Search"
COM_ADMIN_HELP_SITE_MAINTENANCE_PURGE_EXPIRED_CACHE="Cache: Clear Expired Cache"

So based on what the script does, if it works as expected, then the TOC is generating correctly (except for these three items).

Part 3: Why should there be 235 items?

There should be 235 items (or a subset greater than 86), as that's how many help screens are available in JDOCs on different parts of Joomla 4. At a quick glance, Workflow and Mail Templates are two new Joomla 4 features missing from the TOC which then generated the issue.

The missing part therefore may not be an issue with the tool that generates the TOC, but instead requires a PR to add more COM_ADMIN_HELP strings into /administrator/language/en-GB/com_admin.ini in order to cover what's missing from https://docs.joomla.org/index.php?title=Category:Help_screen_4.0

avatar particthistle particthistle - change - 16 Feb 2021
The description was changed
avatar particthistle particthistle - edited - 16 Feb 2021
avatar particthistle particthistle - change - 16 Feb 2021
The description was changed
avatar particthistle particthistle - edited - 16 Feb 2021
avatar particthistle
particthistle - comment - 16 Feb 2021

Update

Part 1 is now resolved: To run the build/helpTOC.php command, additional dependencies are required. As a typical end user will not need to run this command, no further action is required at this time.

Part 2 will be revisited after the PR to fix Part 3 has been merged to check that the new strings are added to the TOC.

Part 3 hope to be resolved with an additional PR to add the missing language strings to the com_admin.ini.

Thanks for having me take a closer look @brianteeman and for the clarifying conversation in BFH @richard67 & @alikon

@ceford - Will be in discussion on Glip more as you're the most across the Help Screens creation process.

avatar wilsonge
wilsonge - comment - 16 Feb 2021

To run the build/helpTOC.php command, additional dependencies are required. As a typical end user will not need to run this command, no further action is required at this time

Actually the part about additional dependencies is probably not true. In fact what's more likely is that you're running a very dated version of the code - #29804

Although indeed to run build scripts you will need more than is in the standard nightlies.

Part 2 is just a fix to the language strings to point to the correct pages (e.g. the clear cache is trying to ping https://docs.joomla.org/Help4.x:Cache:_Clear_Expired_Cache based on that lang string you pasted but the page is actually at https://docs.joomla.org/Help4.x:Site_Maintenance_Purge_Expired_Cache)

Indeed part 3 is just create the language strings :)

avatar brianteeman
brianteeman - comment - 21 Feb 2021

This should be closed as the issue is resolved and @particthistle now knows what to do to add additional articles to the helpTOC

avatar richard67 richard67 - change - 21 Feb 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-02-21 09:45:52
Closed_By richard67
avatar richard67 richard67 - close - 21 Feb 2021
avatar richard67
richard67 - comment - 21 Feb 2021

Closing due to reasons stated in previous comment. Feel free to re-open if you think this is wrong.

avatar brianteeman
brianteeman - comment - 31 May 2021

Please re-open as it would appear that no one has added the additional articles to the helpTOC

avatar richard67 richard67 - change - 31 May 2021
Status Closed New
Closed_Date 2021-02-21 09:45:52
Closed_By richard67
avatar richard67 richard67 - reopen - 31 May 2021
avatar richard67
richard67 - comment - 31 May 2021

Please re-open as it would appear that no one has added the additional articles to the helpTOC

@brianteeman Do you know who can do that? Maybe @ceford ?

avatar ceford
ceford - comment - 31 May 2021

What is this list for? I have always assumed it to be the main topics. Even at 86 items it is quite long. At 235 it would be a very long scroll to Users. Also, I think individual plugins need individual links - at the moment they all share one link. That would be another 96+. Redesign or leave at 86?

avatar brianteeman
brianteeman - comment - 31 May 2021

Right now there are major gaps - such as mail templates

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: No Code Attached Yet bug
Removed: ?
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar alikon alikon - change - 10 Apr 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-04-10 17:43:26
Closed_By alikon
avatar alikon alikon - close - 10 Apr 2024
avatar alikon
alikon - comment - 10 Apr 2024

please test #43250

Add a Comment

Login with GitHub to post a comment