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
[3.2] Asset fields with "Restrict uploads to a single folder" don't show any files. #4522
Comments
Thanks for reporting! Just fixed this for the next release. To get the fix early, change your "require": {
"craftcms/cms": "dev-develop#35ee869d31fc34792e29807ad707b3ae0e4588d2 as 3.2.0",
"...": "..."
} Then run |
Hi! Craft: 3.2.10 { |
@peimansh You should start by updating to the latest version of Craft (3.3.15) and see if the issue persists. |
@andris-sevcenko I have tried this. Unfortunately it didn't work with the latest version either. |
Also noticed a few deprecation warnings in the panel and is coming from the SEOmatic plugin. Since i'm beginner to Craft i'm not sure if it is related to this issue, but I thought it's worth mentioning it :
|
@peimansh The deprecation warnings are not related to this, no. What you're seeing is the expected behavior. Your dynamic path for the Asset field probably contains at least one token that cannot be resolved until the entry itself is saved. As your other comment shows, you are referencing the site variable in the subfolder path. Until the entry is saved, it is impossible to determine to which site it belongs to, so Craft cannot resolve that path to a folder, so it displays the Temporary Upload location. Once an entry is saved, Craft checks if it needs to move any Assets based on the dynamic folder settings. |
@andris-sevcenko Yea but the strange thing is that it was working completely fine before 3.2.x (3.1.34.3 I mean) and I saw nothing related to this in the changelog. That made me think maybe this is not an expected behavior. |
@peimansh can you share what string you're using as your single upload directory for your Asset field? |
@andris-sevcenko Yes sure. That's |
I have also found another bug which Craft 3.2.10 fails to update slugs and URI's when moving entries between different sections. |
@peimansh Can you please post a new issue for that? |
I am now testing our website with 3.3.15 and the problem is solved. So I hope updating the production environment will solve our issue. But I can create a new issue for that if you want |
But regarding the empty asset modal, i'm still not convinced how it could be an expected behaviour ! |
@peimansh What is the full value of your Assets field’s subfolder setting? |
I have tried to debug, and i am suspecting "UID" . |
Description
If the "Restrict uploads to a single folder" option is selected for an asset field, when you try to add an asset to an entry via this asset field, no files show up in the asset modal.
Steps to reproduce
Additional info
All files show up when viewed via Assets.
Drag-and-drop upload via the Entry edit view does work.
I emptied the Craft caches, rebuilt the asset indexes hoping that would help, it did not.
I tried disabling benjamminf/craft-embedded-assets, that did not help either.
Craft version: 3.2
PHP version: 7.3.6
Database driver & version: 5.5.5
Plugins & versions:
The text was updated successfully, but these errors were encountered: