-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
[v4] Plugin assets resolves as JSON (500 Internal Server Error) #5836
Comments
Sounds like something in |
Seems |
That is right, that's the only time it can run. But |
@distantnative Looks like works like following. Not sure but I think bug is related with - $stale = array_diff($files, $active);
+ $stale = array_diff($active, $files); https://github.com/getkirby/kirby/blob/v4/develop/src/Cms/PluginAssets.php#L49 Update: Nvm, I think this is not related with the issue. |
Another clue is about getting current files via - $files = Dir::index($media, true);
+ $files = Dir::files($media); https://github.com/getkirby/kirby/blob/v4/develop/src/Cms/PluginAssets.php#L37 |
Yes that's part of the problem. Another part is that actually with our new asset plugin extension the names might not even match. So we would probably also add calls like |
I think the main issue right now is indeed that the folders are only included in the current index, not the We could fix this by including all parent directories up to the plugin's media root for all assets in |
That's but also |
Yeah, we definitely also need to look up the resulting paths for each asset. |
Description
Sometimes plugin assets resolves as JSON. This issue does not always occur. I don't know exactly when it occurs.
Use following code to reproduce:
To reproduce
Your setup
Kirby 4.0.0-beta.3/v4-develop
Additional context
When I checked
/media/plugins/afbora/test
directory, It's empty. When I visit/media/plugins/afbora/test/2538303991-1697822431/css/style.css
url from browser, opens correctly in browser and I can see thestyle.css
in/media/plugins/afbora/test
. But I refresh the homepage,/media/plugins/afbora/test
directory cleared again.The text was updated successfully, but these errors were encountered: