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

Allow external components to use local help files #6639

Closed
wants to merge 2 commits into from
Closed

Allow external components to use local help files #6639

wants to merge 2 commits into from

Conversation

zero24
Copy link
Contributor

@zero24 zero24 commented Apr 3, 2015

Based on: http://issues.joomla.org/tracker/joomla-cms/6627
And the fix provided by @chrisdavenport here: #6627 (comment)

Chris, I think you misunderstood the original request: The issue is not how third-party components can implement a help button in general (which I agree is nicely described in the links you posted). 

The issue is that in J3 **third-party components** have their **configuration page** shown in the **com_config component**, and this component does not provide any way to offer help pages from servers different from the default help server. So if you go to the configuration page of e.g. Kunena or VirtueMart, then the help button in the com_config component will try to use the JHELP_COMPONENTS_com_kunena_OPTIONS or JHELP_COMPONENTS_com_virtuemart_OPTIONS help keys on the Joomla server.

The corresponding code is in administrator/components/com_config/view/component/html.php, function ConfigViewComponentHtml::addToolbar:

```php
    protected function addToolbar()
    {
        [...]
        JToolbarHelper::divider();
        JToolbarHelper::help('JHELP_COMPONENTS_' . $this->currentComponent . '_OPTIONS');
    }
```php

This will always try to load the help page from the **default Joomla help server**, even for third-party applications (which do not have any help pages on the joomla servers, of course).  Those third-party components thus do not have any way to provide help pages for the configuration page on their own servers.

For third-party components, the com_config component needs to be made more flexible to allow help pages on other servers, too... That is the real issue here.

I'm so free to quote @kainhofer from #6627 (comment)

How to test

  • install a external component (e.g. com_jce)
  • Access the global configuration
  • Make sure that the help button for core components e.g. com_banners work
  • go to the configuration of your external component (e.g. com_jce)
  • see that the help button for your external component also try to use docs.joomla.org (some thing like: https://help.joomla.org/proxy/index.php?option=com_help&keyref=Help35:JHELP_COMPONENTS_com_jce_OPTIONS)
  • apply the patch
  • make sure com_banners (and other core components still works)
  • see your external component
  • the link looks something like this: http://localhost/34RC/administrator/components/com_jce/help/en-GB/JHELP_COMPONENTS_COM_JCE_OPTIONS.html
  • so the external component can store local screens

Developers

This string: JHELP_COMPONENTS_COM_JCE_OPTIONS can be used as language string if needed for a better name e.g. something like
JHELP_COMPONENTS_COM_JCE_OPTIONS="jce_config"

@chrisdavenport
Copy link
Contributor

A comment on the test instructions: You'll need to ensure that the third-party component you test it with has a component parameter called "helpURL" which contains an appropriate URL template, otherwise the help button will still point to the Joomla docs wiki. A suitable helpURL to test with would be

/administrator/components/com_something/help/{langcode}/{keyref}.html

@franzpeter
Copy link

@chrisdavenport: I can confirm that your patch works. Did try it with a component and it works if exchanging the code in administrator/components/com_config/view/component/html.php with your suggestion.

@coolcat-creations
Copy link
Contributor

com_banners are showing a 404 Popup afte applying the patch -> components/com_banners/help/en-GB/Components_Banner_Manager_Options.html
Also the Jce shows a 404 -> components/com_jce/help/en-GB/JHELP_COMPONENTS_COM_JCE_OPTIONS.html

if no help site is provided there should be a nicer fallback site than a 404.


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

@zero-24
Copy link
Contributor

zero-24 commented Jun 10, 2015

thanks @designbengel confirmed. @chrisdavenport Can you check it? Do we need to set the helpURL anywhere for banners (and other components)?

@coolcat-creations
Copy link
Contributor

is there a way to disable Help Button if no link is provided?


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

@brianteeman
Copy link
Contributor

I have tested this item 🔴 unsuccessfully on 7af06be

After applying the patch all core help functions are broken as they are trying to load locally


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

@brianteeman
Copy link
Contributor

@zero-24 its been almost a year - shall I just close this?


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

@zero24 zero24 closed this Apr 13, 2016
@zero24 zero24 deleted the patch-2 branch April 13, 2016 12:42
@zero-24
Copy link
Contributor

zero-24 commented Apr 13, 2016

@brianteeman done thanks.

@xabispacebiker
Copy link

xabispacebiker commented Oct 16, 2016

When is this patch gonna be added to the Joomla core? I think it is useless to have a help button in the component configuration if we cannot link it to local help.

@mbabker
Copy link
Contributor

mbabker commented Oct 16, 2016

It's not going to be added as it was closed due to it introducing issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants