Posted on: 03/17/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:
http://site.net/article/my-article
Even with "root" user. In the file ~system/lib-article.php line 571 I find:
Text 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: 03/17/19 10:11am
By: Laugh
Re: URL Routing bug?
Posted on: 03/18/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?
Text Formatted Code
SEC_hasRights('story.edit')
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: 03/20/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"
http://demo.geeklog-hispano.net/article.php?story=welcome[*2]
URL with "routing"
http://demo.geeklog-hispano.net/article/welcome[*3]
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: 03/20/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
https://www.geeklog.net/docs/english/config.html#url-routing)
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: 03/21/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: 03/22/19 08:20pm
By: alb3rt
I have duplicated the error, I posted it on github
Re: URL Routing bug? [SOLVED]
Posted on: 03/23/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 demo.dws.mx runs on the server and is also listed in the dns (demo.dws.mx -> 192.168.1.101), works correctly.
My subdomain demo2.dws.mx run in with virtualbox and it exists in my real server (demo2.dws.mx -> 192.168.1.102). 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 demo2.dws.mx and therefore it returns error 404, the solution is to add (in server virtualbox):
Text Formatted Code
/etc/hosts
192.168.1.102 demo2.dws.mx
Finally, the error that started this post is that when you login to the site from:
Text Formatted Code
mysite.com/admin/
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
Text Formatted Code
mysite.com.com/users.php
Or using the "My account" block.
Tom, thank you for your patience.
Re: URL Routing bug?
Posted on: 03/23/19 09:34am
By: Laugh
Thanks for the update.