-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing UI elements when accessing via Vagrant Box - Bad Base HREF URL #20
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? Originally posted by @kaloyan-raev at zfcampus/zf-apigility-skeleton#64 (comment) |
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
Originally posted by @mechastorm at zfcampus/zf-apigility-skeleton#64 (comment) |
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. Originally posted by @kaloyan-raev at zfcampus/zf-apigility-skeleton#64 (comment) |
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
Originally posted by @mechastorm at zfcampus/zf-apigility-skeleton#64 (comment) |
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. Originally posted by @Danack at zfcampus/zf-apigility-skeleton#64 (comment) |
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.
Originally posted by @mechastorm at zfcampus/zf-apigility-skeleton#64
The text was updated successfully, but these errors were encountered: