Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthortaran-apk
     

    Hi,

    I'm on Windows XP. I found that when I created an application, Akelos would strip the slashes out of the path and the browser couldn't find the files. So if the URL was http://localhost/akelos/booklink/author, the browser would be directed to http://localhost/akelosbooklink/author. I traced the problem to the AK_SITE_URL_SUFFIX constant, which is defined in /lib/constants.php on lines 117-119:

    defined('AK_SITE_URL_SUFFIX') ? null : define('AK_SITE_URL_SUFFIX',
    '/'.str_replace(array(join(DS,array_diff((array)@explode(DS,AK_BASE_DIR),
    (array)@explode('/',AK_REQUEST_URI))), AK_BASE_DIR, DS),'',AK_BASE_DIR));
    

    I got it to work by taking out the '/'. at the beginning of the second line and replacing the last '' with array('','','/'), like this:

    defined('AK_SITE_URL_SUFFIX') ? null : define('AK_SITE_URL_SUFFIX',
    str_replace(array(join(DS,array_diff((array)@explode(DS,AK_BASE_DIR),
    (array)@explode('/',AK_REQUEST_URI))), AK_BASE_DIR, DS),array('','','/'),AK_BASE_DIR));
    

    I had to recreate the application after making this change because the configuration wizard uses this constant.

    I've only tested this on my system, but I figured that would help somebody.

    • CommentAuthorraslam
     

    Hi,

    i got a similar type problem. I'm following screencast by Bermi. I have successfully created blog controller and Post module from generator. the listing page shows correctly by this url:

    http://localhost/blog
    

    but when I click the link 'Create New Post' the page redirects to

    http://localhost/blog/blog/add
    

    Notice the double blog in the url. and gives the error Object not found!

    Single blog in the url doesn't work either. it says "if you are typing URL manually please see if it is correct...."

    http://localhost/blog/add
    

    where to fix this problem?

    •  
      CommentAuthorbermi
     

    Welcome to the Akelos forums taran-apk. I've been trying to reproduce the AK_SITE_URL_SUFFIX bug without success :(, I still need to try it on a 2 level path. BTW you can set in your config/config.php file

    define('AK_SITE_URL_SUFFIX','/blog');
    

    Rashid, do you have mod_rewrite enabled in your httpd.conf? If you have mod_rewrite disabled you'll have to access

    http://localhost/blog/?ak=add
    

    If Akelos can't guess is your mod_rewrite is enabled, you should add this into your configuration file

    define('AK_ENABLE_URL_REWRITE', false);
    
    • CommentAuthorraslam
     
    Bermi,

    I have enabled the mod rewrite. but now add link takes me to the welcome page. the page which appears after framework setup.
    •  
      CommentAuthorbermi
     

    Ok I managed to reproduce the bug taran-apk reported and fixed it.

    Raslam, can you try to create a new app to check if the problem persists?

    • CommentAuthortaran-apk
     
    Great! Thanks. :)