Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com_config does not facilitate help system usage for component authors #13059

Closed
ron4mac opened this issue Dec 2, 2016 · 14 comments
Closed

com_config does not facilitate help system usage for component authors #13059

ron4mac opened this issue Dec 2, 2016 · 14 comments

Comments

@ron4mac
Copy link
Contributor

ron4mac commented Dec 2, 2016

Steps to reproduce the issue

Select a non-core component that has configuration provided by config.xml
Choose 'Options' from the toolbar.
Choose 'Help' from the toolbar.

Expected result

Component is able to provide help via a link provided by a combination of parameters in config.xml and language file(s)

Actual result

RuntimeException
Error fetching page from MediaWiki API: The page you specified doesn't exist

System information (as much as possible)

Joomla! 3.6.4 Stable [ Noether ] 21-October-2016 16:33 GMT

@PhilETaylor

This comment was marked as abuse.

@Bakual
Copy link
Contributor

Bakual commented Dec 11, 2016

As far as I know it is possible for 3rd parties to provide such a help URL (using language strings if I remember right). But it is not that straight forward. I think @chrisdavenport knows more about that system.

@mbabker
Copy link
Contributor

mbabker commented Dec 11, 2016

See also #6627 and referenced items.

@chrisdavenport
Copy link
Contributor

In particular, see https://docs.joomla.org/Help_system/Adding_a_help_button_to_the_toolbar

If that mechanism has stopped working, then it's a bug. Otherwise, it's not.

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@chrisdavenport
Copy link
Contributor

As I said, if that mechanism isn't working, then it's a bug.

@mbabker
Copy link
Contributor

mbabker commented Dec 11, 2016

Chris, that process works fine everywhere BUT com_config for a component's config, for non core extensions. That's what the old issue and PR tried to address and it's still not fixed.

@chrisdavenport
Copy link
Contributor

I have some holiday time coming up so I'll take a look at it then. Unless someone can get to it faster than me.

@ron4mac
Copy link
Contributor Author

ron4mac commented Dec 13, 2016

I think using a helpUrl element in the xml is the way to go. However, if there is no helpUrl element and the translation string is present, a link to local help file(s) should be provided. If there is no translation string at all ... no help button.

I may have some time to see if I can come up with an acceptable implementation.

@ron4mac
Copy link
Contributor Author

ron4mac commented Dec 13, 2016

Excuse any less-than squeaky clean logic or coding, but this is what seems to work okay for my needs:

In config.xml
<config helpURL="http://myserver.net/joomladev/mycomponent/help">
or
<config helpURL="local">

Adjust addToolBar in com_config/view/component/html.php

$helpUrl = (string) $this->form->getXML()->config['helpURL'];
$local = ($helpUrl==='local');
JToolbarHelper::help('JHELP_COMPONENTS_' . $this->currentComponent . '_OPTIONS', $local, ($local?null:$helpUrl), $this->currentComponent);

@Bakual
Copy link
Contributor

Bakual commented Dec 13, 2016

I guess it just has to check for a component specific string in com_config. That's likely the only issue.

@mbabker
Copy link
Contributor

mbabker commented Apr 27, 2017

#13286 is the PR for this item.

@mbabker mbabker closed this as completed Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants