Bug 426748

Summary: Help button leads to broken URL
Product: [Frameworks and Libraries] frameworks-kguiaddons Reporter: Alexander Potashev <aspotashev>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: a.samirh78, hubn3rd, luigi.toscano, nate, sitter
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Alexander Potashev 2020-09-19 20:07:00 UTC
SUMMARY
Help button leads to broken URL.

STEPS TO REPRODUCE
1. Run kinfocenter
2. Open an info module, e.g. "OpenGL"
3. Click "Help" button on the bottom of the module

OBSERVED RESULT
The following URL is opened in Chrome:

https://docs.kde.org/stable5/ru/kde-workspace/kinfocenter//kinfocenter/index.html

, it is 404 Not Found.

EXPECTED RESULT
Should open a relevant help page.

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

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2020-09-23 17:05:41 UTC
Cannot reproduce. That help button opens the English help page with the correct URL (without the extra "/kinfocenter" in it.
Comment 2 Alexander Potashev 2020-09-23 20:44:13 UTC
Same problem when running with "LC_ALL=C kinfocenter", the URL is similar, just the language code is "en".
Comment 3 Harald Sitter 2020-09-29 09:49:22 UTC
the module's desktop file sets

> X-DocPath=kinfocenter/index.html#opengl

systemsettings makes that

> help:/kinfocenter/index.html#opengl

kguiaddons/src/util/urlhandler.cpp makes that 

> https://docs.kde.org/index.php?branch=stable5&language=en_US&application=kinfocenter&path=/kinfocenter/index.html

which gets turned into the duplicated appname on the server.

Which of the bits broke? I couldn't say :(

What I can say is that we can't change this in kinfocenter because the url actually needs to be help:/khelpcenter/... so it works with khelpcenter. Either there needs to be a hack in kguiaddons, or (IMHO) more reasonably on the server side.

Something like
- if exists $appname/$path
  - return
- else if exists $path
  - return
- else
  - 404

Moving to docs product (I'm guessing that's the correct one)
Comment 4 Luigi Toscano 2020-09-29 11:04:03 UTC
I think kguiaddons should generate the correct address.
Comment 5 Ahmad Samir 2021-06-10 10:25:33 UTC

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