Open manuel-84 opened 5 years ago
Did you clear the cache in the Gantry admin? It seems to be loading fine looking at one of our G5 demos on WP 5.1.
Did you clear the cache in the Gantry admin? It seems to be loading fine looking at one of our G5 demos on WP 5.1.
Yes, the cache is cleared and I'm not using cache plugins + I have enabled debug and dev mode
Do you have link to your site?
Do you have link to your site?
Hmm, strange. I can't seem to replicate, but I will try another site. Is the issue present with a clean Helium RocketLauncher in a subdirectory on your server?
http://gantry.org/downloads#wordpress
Also try selectively disabling any 3rd party plugins on your demo.inoke.org/uno site.
even if I add it manually into the footer, the menu class "g-active" it's not working
Hmm, strange. I can't seem to replicate, but I will try another site. Is the issue present with a clean Helium RocketLauncher in a subdirectory on your server?
my theme is based on hydrogen, if I try with a clean copy of version 5.4.27 it's working
I would do Diff then between your theme and the clean copy and see what parts are different.
I would do Diff then between your theme and the clean copy and see what parts are different.
PHP files have the same content, and on the rest nothing interesting. Maybe it's something in the configuration? Or the fact that my theme contains a main.js file too?
I'm using the Before </body>
to load Nucleus main.js until I get the problem solved
How are you loading the main.js file from your theme? I'll see if I can replicate.
How are you loading the main.js file from your theme? I'll see if I can replicate.
I was using Page Settings > Assets > Javascript > File location: gantry-assets://js/main.js
Before body: true
Then I tried also gantry-theme
and then using the relative path /uno/wp-content/themes/g5_uno/js/main.js but the result is always that framework main.js is not added automatically.
Is there something in the framework that can block his assets load?
So does removing that file resolve the issue then? Please try it as a test.
So does removing that file resolve the issue then? Please try it as a test.
Oh dear, removing mytheme/js/main.js works 🤣 But I'm sure i had this file in other themes too and before I upgrade to latest WP/Gantry it was working fine.
Yes, I can confirm this issue on my local. If I rename the file to 'mainer.js' (just an example) it is not an issue. Nevertheless, I have reached out @mahagr and @newkind.
This issue goes beyond WordPress, adding a file in the template/theme directory with the same name and similar path as the one in Gantry5 core, it is going to get overwritten (same thing in Joomla / Grav). You will need to use a different name or change the path (such as gantry-assets://js/theme/main.js
(works ok)) .
This is by design allowing you to customize Gantry for your theme if you need to do that. Almost all the files in the Gantry framework are overrideable by the theme by just copying the file over.
can you add this behavior to the documentation? http://docs.gantry.org/gantry5/advanced/file-overrides
because i knew that to override Nucleus engine files we had to put files into a "custom" directory: /wp-content/plugins/gantry5
> THEME_DIR/custom
Well, basically there are two locations:
THEME_DIR
= for theme maintainers
THEME_DIR/custom
= for theme users
So basically the first location should be used if you're developing your own theme and want the files to be updated on theme update, second location is custom for the site.
Seems that the framework is not loading it's main.js file from assets and I don't know why.