? ? Pending

User tests: Successful: Unsuccessful:

avatar Bakual
Bakual
24 Sep 2021

Currently, a help button is shown always in com_categories, com_config and com_modules (and maybe other places), regardless if the extension actually has a help page or not.

Summary of Changes

  • Backend Categories list and edit views as well as Component Options view are changed so they check if a language string actually exists before addding it as ref_key for the help button
  • ToolbarHelper::help() only creates the help button if either $ref or $override is passed.
  • Fixed three notices in the categories view about undefined variables in case no help is specified.

Testing Instructions

Check with a 3rd party extension if the help button either works (one is specified) or doesn't appear (if none is specified) in:

  • Categories list
  • Category edit form
  • Component Options
  • Module Options

Actual result BEFORE applying this Pull Request

Help button is always shown. If no help is specified, the help page will show a RuntimeException error
image

Expected result AFTER applying this Pull Request

Help button doesn't appear when no help is specified
No change to before if help is specified.

Documentation Changes Required

None

avatar Bakual Bakual - open - 24 Sep 2021
avatar Bakual Bakual - change - 24 Sep 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Sep 2021
Category Administration com_categories com_config Libraries
avatar chmst chmst - test_item - 25 Sep 2021 - Tested successfully
avatar chmst
chmst - comment - 25 Sep 2021

I have tested this item successfully on ab6334e

Tested with com_weblinks and all views: categories, category, options modules, com_config.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35662.
avatar ChristineWk
ChristineWk - comment - 26 Sep 2021

Some tries with: com_weblinks - History:
Patch ON:

A) Modules > Web Links > Help
if Module is activated = OK, no error.
If Module is not actived (unpublished) = Actual result: error.

B) Components > Web Links > Help > Categories > Options = OK

C) with and without Patch:
Web Links > Links >
An error has occurred.
500 behavior::tabstate not found. *)

After above, System shows Update available for Weblinks Extension Package: to: 4.0.0
Done.

C) Fields and Fieldgroups are now added.

Patch ON again:
Web Links > Links
*) 500 error has gone, but: > error 404 - RuntimeException

See A) above: After Update to 4.0.0 Result changed to:
if Module is activated = Actual result: error.
If Module is not actived (unpublished) = Actual result: error.

Maybe some changes between Version 3.9.0 and 4.0.0

System version: 4.0.4-dev


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

avatar Bakual
Bakual - comment - 26 Sep 2021

@ChristineWk I'm a bit confused from your test results. As this PR here is only about the help button, some of your errors look unrelated to this PR and instead are bugs in weblinks itself?

avatar ChristineWk
ChristineWk - comment - 26 Sep 2021

@Bakual

sorry about, I'am also confused :-) Patch = ON:

Web Links > Categories > Options (Help button is removed) = successful.

Web Links > Links > Help (Help button visible) > Help: 404 - RuntimeException
= not successful.

Web Links > Fields (= new with update to 4.0.0) > (Help button visible) > Help Function = OK.

Web Links > Field Groups (= new with update to 4.0.0) > (Help button visible) > Help Function = OK.

Site Modules:
Web Links (activated) > Web Links > Help button > 404 – RuntimeException
(there was no error with before installed version: 3.9.0)

Web Links (not activated) > Web Links > Help button > 404 – RuntimeException

screen shot 2021-09-26 at 13 37 15


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/35662.
avatar ChristineWk
ChristineWk - comment - 26 Sep 2021

OK, it was my mistake. Before that, version 3.9.0 was offered and installed via web installation.
After that I was offered the right package.
Current: Web Links Administrator Component 4.0.0 2021-09-19
Result: see above.


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

avatar Bakual
Bakual - comment - 26 Sep 2021

I'll try with Weblinks and see what's wrong there. I suspect some error on weblinks side, but need to be sure first :-)
Thanks for the tests!

avatar Bakual
Bakual - comment - 27 Sep 2021

Web Links > Links > Help (Help button visible) > Help: 404 - RuntimeException
= not successful.

Reason is a bug in Weblinks:
https://github.com/joomla-extensions/weblinks/blob/8aa92f906b7ea2740b245bbc999a6cf304528d0f/src/administrator/components/com_weblinks/src/View/Weblinks/HtmlView.php#L185
There is a language string is specified, but it doesn't exist. Thus the resulting link is broken.
Changing it directly to Components_Weblinks_Links or adding a language string with this value (not recommended) will fix it.

Same issue with the module:
https://github.com/joomla-extensions/weblinks/blob/8aa92f906b7ea2740b245bbc999a6cf304528d0f/src/modules/mod_weblinks/mod_weblinks.xml#L20
The correct value here would be Extensions_Module_Manager_Weblinks

(Correct values taken from https://docs.joomla.org/Help310:Help_screens)

avatar Bakual
Bakual - comment - 27 Sep 2021

PR done for the weblinks errors.

avatar ceford
ceford - comment - 21 Oct 2021

How do we find the views that should have Help pages but don't? In the past users would report a bug. I found several missing Help pages myself and created them.


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

avatar brianteeman
brianteeman - comment - 21 Oct 2021

See the testing instructions

avatar Bakual
Bakual - comment - 21 Oct 2021

There is also an overview over the existing help pages here: https://docs.joomla.org/Help310:Help_screens

avatar ceford
ceford - comment - 21 Oct 2021

I have tested this item successfully on ab6334e

The Patch Tester extension has a Help button which disappears when the patch is applied - so it works as described.

The point I was trying to make in my comment was not clear: had I not created a dozen or more new Help pages last summer you could now have had that many more HtmlView files to fix now. And I know about the list of Help pages because I updated the Joomla 4 version myself. What I was alluding to is that it would be better to create missing Help pages than hide the fact they are missing. Third party developers have the option to leave out the Help link or point it to another server. I do that for one of my components. And for another one I use local Help files. Anyway, if there are no missing core Joomla Help pages I am happy.


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

avatar ceford ceford - test_item - 21 Oct 2021 - Tested successfully
avatar brianteeman
brianteeman - comment - 21 Oct 2021

Ah I see that you still missed the point @ceford This is nothing to do with missing core help pages

Before this PR if your component used categories then there was automatically a help button present for the categories page even though there was no help page. As an extension developer you didnt have to do anything to create that button - it was automatic. There was also no way for you to remove the help button. This PR prevents these automatic help buttons being created unless they have been defined

avatar richard67 richard67 - change - 22 Oct 2021
Status Pending Ready to Commit
Labels Added: ?
avatar richard67
richard67 - comment - 22 Oct 2021

RTC


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

avatar bembelimen bembelimen - change - 3 Nov 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-11-03 09:05:57
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 3 Nov 2021
avatar bembelimen bembelimen - merge - 3 Nov 2021
avatar bembelimen
bembelimen - comment - 3 Nov 2021

Thx

Add a Comment

Login with GitHub to post a comment