Subject: URL Routing bug?

Posted on: 17/03/19 02:58am
By: alb3rt

Hi guys,

I enabled url routing in my new site, this works fine but I found a little error. The variable {edit_url} it is empty when you read full article, for example:

Even with "root" user. In the file ~system/lib-article.php line 571 I find:

PHP Formatted Code

        if (($index != 'p') && SEC_hasRights('story.edit') &&
            ($story->checkAccess() == 3) &&
            (TOPIC_hasMultiTopicAccess('article', $story->DisplayElements('sid')) == 3)
        ) { ...

The conditions are not met ( SEC_hasRights = empty, $story->checkAccess = 2, TOPIC_hasMultiTopicAccess = 2).

Can it be a bug? I can't find a way to enable the edit-url button with the url routing enabled. I insist, this happens when you read full article.

Best regards

Re: URL Routing bug?

Posted on: 17/03/19 10:11am
By: Laugh

Sounds like a bug. I added a report on GitHub:

I will look into this early this coming week.

Re: URL Routing bug?

Posted on: 18/03/19 02:33pm
By: Laugh

Does the article edit icon work in the topic view?

I've tested it on my system and it works fine with URL Routing and Rewrite enabled.

Since the article is being returned it looks like your url variables are being read fine.

Are you sure you are accessing the article logged in as a root user or one that has story edit rights?

PHP Formatted Code
should return true

The other functions will return 3 for read/edit, 2 for read only, 0 for no access

Re: URL Routing bug?

Posted on: 20/03/19 08:26am
By: alb3rt

Hi Tom,

I have made sure to be connected as Root and I have done many tests and the same thing happens.

I have set up a demo site on another server (on bluehost), on this site it does not disappear {edit_url}, however, other things happen, look at these links (it's the same article)

URL without "routing"

URL with "routing"

However they do not look the same (differences in the blocks, icons in the news, breadcrumbs, etc).

The difference in servers is that this runs php7.0 and my local server (the one that does not appear url_edit) runs php7.2

Re: URL Routing bug?

Posted on: 20/03/19 12:39pm
By: Laugh

Thanks for setting up the demo examples.

Yeah the URL with routing demo site you setup is just showing the homepage and not the full article which is what the url is pointing too. This seems to suggest that Geeklog did not find the article id in the url so it did not know what to display.

I just want to make sure we have all the basics covered. Yo do have an htaccess file setup for url routing correct? (as per

The other thing it could be is a PHP 7.2 compatibility issue (there are some with Geeklog 2.2.0 that are fixed in the next version of Geeklog that has yet to be released). Can you change that demo site to use PHP 7.1 or lower version and test?

Re: URL Routing bug?

Posted on: 21/03/19 01:36am
By: alb3rt

Hi Tom,

What OS do you use for testing? I enabled a virtual machine with ubuntu server 16.04 + php 7.0 (FPM/FastCGI) y MariaDB but I can't run "rewrite" correctly.

Kind regards

Re: URL Routing bug?

Posted on: 22/03/19 08:20pm
By: alb3rt

I have duplicated the error, I posted it on github

Re: URL Routing bug? [SOLVED]

Posted on: 23/03/19 03:30am
By: alb3rt

FINALLY I solved my mistake and I describe it below in case someone happens something.

I have 2 pc (1 server and 1 pc-development, the server in addition to apache runs a server dns (bind) in which I configure my different subdomains.

My subdomain runs on the server and is also listed in the dns ( ->, works correctly.

My subdomain run in with virtualbox and it exists in my real server ( -> I get 404 error

My pc-development gets the names from the dns (server) therefore both sites are shown, however my server mounted in virtualbox does not get the names from the real server, so it never finds the site and therefore it returns error 404, the solution is to add (in server virtualbox):

PHP Formatted Code

Finally, the error that started this post is that when you login to the site from:
PHP Formatted Code

Does not set the cookie "password" which causes the error described in my first post. I do not know if this was programmed in this way or if there is a bug here, but everything is resolved if I login from

PHP Formatted Code

Or using the "My account" block.

Tom, thank you for your patience.

Re: URL Routing bug?

Posted on: 23/03/19 09:34am
By: Laugh

Thanks for the update.

Geeklog - Forum