User tests: Successful: Unsuccessful:
Pull Request for Issue #13059 .
There is already a mechanism in place for allowing third-party extensions to override and control the help system, so this PR merely fixes the bug in com_config that prevents that override mechanism from being used and adds an optional element to the component config.xml file to specify a help system key reference using the same format that is available in the component view XML files.
To test this PR you will need to have a third-party component installed, preferably one that already has a helpUrl field in the config.xml file. If this is not the case, pick an arbitrary third-party component and add the following field to the config.xml:
<field name="helpURL" type="hidden" default="http://www.example.com/help-server/{language}/{component}/{keyref}" />
This is the standard mechanism for overriding the help system URL template for the component. Whether that is correctly utilised in component views is another matter and doesn't affect this PR. Make sure you Save the config settings after adding this field so that the field is added to the component params in the extensions database table.
Now, add the following element to the component config.xml file, at the same level as the <fieldset>
elements:
<help key="MYCOMPONENT_CONFIG" />
Test 1: Go to the component Options screen and click on the Help button. Assuming the component is called "com_somecomponent" the help popup should go to:
http://www.example.com/help-server/en-GB/com_somecomponent/MYCOMPONENT_CONFIG
Test 2: Change the helpURL to a relative path:
<field name="helpURL" type="hidden" default="components/{component}/help/{language}/{keyref}" />
Remember to save this new configuration. Click the Help button and notice that the help popup should go to:
http://localhost/path-to-joomla/administrator/components/com_somecomponent/help/en-GB/MYCOMPONENT_CONFIG
This allows third-party developers to include local help files in their distribution packages if they want to.
Test 3: Make sure the core extension help still works as expected. (Remember that there are no help screens in the Help37: namespace at the moment, so just check that the URL makes sense).
The following section should be added to https://docs.joomla.org/Help_system/Adding_a_help_button_to_the_toolbar
= Component Configuration Help =
Since component configuration (via the Options button) is handled via the core com_config component, you need to specify the help key reference to be used. This can be done by adding a <tt><help></tt>
element to the component config.xml file. For example,
<source lang="xml">
<?xml version="1.0" encoding="utf-8"?>
<config>
<help key="MYCOMPONENT_CONFIG" />
<fieldset
name="afield"
label="MYCOMPONENT_AFIELD"
etc.
</source>
Remember that for this to work you must have added a "helpURL" field in the same file. This can be a hidden field so it doesn't matter which fieldset it is added to. For example,
<source lang="xml">
<field
name="helpURL"
type="hidden"
default="http://www.example.com/help/{language}/{component}/{keyref}"
/>
</source>
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_config |
@chrisdavenport chris can you update this please.
I have tested this item
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-04-04 17:53:41 |
Closed_By | ⇒ | wilsonge |
Thanks!
As this is a bug fix it should go in J3.