Bug 419779 - Something does not handle anchors coherently with KConfigWidgets framework
Summary: Something does not handle anchors coherently with KConfigWidgets framework
Status: RESOLVED DUPLICATE of bug 424961
Alias: None
Product: frameworks-kconfigwidgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.69.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-07 07:58 UTC by Sérgio Augusto de Oliveira Valente
Modified: 2021-06-27 18:28 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
URL opened at Mozilla Firefox Browser (53.42 KB, image/png)
2020-04-07 07:58 UTC, Sérgio Augusto de Oliveira Valente
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sérgio Augusto de Oliveira Valente 2020-04-07 07:58:17 UTC
Created attachment 127341 [details]
URL opened at Mozilla Firefox Browser

SUMMARY
Help Button at structure configuration window does not open a valid page.

STEPS TO REPRODUCE
1. Open Structure Configuration Window
2. Click on HELP BUTTON
3. Change to browser and there is no a Valid Help Page, but a error one.

OBSERVED RESULT
"404 Not Found:
The requested URL was not found on this server.
Apache/2.4.29 (Ubuntu) Server at docs.kde.org Port 443"

EXPECTED RESULT
Structure Configuration Help Page. URL: https://docs.kde.org/stable5/pt_BR/kdegraphics/okular//okular/index.html

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Yuri Chornoivan 2020-04-07 08:03:45 UTC
Can you provide step-by-step instructions on how to trigger the bug?

Does it happen for Brazilian Portuguese locale only?

