d0vgan / nppexec

NppExec (plugin for Notepad++)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Help Manual displays empty window on right side (ver. 0.7.1)

David-Maisonave opened this issue · comments

I just upgraded NppExec from 0.6.2 to 0.7.1, and when I selected Help/Manual from the menu, it displayed a help file with the left side Contents column populated, but the main window on the right was empty.

To troubleshoot the issue, I open the NppExec_Manual.chm file directly via Windows file explorer, and from there it displayed correctly.
After that, I tried it from the menu again, and it displayed correctly, with the main window show first page of the manual.
I also restarted Notepad++, and I couldn't reproduce the issue.

I'm not sure if this is an issue that only occurs on the first time, or if this is an issue that occurs until opening the file from windows file explorer.

I suspect the code is opening the file without setting the current directory to the file location.

As the README.md suggests at the bottom of this page https://github.com/d0vgan/nppexec :

Note: If you see just blank pages inside the NppExec Manual or see messages similar to "This web content was blocked" or "This web page could not be shown", please follow the instructions below:

Unblocking CHM files for Windows XP : http://support.microsoft.com/kb/902225
Unblocking CHM files for Windows 7 : http://support.microsoft.com/kb/2021383

I missed those details in the ReadMe.md file.
However, the first (XP) link, is a bad link. You get a page not found.
The second link refers to Windows 7, and I should have mention I'm running Windows 10
I did look at it anyway, but the systems are not the same and I didn't use the specified resolution to fix the issue.

After debugging this issue some more, I was able to reproduce the issue.

  1. I deleted the file, and the other copies I had of the same file.
  2. I replaced the file by using the original zip file.
  3. I opened the help file from the menu, and I saw the blank page again.

I was able to figure out what I did to fix the issue. When I opened the file previously from file explorer, I got the following message:
HelpFileWarningMessage

And I deselected the check box "Always ask before opening this file".
I didn't realize, but when I deselected it, that made the file unblock, as in the resolution stated in the KB 2021383 article.

For the ReadMe.md file, I recommend that gets changed from Windows 7 to Windows 7 and greater, or Win7-10.

I still think there should be a way for the plugin to open the file the way file explorer opens it, so the user can get the prompt.
I notice that when I open the file from the console, I was able to get the prompt.

Looks like there is another level of madness security while dealing with .chm files. For example:
https://www.helpsmith.com/chm-cannot-be-displayed.php
https://www.aerotech.com/wp-content/uploads/2021/03/Using-Compiled-HTML-Help-files.pdf

I was going to create a help file for my program, but after seeing these issues, I'm now leaning towards doing it in html.
Check out the following link:
https://docs.yoyogames.com/

Maybe there's a good program that can covert CHM to html accurately to include the content table.

Closing this issue, because this is more of a windows issue then a NppExec issue.