-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
Error with decompiled assets in 1.2 #562
Comments
@LukeTowers yeah I have the same issue occurring. It's due to the Asset Maker PR that was merged recently, and the fact that now all assets are using a URL. I was meaning to ask Jack or yourself what the change was for. |
@bennothommo it's to support having your assets published on a CDN, specifically on Laravel Vapor it was an issue where any assets added via the AssetMaker trait weren't respecting the asset_url config value and thus weren't loading. We should just be able to add support for the |
@LukeTowers ok, gotcha, however, is that needed for assets that are included in the core? I can see the case for plugins, where they may be externally stored, but the ones in core that actually are candidates for decompilation should still be loaded locally? Unless you are moving those externally as well? |
When using a CDN as a part of your deployed Winter instance the idea is for all assets to be served through it, so loading any assets "locally" would be a bit pointless. I imagine that the decompiler should be able to just strip off the asset URL before attempting to decompile an asset, no? |
Sure, we can do that. If the assets are not available locally though, it will fail. |
That should be fine, the asset URL helper should only be adding to assets that are available locally anyways, and you certainly wouldn't actually be using the asset decompiler in an environment like Vapor where the assets might not even be present on the server at all. |
#552 introduced a change where all backend assets are converted to URLs to provide support for the `app.asset_url` configuration variable. This change allows asset decompilation to still work by converting a (local) URL back to a relative path. If a URL doesn't match the root URL, then it is passed through as is with no decompilation taking place. Fixes #562.
Fixed by 805b95b. |
wintercms/winter#552 introduced a change where all backend assets are converted to URLs to provide support for the `app.asset_url` configuration variable. This change allows asset decompilation to still work by converting a (local) URL back to a relative path. If a URL doesn't match the root URL, then it is passed through as is with no decompilation taking place. Fixes wintercms/winter#562.
I installed a fresh wintercms 1.1.8 and upgraded to 1.2
if I set 'decompileBackendAssets' => true, I get the following error:
File https://tb.tbtest.andoria/modules/backend/widgets/mediamanager/assets/js/mediamanager-browser.js does not exist to be decompiled.
.../modules/backend/helpers/Backend.php line 229
I think, the problem is, there is an URL and not a file-path given in $file. In another 1.1.8 install it works fine.
Tell me, if you need infos about my setup
The text was updated successfully, but these errors were encountered: