Skip to content
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

something is wrong with app.css #14

Closed
diomed opened this issue Feb 3, 2018 · 11 comments
Closed

something is wrong with app.css #14

diomed opened this issue Feb 3, 2018 · 11 comments

Comments

@diomed
Copy link
Contributor

diomed commented Feb 3, 2018

it doesn't load bulma @ all in latest version of theme.
@ least not for me.

@robbinjohansson
Copy link
Owner

Hm, it's working on my end. Did you run yarn && yarn production from the theme folder? If you didn't change anything it should be working.

Could you provide steps in order to reproduce the issue please?

@diomed
Copy link
Contributor Author

diomed commented Feb 3, 2018

I just added theme via GPM

@robbinjohansson
Copy link
Owner

robbinjohansson commented Feb 3, 2018

Ill try installing with GPM, brb

EDIT:
Ok, just tried installing with GPM. No issues on my end, Bulma loaded as expected.

Could you provide a screenshot or something of the issue? What's your project setup? Did you run yarn && yarn production from the theme root folder?

@TiagoFonseca
Copy link

I followed all the steps and after running yarn && yarn production I can see that all the URLs to css and js files from this theme are incorrect. My installation of Grav is in a sub folder (grav/grav-admin) and that path is being added twice to the URL.
eg:
localhost/grav/grav-admin/grav/grav-admin/user/themes/haywire/dist/css/...
instead of
localhost/grav/grav-admin/user/themes/haywire/dist/css/...
Do you know what can be causing this?

@robbinjohansson
Copy link
Owner

robbinjohansson commented Feb 5, 2018

The asset path is set in haywire.yaml.

My guess is that this issue may be caused by the asset cache-busting I implemented recently, see haywire.php.

Maybe this is an incorrect way of implementing this type of thing, I'm not super-up-to-date when it comes to Grav – I have to do some research.

One question though, why do you have two instances of Grav installed? Am I missing something here? 😕

When I'm testing this (with no issues) I'm installing grav + haywire theme in the following path grav/user/themes/haywire/.

Thanks for using the theme!

@robbinjohansson
Copy link
Owner

robbinjohansson commented Feb 5, 2018

Ok, I double-checked this issue again, did a fresh install of grav (via composer) + haywire theme (both via GPM and via git clone) and I still cannot reproduce the issues both of you are describing with assets not being loaded as it should/having faulty url.

Could you please provide steps to reproduce the issue for me so that have something more to go on? 🧐

@TiagoFonseca
Copy link

I didn't need the sub-folder, it was a mistake. So I installed Grav again, so now it's in htdocs/grav. I also installed haywire theme and I have the same problem as @diomed, it's looking for the haywire css file under
<link href="/grav/grav/user/themes/haywire/dist/css/app.css?id=1f1500e21b66c2b2aa54" type="text/css" rel="stylesheet" />
and the js under
<script src="/grav/grav/user/themes/haywire/dist/js/app.js?id=ab0684f27c33a69246c2" type="text/javascript"></script>
it seems to me that if I don't put grav in the root of my server that this won't work.

@robbinjohansson
Copy link
Owner

robbinjohansson commented Feb 7, 2018

@diomed @TiagoFonseca

I will look into this issue and hopefully have a fix ready for you soon!

Sorry for the inconvenience with the asset cache busting update. I will let you know when there's an update/fix for this issue.

@TiagoFonseca
Copy link

Thanks for your hardwork building this theme and for looking into this issue. I hope you can find a fix soon.

@robbinjohansson
Copy link
Owner

I've added a possible fix (28fce37) for this issue, I'm not 100% sure it works in your environment, had some issues setting up a similar dev environment using Laravel Valet.

Would you mind testing in your environment to see if the problem still exists? @TiagoFonseca @diomed

You'd have to clone develop branch:

$ cd user/themes/
$ git clone -b develop https://git@github.com/robbinfellow/haywire-grav.git
$ yarn && yarn production

Please let me know if it works or not!

@robbinjohansson
Copy link
Owner

robbinjohansson commented Feb 9, 2018

Fixed in 0.3.4.

Go ahead and update:

$ bin/gpm update haywire

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants