Page 1 of 1

relative path issue with Aimeos

Posted: 19 Oct 2016, 07:29
by mazxmazx
Hi,

I have been through the old thread but it seems the relative path issue is still there. My issue is my domain points to a subfolder, hence to access my Laravel app, it needs to go to http://domain.com/myapp/public.

Hence when I go to http://domain.com/myapp/public/list, it works, but all the relative path generated in the view (under href links), points back to the root, eg: http://domain.com/list or http://domain.com/basket. I have no idea how to fix this after trying out different combo...my other pages on laravel worked fine with the directory.

I had tried to install Aimeos with Laravel 5.2 and 5.3 version separately, all having same problem. I am on Aimeos 2016.10.2 I believe, per latest composer update. Please assist, thanks.

Re: relative path issue with Aimeos

Posted: 19 Oct 2016, 12:02
by mazxmazx
What I have temporarily done is to hack the URLGenerator,php in laravel framework to force toRoute() to spit out absolute path only, not the best thing but temporarily fixed the issue. Problem is any future update will invalidate this hack.

Re: relative path issue with Aimeos

Posted: 19 Oct 2016, 14:20
by aimeos
Routes for Aimeos are generated here by the Laravel router:
https://github.com/aimeos/ai-laravel/bl ... l5.php#L60

You could configure the "absoluteUri" setting for every URL generated but that is a daunting task. It's very strange that the Laravel router can't cope with subfolders in the route() method. Did you asked in the Laravel forums or on Github, why route() has this behavior?