e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

Support request: Implements e_URL addon #937

Closed lonalore closed 9 years ago

lonalore commented 9 years ago

I try to implement e_URL, but I have no luck with it.

In my plugin, I have an e_URL implementation: https://github.com/lonalore/nodejs_chatbox/blob/master/e_url.php

Then I rescaned plugin directories with e107, and I cleared cache, but I always get a white screen after I type "chatbox" into my browser's address bar. Error log doesn't contain any details. The redirection rule appears in the admin area correctly.

My access.log only contains this:

xxx.xxx.xxx.xxx - - [20/Mar/2015:12:07:22 +0100] "GET /e107v2/chatbox HTTP/1.1" 500 357 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36"

What am I doing wrong? Any idea? :/

CaMer0n commented 9 years ago

Please make this correction to nodejs_chatbox.php:

if (!defined('e107_INIT'))
{
    require_once("../../class2.php");
}
lonalore commented 9 years ago

Yes, this solved the problem. Thank You! :)

lonalore commented 9 years ago

I reopen this, because I have problem with e107::url() now. :) It always generates rewrited URLs, even if I rename or remove .htaccess file. :/

In issue https://github.com/e107inc/e107/issues/915 I got that answer e107::url() generates rewrited URLs if .htaccess file is available, and generates normal URLs if not. So, I don't understand. :/

Am I doing something wrong?

CaMer0n commented 9 years ago

You're doing everything fine. e107::url() is just incomplete and needs to be expanded to produce 'old' legacy urls also.

lonalore commented 9 years ago

Excellent! Thank You! :)