? ? Pending

User tests: Successful: Unsuccessful:

avatar chrisdavenport
chrisdavenport
19 Dec 2016

Pull Request for Issue #13059 .

Summary of Changes

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.

Testing Instructions

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).

Documentation Changes Required

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>
avatar chrisdavenport chrisdavenport - open - 19 Dec 2016
avatar chrisdavenport chrisdavenport - change - 19 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Dec 2016
Category Administration com_config
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 19 Jul 2019

As this is a bug fix it should go in J3.

avatar N6REJ
N6REJ - comment - 10 Jan 2020

@chrisdavenport chris can you update this please.

avatar brianteeman
brianteeman - comment - 4 Apr 2020

I have tested this item successfully on 2be9cae


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13286.

avatar brianteeman brianteeman - test_item - 4 Apr 2020 - Tested successfully
avatar wilsonge wilsonge - change - 4 Apr 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-04-04 17:53:41
Closed_By wilsonge
avatar wilsonge wilsonge - close - 4 Apr 2020
avatar wilsonge wilsonge - merge - 4 Apr 2020
avatar wilsonge
wilsonge - comment - 4 Apr 2020

Thanks!

Add a Comment

Login with GitHub to post a comment