relative path issue with Aimeos

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mazxmazx
Posts: 2
Joined: 19 Oct 2016, 07:22

relative path issue with Aimeos

Post by mazxmazx » 19 Oct 2016, 07:29

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.

mazxmazx
Posts: 2
Joined: 19 Oct 2016, 07:22

Re: relative path issue with Aimeos

Post by mazxmazx » 19 Oct 2016, 12:02

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.

User avatar
aimeos
Administrator
Posts: 7885
Joined: 01 Jan 1970, 00:00

Re: relative path issue with Aimeos

Post by aimeos » 19 Oct 2016, 14:20

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?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply