Bug 2057454 - Evolution can't find the Help docs with khelpcenter installed
Summary: Evolution can't find the Help docs with khelpcenter installed
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: evolution
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Milan Crha
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-23 12:30 UTC by Patrick O'Callaghan
Modified: 2022-02-28 08:53 UTC (History)
6 users (show)

Fixed In Version: evolution-3.43.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-02-28 08:53:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Patrick O'Callaghan 2022-02-23 12:30:34 UTC
Description of problem:
Help documentation isn't working

Version-Release number of selected component (if applicable):
evolution-3.42.4-1.fc35.x86_64
evolution-help-3.42.4-1.fc35.noarch

How reproducible:
100%

Steps to Reproduce:
1.Click on Help or type F1
2.
3.

Actual results:
Error message saying the documentation is not installed

Expected results:
Help menu

Additional info:
Both evolution and evolution-help packages are installed, and have the same version strings, but Evolution can't seem to find the Help docs.

Comment 1 Milan Crha 2022-02-23 13:26:34 UTC
Thanks for a bug report. I just tried it, installed the evolution-help package while evolution was not running, then I started it from a terminal and pressed F1 or Help->Contents, and the yelp help had been shown as expected, no error message at all. Even when I install evolution-help with Evolution being running it opens the help contents with no problem. When I do not have installed the evolution-help a web page with the online help is shown instead, as expected.

Can there be anything with the yelp itself?

Running:

   $ yelp help:evolution

works fine here, no error received.

Comment 2 Patrick O'Callaghan 2022-02-23 16:05:58 UTC
(In reply to Milan Crha from comment #1)
> Thanks for a bug report. I just tried it, installed the evolution-help
> package while evolution was not running, then I started it from a terminal
> and pressed F1 or Help->Contents, and the yelp help had been shown as
> expected, no error message at all. Even when I install evolution-help with
> Evolution being running it opens the help contents with no problem. When I
> do not have installed the evolution-help a web page with the online help is
> shown instead, as expected.
> 
> Can there be anything with the yelp itself?
> 
> Running:
> 
>    $ yelp help:evolution
> 
> works fine here, no error received.

Interesting. Running from the command line does work, but from the GUI it doesn't. I should have mentioned that I'm using KDE, but in the past that has not been a problem. I'll report it against KDE.

Comment 3 Patrick O'Callaghan 2022-02-23 16:22:59 UTC
(In reply to Patrick O'Callaghan from comment #2)
> (In reply to Milan Crha from comment #1)
> > Thanks for a bug report. I just tried it, installed the evolution-help
> > package while evolution was not running, then I started it from a terminal
> > and pressed F1 or Help->Contents, and the yelp help had been shown as
> > expected, no error message at all. Even when I install evolution-help with
> > Evolution being running it opens the help contents with no problem. When I
> > do not have installed the evolution-help a web page with the online help is
> > shown instead, as expected.
> > 
> > Can there be anything with the yelp itself?
> > 
> > Running:
> > 
> >    $ yelp help:evolution
> > 
> > works fine here, no error received.
> 
> Interesting. Running from the command line does work, but from the GUI it
> doesn't. I should have mentioned that I'm using KDE, but in the past that
> has not been a problem. I'll report it against KDE.

Reported at https://bugs.kde.org/show_bug.cgi?id=450760

Comment 4 Milan Crha 2022-02-24 08:11:36 UTC
Maybe it's a problem with the scheme handler. Something like:

   $ xdg-open help:evolution

is called in the background. You can check what the glib stack has registered for the help: scheme with:

   $ gio mime x-scheme-handler/help

It says here:

   Default application for “x-scheme-handler/help”: yelp.desktop
   Registered applications:
	yelp.desktop
   Recommended applications:
	yelp.desktop

By the way, what is the exact error message you get, please? I suppose it begins with:

   Could not display help for Evolution.

followed by the exact error message.

Comment 5 Patrick O'Callaghan 2022-02-24 11:28:12 UTC
(In reply to Milan Crha from comment #4)
> Maybe it's a problem with the scheme handler. Something like:
> 
>    $ xdg-open help:evolution
> 
> is called in the background. You can check what the glib stack has
> registered for the help: scheme with:
> 
>    $ gio mime x-scheme-handler/help
> 
> It says here:
> 
>    Default application for “x-scheme-handler/help”: yelp.desktop
>    Registered applications:
> 	yelp.desktop
>    Recommended applications:
> 	yelp.desktop

$ gio mime x-scheme-handler/help
Default application for “x-scheme-handler/help”: org.kde.Help.desktop
Registered applications:
        org.kde.Help.desktop
        yelp.desktop
Recommended applications:
        org.kde.Help.desktop
        yelp.desktop

> By the way, what is the exact error message you get, please? I suppose it
> begins with:
> 
>    Could not display help for Evolution.
> 
> followed by the exact error message.

"The KDE bug report was rejected as being for non-KDE software.

Documentation not Found
Jack Ostroff <ostroffjh.net>
Revision Frameworks 5.73 (2020-09-08)
The requested documentation was not found on your computer.
The documentation may not exist, or it may not have been installed with the application.
 ... (etc.)"

Calling xdg-open help:evolution gives the exact same error.

My bug report to the KDE BZ was rejected and closed.

Comment 6 Patrick O'Callaghan 2022-02-24 13:20:03 UTC
I've now tried again, using a completely new local user account under Gnome.

The error message is exactly the same, i.e. I'm getting the *KDE* popup even though KDE/Plasma is not running. This is on a freshly rebooted system.

Comment 7 Milan Crha 2022-02-24 13:57:41 UTC
(In reply to Patrick O'Callaghan from comment #6)
> The error message is exactly the same, i.e. I'm getting the *KDE* popup even
> though KDE/Plasma is not running. This is on a freshly rebooted system.

Makes sense, because...

(In reply to Patrick O'Callaghan from comment #5)
> $ gio mime x-scheme-handler/help
> Default application for “x-scheme-handler/help”: org.kde.Help.desktop
> Registered applications:
>         org.kde.Help.desktop
>         yelp.desktop

you have registered org.kde.Help.desktop as the help: handler, but thus should use yelp.desktop in case of Evolution.
I do not know how that happened, maybe it's on purpose.

You can fix it by:

   $ gio mime x-scheme-handler/help yelp.desktop

It's likely it'll break help for KDE applications, though I do not know why they would use gio, instead of their KDE tool.

Comment 8 Patrick O'Callaghan 2022-02-24 16:30:59 UTC
(In reply to Milan Crha from comment #7)
> (In reply to Patrick O'Callaghan from comment #6)
> > The error message is exactly the same, i.e. I'm getting the *KDE* popup even
> > though KDE/Plasma is not running. This is on a freshly rebooted system.
> 
> Makes sense, because...
> 
> (In reply to Patrick O'Callaghan from comment #5)
> > $ gio mime x-scheme-handler/help
> > Default application for “x-scheme-handler/help”: org.kde.Help.desktop
> > Registered applications:
> >         org.kde.Help.desktop
> >         yelp.desktop
> 
> you have registered org.kde.Help.desktop as the help: handler, but thus
> should use yelp.desktop in case of Evolution.
> I do not know how that happened, maybe it's on purpose.
> 
> You can fix it by:
> 
>    $ gio mime x-scheme-handler/help yelp.desktop
> 
> It's likely it'll break help for KDE applications, though I do not know why
> they would use gio, instead of their KDE tool.

That worked. And it doesn't seem to affect the KDE apps, which get their own helper.

I don't know what happened to cause this, but it seems to be fixed now.

Thanks Milan.

Comment 9 Milan Crha 2022-02-24 16:49:14 UTC
Good. Can I close this now? Trying to figure out which app did the scheme handler registration might be a nightmare... (though a very good candidate is `org.kde.Help.desktop`, unless `gio` picks as the default app (when none was set explicitly) the one, which is listed first alphabetically, where `org.kde....` is truly before `yelp....`).

I do not see anything obvious in the khelpcenter.spec file:
https://src.fedoraproject.org/rpms/khelpcenter/blob/rawhide/f/khelpcenter.spec

The only thing is the package info
https://koji.fedoraproject.org/koji/rpminfo?rpmID=29340817
has
   mimehandler(x-scheme-handler/help)

but whether it has any impact on the mime handler registration I do not know (I guess it does not).

Comment 10 Patrick O'Callaghan 2022-02-25 10:46:17 UTC
(In reply to Milan Crha from comment #9)
> Good. Can I close this now? Trying to figure out which app did the scheme
> handler registration might be a nightmare... (though a very good candidate
> is `org.kde.Help.desktop`, unless `gio` picks as the default app (when none
> was set explicitly) the one, which is listed first alphabetically, where
> `org.kde....` is truly before `yelp....`).
> 
> I do not see anything obvious in the khelpcenter.spec file:
> https://src.fedoraproject.org/rpms/khelpcenter/blob/rawhide/f/khelpcenter.
> spec
> 
> The only thing is the package info
> https://koji.fedoraproject.org/koji/rpminfo?rpmID=29340817
> has
>    mimehandler(x-scheme-handler/help)
> 
> but whether it has any impact on the mime handler registration I do not know
> (I guess it does not).

Yes, close it for now. I'll see if it happens again after the next update.

Comment 11 Milan Crha 2022-02-25 11:49:03 UTC
I gave this some testing and this is the result:

Before I install khelpcenter, the `gio mime x-scheme-handler/help` says the default app is yelp.desktop.

After I installed khelpcenter, the default app was org.kde.Help.desktop.

Then I renamed /usr/share/applications/yelp.desktop to /usr/share/applications/ayelp.desktop and reinstalled khelpcenter (not that it was needed, I only do not know how to regenerate the mime handlers database). After that the default handler was ayelp.desktop.

My conclusion: the gio chooses as the default app the first in the alphabetical order, unless I manually set the scheme handler. Once I set the default app for it, it stays selected regardless I install the khelpcenter or not. I consider this a good behavior of the gio.

The options I can see here:
a) change Evolution and make it pick yelp instead of a generic `help:` scheme handler (the current code doesn't know about yelp, the `help:` scheme allows certain level of generic behavior)
b) teach khelpcenter how to open yelp files
c) remove the x-scheme-handler/help mime handler from the khelpcenter.

I'm wondering what help files it's supposed to open; if those from GNOME, then it can be a bug that it cannot find the installed files at /usr/share/help/$LANG/evolution/.

Comment 12 Patrick O'Callaghan 2022-02-25 12:43:19 UTC
I'll bring this up on the Fedora KDE list to see what people think.

Comment 13 Kevin Kofler 2022-02-26 08:40:41 UTC
Looks like it was a well-meaning idea, to let users browse all help in their native desktop's help browser, but it does not really work out because help location and format are not actually standardized across desktops. There is no way KHelpCenter will find help:evolution because it is not in any of the help paths KHelpCenter uses.

Comment 14 Patrick O'Callaghan 2022-02-26 12:22:43 UTC
(In reply to Kevin Kofler from comment #13)
> Looks like it was a well-meaning idea, to let users browse all help in their
> native desktop's help browser, but it does not really work out because help
> location and format are not actually standardized across desktops. There is
> no way KHelpCenter will find help:evolution because it is not in any of the
> help paths KHelpCenter uses.

Makes sense. That could be something to be looked at by some Linux standards body, though I'm not sure which.

Comment 15 Milan Crha 2022-02-28 08:53:09 UTC
I agree, it makes sense.

I see the yelp.desktop registers scheme handlers for ghelp:, help:, info: and man:; while the org.kde.Help.desktop has only the last three schemes. Looking into the yelp.desktop upstream changes the all four schemes had been added together, in 2010.

I wanted to switch to the ghelp: scheme, as it's unique for the Yelp, but the Yelp processes that scheme differently and claims the Evolution help files are not installed, while with the help: scheme it opens them with no problem.

I went ahead and made the Evolution call Yelp directly [1], even using the help: scheme handler was better, from my point of view. The [1] is for 3.43.3+.

[1] https://gitlab.gnome.org/GNOME/evolution/-/commit/e6b0574417


Note You need to log in before you can comment on or make changes to this bug.