AlexSheer / phpbb3.2-Knowledge-Base

Knowledge Base
GNU General Public License v2.0
1 stars 5 forks source link

Link to article in Topic announcement doesn’t work #9

Closed Galixte closed 7 years ago

Galixte commented 7 years ago

Hi @AlexSheer,

on a fresh local board with phpBB 3.2.1 (QuickInstall tool installation), in a topic announcement for a new article created, there is a link to read the entire article.

When I click on it, I obtain an error:

Informations

No route found for GET //quickinstall/boards/phpbb321fr/app.php/knowledgebase/article" (from "http://localhost:8080/quickinstall/boards/phpbb321fr/viewtopic.php?f=8&p=393")

and the link page is: http://localhost:8080/quickinstall/boards/phpbb321fr//quickinstall/boards/phpbb321fr/app.php/knowledgebase/article?k=15

Instead of (it should be): http://localhost:8080/quickinstall/boards/phpbb321fr/app.php/knowledgebase/article?k=15

AlexSheer commented 7 years ago

Fixed! https://github.com/AlexSheer/phpbb3.2-Knowledge-Base/commit/31ad706e67fbe87aca7cb6130b1c2f50d7758ee0#diff-6649e448ac5c7d490bd996a521574785

AlexSheer commented 7 years ago

And fix some errors https://github.com/AlexSheer/phpbb3.2-Knowledge-Base/commit/69887a1a243038b3711bc03f3ab41622489dc9c0

Galixte commented 7 years ago

Hi @AlexSheer, it’s not fixed, you have only removed a /.

Currently on article page, I can see this in LINK TO ARTICLE: article page link to article As you can see my root path (path from root domaine to my board) /quickinstall/boards/phpbb321fr/ is too times in the link. I think this line has a problem: https://github.com/AlexSheer/phpbb3.2-Knowledge-Base/blob/master/controller/article.php#L197

And on topic annoucement created when the article was published, the link to read the full article contains the same problem: topic page link to article And of course if I click on it, it results this error: error page link to article I think this line has a problem: https://github.com/AlexSheer/phpbb3.2-Knowledge-Base/blob/master/inc/functions_kb.php#L604

Galixte commented 7 years ago

Maybe by using phpbb_root_path?

AlexSheer commented 7 years ago

No. We need use absolute path to our board, no relative. This one generate phpBB function generate_board_url() and return path such as http://321.ts The problem in your local server or his tuning. Which software are using? I'm use https://ospanel.io/ on my local computer and have no any problem. 2017-10-17 22 53 00-fullpage

Galixte commented 7 years ago

I use UwAmp: https://www.uwamp.com/en/ with Apache 2.4/PHP 7.1.10/MySQL 5.7.11, no problem until now.

I note that you use your local board from the root of the domain and on my side i use my local board in sub-forum /quickinstall/boards/phpbb321fr/ maybe there is a problem with subforum ou maybe with PHP version.

I will move my local test board to the root of the domain to compare and also try some tests on a live board to compare…

Galixte commented 7 years ago

@AlexSheer I found the problem, it’s the fact to put the board in sub-forum, i have moved my local test board to the root of the local domain and now it’s OK.

Article page LINK TO is correct: inkedtopic page link is good_li

Topic annoucement for the article, the link to read FULL article is correct: inkedarticle page link to is correct_li

Galixte commented 7 years ago

Thanks for your fix, it’s work. ;)