-
Notifications
You must be signed in to change notification settings - Fork 123
Missing UI elements when accessing via Vagrant Box - Bad Base HREF URL #64
Comments
Do you see something like this in your browser? If yes then you most probably use Internet Explorer. Which version is this? Did you try using Chrome? |
Update: Ok I noticed now the problem does not appear if I load up the built-in PHP server locally. @kaloyan-raev I am seeing that screenshot on my Ubuntu Desktop enviroment
I tried it remotely on a Mac via 192.x.x.x:9090, and I still saw the same issue on
|
Check the source code in the browser. There is a "base" tag somewhere on the top. Check if the URL in the "href" attribute is accessible from the client box (the one running the browser). If not, then the JavaScript and CSS file won't be served correctly to the browser, and hence the nice picture you see. |
Found the cause! Thanks for the tip @kaloyan-raev . Though I need to find a proper solution to this. When I checked the source code of the generated site on my browser, the base href was shown as <base href="http://localhost:9090:8080/zf-apigility-admin/"> Port 8080 is what the built-in php server was activated on, and Port 9090 was that port that was mapped in the VagrantFile to the vbox port 8080. Modified my Vbox to map port 8080 to port 8080 - this fixes the issue. Not an elegant one, the proper one could be either
|
Seconded this:
The application is generating links that assume that the server is running on port 8080, so either the port forwarded needs to be 8080 or that hardcoding needs to be removed from the app. |
This repository has been closed and moved to laminas-api-tools/api-tools-skeleton; a new issue has been opened at laminas-api-tools/api-tools-skeleton#20. |
My issue is similar to #16 except I ran this from the repo's own vagrant box
My repro was
php -S 0.0.0.0:8080 -t public public/index.php
So on my host machine (outside the vbox),
http://localhost:9090/apigility/ui
{{ flash.message }}
vars aroundI do have the
rwoverdijk/assetmanager
directory in my vendor folder and it works fine.I encountered a similar situation on my own vagrant box with the same issue. So I tried it with the skeleton's own vagrant box and still encountered the error.
My local enviroment
Any help would be great
Update: The problem does not appear if I load up the built-in PHP server locally - it only happens when if I access it via Vagrant (the php web server is started from the vagrant instance)
If I ran the PHP web server in Vagrant and access it to there, it will give me missing UI issues.
But I just ran it locally (without Vagrant), this works fine. It is still an issue because I would like to enable my fellow developers to run Apigility from their vagrant boxes and ensuring everyone is on the same env settings.
The text was updated successfully, but these errors were encountered: