Welcome to Geeklog Friday, August 23 2019 @ 02:29 am EDT

Geeklog Forums

URL Routing issue


Status: offline

OMAL

Forum User
Regular Poster
Registered: 06/12/17
Posts: 84
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.

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1369
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.
One of the Geeklog Core Developers.

Status: offline

OMAL

Forum User
Regular Poster
Registered: 06/12/17
Posts: 84
Quote 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.



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.

All times are EDT. The time is now 02:29 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content