ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
333 stars 90 forks source link

Help menu URLs are broke in Linux Client #58

Closed ryzom-pipeline closed 8 years ago

ryzom-pipeline commented 10 years ago

Original report by crandellws (Bitbucket: crandellws, GitHub: crandellws).


When Selecting "Help" from "Help" on the task-bar a window appears with the following error:

Error: The page address is malformed : file:/gamedev.bnp@intro_en.html Image view of error Similar errors appear for all of the help links.

Seems to be a URI issue. An online document may help resolve the issue in the subsection file - Normal file of the page http://man7.org/linux/man-pages/man7/url.7.html explains:

The ... format (e.g., <file:/etc/passwd>) is a correct format for referring to a local file. However, older standards did not permit this format, and some programs don't recognize this as a URI. A more portable syntax is to use an empty string as the server name, for example, file:///etc/passwd; this form does the same thing and is easily recognized by pattern matchers and older programs as a URI. Note that if you really mean to say "start from the current location," don't specify the scheme at all; use a relative address like <../test.txt>, which has the side-effect of being scheme-independent. An example of this scheme is file:///etc/passwd.

ryzom-pipeline commented 10 years ago

Original comment by SirCotare (Bitbucket: SirCotare, GitHub: SirCotare).


code\nel\src\gui\group_html.cpp

line 3848:

#!c++

    #ifdef NL_OS_WINDOWS
                    if ((_LibWWW->Anchor = HTAnchor_findAddress(uri)) == NULL)
    #else
                    // temporarily disable local URL's until LibWWW can be replaced.
                    if (isLocal || ((_LibWWW->Anchor = HTAnchor_findAddress(uri)) == NULL))
    #endif
                    {
                        browseError((string("The page address is malformed : ")+(const char*)uri).c_str());
                    }
ryzom-pipeline commented 10 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Yes, it has been disabled because the client was crashing. The bug seems to be in libwww, but nobody tried to fix it.

ryzom-pipeline commented 10 years ago

Original comment by crandellws (Bitbucket: crandellws, GitHub: crandellws).


ryzomcore/code/nel/src/gui/libwww_nel_stream.cpp line 222

#!c++

                {
                        string tmp = HTAnchor_physical(anchor);
                        if (strlwr(tmp).find("file:/") == 0)
                        {
                                tmp = tmp.substr(6, tmp.size()-6);
                        }
                        StrAllocCopy(file->local, tmp.c_str());
                }

Maybe this is the problem?? I don't know C or C++ so I am guessing, but could this fix it?

#!c++

                {
                        string tmp = HTAnchor_physical(anchor);
                        if (strlwr(tmp).find("file:///") == 0)
                        {
                                tmp = tmp.substr(6, tmp.size()-6);
                        }
                        StrAllocCopy(file->local, tmp.c_str());
                }

Or for relative address maybe this??

#!c++

                {
                        string tmp = HTAnchor_physical(anchor);
                        if (strlwr(tmp).find("../") == 0)
                        {
                                tmp = tmp.substr(6, tmp.size()-6);
                        }
                        StrAllocCopy(file->local, tmp.c_str());
                }
ryzom-pipeline commented 10 years ago

Original comment by SirCotare (Bitbucket: SirCotare, GitHub: SirCotare).


Apart from the bug itself... wouldn't it make way more sense to load the Help from remote instead of local files? Unless we wanted to patch every time the help got changed...

ryzom-pipeline commented 10 years ago

Original comment by crandellws (Bitbucket: crandellws, GitHub: crandellws).


Actually SirCotare makes a good point as anyone playing will be already online.

I don't understand the "BNP files" so I can't give an educated opinion.

ryzom-pipeline commented 10 years ago

Original comment by Vinicius Arroyo (Bitbucket: viniciusarroyo, GitHub: viniciusarroyo).


I compiled the default branch on linux with local browsing enabled and its working here. Anyway I could reproduce the error to hunt it down?

And I agree with Cotare, this content could be online, where it can be updated easily.

ryzom-pipeline commented 10 years ago

Original comment by crandellws (Bitbucket: crandellws, GitHub: crandellws).


I installed the Ubuntu Precise version from the Ubuntu Software Center.

FYI: The Shell script to start Ryzom is set to download the client from SourceForge.

ryzom-pipeline commented 10 years ago

Original comment by Jan Boon (Bitbucket: [Jan Boon](https://bitbucket.org/Jan Boon), ).


Does this issue still occur?

ryzom-pipeline commented 9 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


I suspect it should work now we removed libwww, please someone could try under Linux ?

ryzom-pipeline commented 8 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


this is indeed resolved in develop and compatibility-develop branches

ryzom-pipeline commented 8 years ago

Original comment by Cédric Ochs (Bitbucket: [Cédric OCHS](https://bitbucket.org/Cédric OCHS), ).


Hehe indeed :) Well done :p