Follow-up:
Downgrading addressed this issue.
The cause seems to be, imho, theme file dependencies for block level elements/components.
Specifically, and not unique to Elementor, if a theme builder contains components/plugins that are used in it from 3rd party libs they won’t always get included. Simply Static seems to have issues finding the asset URL paths, even including them manually in settings does not appear to address this.
A workaround, if any one else encounters this, you can:
– Manually copy/paste the asset URLs from your WordPress site into the correct directories in the compiled static site. As long as you don’t clear the entire static site when deploying, this should only need to be done once.
-
This reply was modified 2 years, 7 months ago by
jessejones.
Hi @jessejones, so this only happened on 2.3.0, not on the version before?
Don’t remember that we’ve done anything regarding URLs on that point, but will check it out.
The files with random strings are generally included always by scanning the folder of Elementor and putting them in folders.
We had to do this because such libs are loaded conditionally through their main JS file. And since we’re scanning the HTML on page load, such don’t exist until JS is loaded.
Will check what might have happened that would not include such files.
@ibenic thanks for your response!
To clarify, this happened in all versions of Simply Static (missing files), the number of broken assets increased though to the point where theme functionality is not usable, e.g. things for stuff like nav javascript were not being included, in this version.
-
This reply was modified 2 years, 7 months ago by
jessejones.
Hi @jessejones, what is the JavaScript that needs to run as navigation? What options did you use in Elementor for it?
Would like to recreate it and test it out locally as well.
@ibenic This was a specific example to provide context, but what I mean is block level component CSS/JS dependency issues issues.
How elementor works, and most page builders, is every component will load its dependencies when used, e.g. you won’t see the the dependency links for JS/CSS files unless the component is used. In my case I’m using a “navigation” component. I saw errors with other components: image slider, dropdown navs, etc.
This issue though can be replicated with any components. The CSS and JS links for the dependency are in the DOM, so the expectation is Simply Static should be able to pick them up. The not picking them up is why I did the workaround I mentioned here:
A workaround, if any one else encounters this, you can:
– Manually copy/paste the asset URLs from your WordPress site into the correct directories in the compiled static site. As long as you don’t clear the entire static site when deploying, this should only need to be done once.
Hey @jessejones,
we will look into that in more detail (updates will follow on GitHub here: https://github.com/Simply-Static/simply-static/issues/144)
I would love to have all those page builders looking into WP core on how those things should be handled, but I gave up hope.
I think this will be an ongoing issue as page builders and WordPress drift more and more apart, and there are no standards in place (like using wp_enqeue_script for such implementations) to help with that.
I mark it as solved here, but we follow up within GitHub (easier to track for us).
Cheers,
Patrick
Thanks @patrickposner for your response!