-
Notifications
You must be signed in to change notification settings - Fork 61
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
Compiler does not output "Core" dependencies (jQuery with a 'relative' path) #332
Comments
Testing locally on Windows: Test website on Ubuntu server (Vultr/Serverpilot) does not add jQuery |
I don't like the idea of Right now, I prefer adding an additional check to This WIP branch development...christophherr:check Another WIP branch development...christophherr:compiler-path @iCaspar |
I agree that the place to check is
|
Thank you, @iCaspar. I agree that Scripts can be enqueued with Looking at Core's script-loader.php, Checking for
Updated development...christophherr:check with this approach. |
@christophherr This looks like it will probably work 99.44% of the time. The only exception that comes to mind is for those who have changed the default location of their What if you move the path-to-url round trip idea into its own method: |
And
|
Ha! I was thinking about that this morning. 👍 I'll wrap this up in a PR including the |
https://community.getbeans.io/discussion/compiling-wordpress-scripts-breaking-uikit-elements/
This looks like a regression in 1.5 thatpotentially affects/breaks Beans websites when assets are flushed/recompiled.I just checked. This didn't work in 1.4 either.
When the jQuery dependency is processed,
combine_fragments()
callsget_content()
which callsget_internal_content()
.get_internal_content()
checks if thefile_exists
.Because the path is just
/wp-includes/js/jquery/jquery.js
, it fails the test andbeans_url_to_path()
is called, which again returns/wp-includes/js/jquery/jquery.js
.And that fails the final
file_exists
check again.jQuery is not added to the resulting file.
#328 attempts to fix this in
beans_url_to_path()
.@hellofromtonya
Is this a scenario that
beans_url_to_path()
should handle to begin with or should this be handled inget_deps_to_be_compiled()
, e.g by prepending the site_url (or simply '.') todep_src
when necessary?The text was updated successfully, but these errors were encountered: