| Summary: | [Regression] KChmviewer can not show any page | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Slávek Banko <slavek.banko> |
| Component: | non-core programs | Assignee: | Slávek Banko <slavek.banko> |
| Status: | RESOLVED FIXED | ||
| Severity: | critical | CC: | bugwatch, darrella, michele.calgaro, slavek.banko |
| Priority: | P5 | ||
| Version: | R14.0.0 [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | |||
| Bug Blocks: | 2014 | ||
| Attachments: | Fix protocol name | ||
|
Description
Slávek Banko
2014-03-07 20:24:27 CST
Strange. Works here. We can change the protocol name back to ms-its, but then we have to figure out why the protocol appears twice in the help handbook. Last Thursday I had a busy day - I was programmed for a customer and I needed to consult the manuals that are in CHM (I have no chance to influence the source). Therefore, I am very surprised that after the last update was not possible to view pages in the manual - the only available content, search, but the pages could not be displayed. Once I was in /opt/trinity/share/services/msits.protocol msits changed back to ms-its, KChmviewer started working again without a problem. Created attachment 2016 [details]
Fix protocol name
The patch fix the malfunction kchmviewer, but probably will return duplication ms-its protocol in handbook.
(In reply to Darrell from comment #1) > Strange. Works here. > > We can change the protocol name back to ms-its, but then we have to figure > out why the protocol appears twice in the help handbook. Darrell, please where can i watch duplication of help handbook for ms-its? I have kchmviewer built with a patch and when I look at the protocols handbook, I see only one line ms-its. >but probably will return duplication ms-its protocol in handbook. Yes, the restoration of 'protocol=ms-its' causes duplication on my system. >where can i watch duplication of help handbook for ms-its? On my system: * Open the help handbook. * In the Contents tab, select the Protocols category. * Scroll the category list. On my system I see two ms-its items. I believe the cause is both msits.protocol and chm.protocol explicitly define 'protocol=ms-its'. The chm.protocol file is installed by tdevelop. There is no chm item in the help handbook Protocols category because no DocPath key is defined. Yet adding DocPath=tdeioslave/msits.index.html does not cause a chm item to appear in the help handbook. When I disable DocPath in msits.protocol I see zero instances of ms-its in the help handbook. The msits help handbook is installed by kchmviewer. As tdevelop installs chm.protocol, I wonder whether the msits docbook files should be moved to tdebase/doc/tdeioslave, because not everybody installs tdevelop or kchmviewer. That probably will not stop the duplication in the Contents tab, but would ensure the item is available for general reading. Do note that testing protocol file changes requires repeatedly running tdebuildsycoca or deleting tdesycoca and restarting Trinity in order to see changes in the help handbook. (In reply to Darrell from comment #5) > >but probably will return duplication ms-its protocol in handbook. > Yes, the restoration of 'protocol=ms-its' causes duplication on my system. > > >where can i watch duplication of help handbook for ms-its? > On my system: > > * Open the help handbook. > > * In the Contents tab, select the Protocols category. > > * Scroll the category list. > > On my system I see two ms-its items. > > I believe the cause is both msits.protocol and chm.protocol explicitly > define 'protocol=ms-its'. > > The chm.protocol file is installed by tdevelop. There is no chm item in the > help handbook Protocols category because no DocPath key is defined. Yet > adding DocPath=tdeioslave/msits.index.html does not cause a chm item to > appear in the help handbook. > > When I disable DocPath in msits.protocol I see zero instances of ms-its in > the help handbook. > > The msits help handbook is installed by kchmviewer. As tdevelop installs > chm.protocol, I wonder whether the msits docbook files should be moved to > tdebase/doc/tdeioslave, because not everybody installs tdevelop or > kchmviewer. That probably will not stop the duplication in the Contents tab, > but would ensure the item is available for general reading. > > Do note that testing protocol file changes requires repeatedly running > tdebuildsycoca or deleting tdesycoca and restarting Trinity in order to see > changes in the help handbook. Ah, that explains it. Because I do not have tdevelop installed, for me duplication does not occur. Kchmviewer installs protocol file because it implements tdeio_msits. TDevelop installs protocol file because it implements tdeio_chm. This is two different implementations of the same protocol. I believe that it is not possible to move a separate protocol file without being moved one of the tdeio protocol implementations. But the choice of one implementation would mean to revise the application using the second implementation. That seems like a difficult task. >This is two different implementations of the same protocol.
Yes.
The kchmviewer FAQ has the following:
"You have tdeio_chm installed, and because it installs itself as TDEIO slave for ms-its, sometime KDE uses it instead of tdeio_msits.
To disable it, find the file chm.protocol in your KDE directory, and remove it. Then run tdeinit to reread the configuration."
I imagine if somebody wrote a similar FAQ for tdevelop the solution would be the opposite: to remove the msits.protocol file. Seems the conclusion is to install one or the other but not both.
Deleting one file or the other does not seem an appropriate solution and would be a package management mess.
There is another duplication that helps shed light on the root cause of the problem: the irc protocol --- the irc protocol is duplicated in konvirc.protocol (installed by konversation) and irc.protocol (installed by tdenetwork). Both files use the same protocol=irc key. No irc help handbook yet exists and neither file yet contains a DocPath, which is why the problem is not yet seen. Yet we can use this duplication to witness the same problem. (I plan to write an irc help handbook and doing so will expose this duplication.) I created an /opt/trinity/share/services/tdeioslave/irc folder by copying another subfolder from the same parent folder. (For this experiment the contents of the handbook is irrelevant --- only a valid DocPath path is needed.) Then I added DocPath=tdeioslave/irc/index.html to konvirc.protocol and irc.protocol. I refreshed the tdesycoca cache and then I saw two instances of irc in the help handbook Protocols category. Retaining DocPath in irc.protocol but not konvirc.protocol results in no irc item in the help handbook. When I delete the DocPath from irc.protocol and restore DocPath in konvirc.protocol, then the help handbook again displays two instances of irc. Temporarily renaming either the irc.protocol or konvirc.protocol files results in one instance of irc in the help handbook. I can repeat the same tests with chm.protocol and msits.protocol. This seems to indicate a flaw with how the help handbook code parses the protocol files. My guess is the code was written with a simple presumption: that only one protocol file would exist for each protocol. Adding a second file with the same protocol= key results in unexpected behavior. My guess is when two *.protocol files exist with the same protocol, the help handbook code displays two instances when DocPath is defined in the second *.protocol file. If neither file has DocPath defined then the help handbook displays nothing. Another guess is the *.protocol files are parsed alphabetically and there is a separate counter, which is why adding a DocPath to the alphabetically first *.protocol file has no effect when a second *.protocol file also exists. When two or more *.protocol files exist then DocPath from the alphabetically last parsed file is used, but the code still counts all instances of each *.protocol file. |