Bug 425321 - knetattach Help button gives 404 page in browser
Summary: knetattach Help button gives 404 page in browser
Status: RESOLVED FIXED
Alias: None
Product: knetattach
Classification: Applications
Component: general (show other bugs)
Version: 5.19.4
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-13 19:49 UTC by Rijul Gulati
Modified: 2020-08-19 03:10 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rijul Gulati 2020-08-13 19:49:31 UTC
SUMMARY
With khelpcenter unavailable, clicking Help button in knetattach opens URL: https://docs.kde.org/stable5/en/kde-workspace/knetattach//knetattach resulting in 404 (Not found) page.


STEPS TO REPRODUCE
1. Make sure khelpcenter is uninstalled.
1. Open knetattach
2. Click Help button

OBSERVED RESULT
URL https://docs.kde.org/stable5/en/kde-workspace/knetattach//knetattach is opened resulting in 404 (Not found) page.

EXPECTED RESULT
KNetAttach Handbook page should open


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
(available in About System)
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2020-08-14 20:29:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/112
Comment 2 Nate Graham 2020-08-19 03:10:17 UTC
Git commit 247d9d732d522548bd8c07a3096669125a28e60d by Nate Graham, on behalf of Rijul Gulati.
Committed on 19/08/2020 at 03:10.
Pushed by ngraham into branch 'master'.

Fix clicking Help button gives 404 page in browser

Issue: With khelpcenter unavailable, clicking Help button in knetattach opens URL: https://docs.kde.org/stable5/en/kde-workspace/knetattach//knetattach resulting in 404 (Not found) page.

Fix: change help string from `help:/knetattach` to `help:/`.

How it works: at https://invent.kde.org/frameworks/kguiaddons/-/blob/master/src/util/urlhandler.cpp#L48 - the appname is added by default to docpath. With `help:/knetattach` the docpath becomes `knetattach&path=/knetattach` which results in URL: https://docs.kde.org/stable5/en/kde-workspace/knetattach//knetattach.

Removing `/knetattach` from `help:/knetattach` makes final URL as: https://docs.kde.org/stable5/en/kde-workspace/knetattach// (Notice the additional `/` at the end coming from `help:/`). This works for both browser URL as well as khelpcenter.

M  +1    -1    knetattach/knetattach.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/247d9d732d522548bd8c07a3096669125a28e60d