Thanks in advance for your answers.
Comment 2 Sérgio Augusto de Oliveira Valente 2020-04-08 03:39:32 UTC
(In reply to Yuri Chornoivan from comment #1)
> Can you provide step-by-step instructions on how to trigger the bug?
> 
> Does it happen for Brazilian Portuguese locale only?
> 
> Thanks in advance for your answers.

Hello.

I've put the steps on OP. See above.

Didn't try another language. Sorry.
Comment 3 Yuri Chornoivan 2020-04-08 06:17:46 UTC
Regretfully, 

1. There is no "Structure Configuration Window" in Okular (at least in its English version).

2. There are no buttons in Okular windows that open online help.

3. The screenshot attached can be reproduced with any inexistent URL.

Hence, this bug cannot be triaged without clear steps to reproduce or at least a screenshot of Okular window.

Thanks.
Comment 4 Wolfgang Bauer 2020-04-08 09:53:02 UTC
(In reply to Yuri Chornoivan from comment #3)
> Regretfully, 
> 
> 1. There is no "Structure Configuration Window" in Okular (at least in its
> English version).
I suppose this is actually about okteta...

I can confirm that the "Help" button in okteta's structure configuration dialog tries to open a non-existing URL (if khelpcenter is not installed):
https://docs.kde.org/stable5/en/extragear-utils/okteta//okteta/index.html

It should probably be https://docs.kde.org/stable5/en/extragear-utils/okteta/index.html instead.

The same happens in okular though, open the settings and there will be a Help button.
If you don't have khelpcenter installed, it will try to open this URL in a web browser, which fails:
https://docs.kde.org/stable5/en/kdegraphics/okular//okular/index.html

In this case, the correct URL would apparently be https://docs.kde.org/stable5/en/kdegraphics/okular/index.html

I.e. it seems to be a general problem (in KDE Frameworks), apparently the application name gets duplicated in the URL.
Comment 5 Yuri Chornoivan 2020-04-08 10:01:09 UTC
(In reply to Wolfgang Bauer from comment #4)
> (In reply to Yuri Chornoivan from comment #3)
> > Regretfully, 
> > 
> > 1. There is no "Structure Configuration Window" in Okular (at least in its
> > English version).
> I suppose this is actually about okteta...
> 
> I can confirm that the "Help" button in okteta's structure configuration
> dialog tries to open a non-existing URL (if khelpcenter is not installed):
> https://docs.kde.org/stable5/en/extragear-utils/okteta//okteta/index.html
> 
> It should probably be
> https://docs.kde.org/stable5/en/extragear-utils/okteta/index.html instead.
> 
> The same happens in okular though, open the settings and there will be a
> Help button.
> If you don't have khelpcenter installed, it will try to open this URL in a
> web browser, which fails:
> https://docs.kde.org/stable5/en/kdegraphics/okular//okular/index.html
> 
> In this case, the correct URL would apparently be
> https://docs.kde.org/stable5/en/kdegraphics/okular/index.html
> 
> I.e. it seems to be a general problem (in KDE Frameworks), apparently the
> application name gets duplicated in the URL.

Ok then. It should be a recent addition (do not remember, but there was a review request some time ago). The anchor argument of the setHelp is processed mistakenly, not coherent with khelpclient.cpp:

https://api.kde.org/frameworks/kconfigwidgets/html/khelpclient_8cpp_source.html
Comment 6 Yuri Chornoivan 2020-04-08 10:37:07 UTC
Reformulate.
Comment 7 Yuri Chornoivan 2020-04-08 10:56:44 UTC
Oops... Final fix.
Comment 8 Yuri Chornoivan 2020-04-08 11:35:37 UTC
Seems I was wrong. KGuiAddons work as expected. Do not know what it is then.
Comment 9 Ahmad Samir 2021-06-19 00:09:47 UTC
The Help menu entry in okteta now opens: https://docs.kde.org/stable5/en/okteta/okteta//

@Luigi, maybe this was fixed server-side? I don't see the /kdegraphics/ or /extragear-utils/ as part of the urls any more.
Comment 10 Wolfgang Bauer 2021-06-27 11:31:10 UTC
(In reply to Ahmad Samir from comment #9)
> The Help menu entry in okteta now opens:
> https://docs.kde.org/stable5/en/okteta/okteta//
But that's still wrong, isn't it? (even if it seems to work)

And the Help button in the "Structures" settings now tries to open https://docs.kde.org/stable5/en/okteta/okteta//okteta/index.html which still gives a 404 Not Found.

The same happens with other applications I tried, the Help menu entry opens https://docs.kde.org/stable5/en/appname/appname// (which works), and a Help button in the settings tries https://docs.kde.org/stable5/en/appname/appname//appname/index.html (which doesn't work).

Tested with the latest KDE Frameworks 5.83.0.
Comment 11 Wolfgang Bauer 2021-06-27 11:38:03 UTC
(In reply to Wolfgang Bauer from comment #10)
> (In reply to Ahmad Samir from comment #9)
> > The Help menu entry in okteta now opens:
> > https://docs.kde.org/stable5/en/okteta/okteta//
> But that's still wrong, isn't it? (even if it seems to work)
Ah ok, actually that does seem to be the correct URL (it looked strange to me).

But as mentioned, the Help buttons in Settings dialogs (as originally reported here) are still broken.
Comment 12 Ahmad Samir 2021-06-27 11:44:21 UTC
Both issues (the double '//' and the index.html urls) should be fixed by https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/18 (5.84).
Comment 13 Wolfgang Bauer 2021-06-27 18:18:33 UTC
(In reply to Ahmad Samir from comment #12)
> Both issues (the double '//' and the index.html urls) should be fixed by
> https://invent.kde.org/frameworks/kguiaddons/-/merge_requests/18 (5.84).

Indeed, it seems to work fine with latest git master, both the Help menu entry and the Help buttons in the Settings dialog open https://docs.kde.org/stable5/en/okteta/okteta/index.html (or https://docs.kde.org/stable5/en/okular/okular/index.html in Okular) now.

I think this bug report can be closed then (or marked as duplicate).
Comment 14 Ahmad Samir 2021-06-27 18:28:46 UTC

*** This bug has been marked as a duplicate of bug 424961 ***