Posted on: 08/01/19 07:28am
By: OMAL
I'm using URL Routing with Enable URL Rewrite:true and Enable URL Routing:Enabled option in GL version 2.2.
The problem is that it takes few more aditional seconds to display an article page with URL Routing ON.
It may be due to having several thousands pages in the site. Anyway, I want to customize core codes to solve the issue, if possible.
How can I debug the URL Routing? Which codes do I have to look?
Thanks.
Re: URL Routing issue
Posted on: 08/01/19 07:59am
By: Laugh
Issue has been found. For discussion see: https://github.com/Geeklog-Core/geeklog/issues/945
Geeklog doesn't have a true front control so when it first sees:
http://www.example.com/topic/Geeklog/2
It loads index.php matches the route and then reloads the page using the original URL
http://www.example.com/index.php?topic=Geeklog&page=2
The whole page doesn't load the first time but lib-common.php does and then lib-common.php loads again on the second go around. (which is where the increased time comes from)
What needs to be done instead of the second page load is we require_once the required file in the same page load and hopefully everything will continue to load fine. (will have to make sure the url variables are retrieved fine as this may need some fixing).
I forget all the files but their is a router.class.php that is the main file found in system/classes/
I had planned to fix this in September sometime but you are more than welcome to take a look and post any fixes.
Re: URL Routing issue
Posted on: 08/01/19 08:58am
By: OMAL
Quote by: LaughIssue has been found. For discussion see: https://github.com/Geeklog-Core/geeklog/issues/945
Geeklog doesn't have a true front control so when it first sees:
http://www.example.com/topic/Geeklog/2
It loads index.php matches the route and then reloads the page using the original URL
http://www.example.com/index.php?topic=Geeklog&page=2
The whole page doesn't load the first time but lib-common.php does and then lib-common.php loads again on the second go around. (which is where the increased time comes from)
What needs to be done instead of the second page load is we require_once the required file in the same page load and hopefully everything will continue to load fine. (will have to make sure the url variables are retrieved fine as this may need some fixing).
I forget all the files but their is a router.class.php that is the main file found in system/classes/
I had planned to fix this in September sometime but you are more than welcome to take a look and post any fixes.
Currently, I have no time. But I'll take a look in any case.
Practically, index.php is the most popular page in the site on which I am concerned about the issue, so fixing routing performance for most 10 recent articles could be solution with best effort.
Re: URL Routing issue
Posted on: 09/03/19 01:11pm
By: Laugh