Home › Forums › Backend Issues (wp-admin) › File field type – ACF Edit form file details MIA
By default when the ACF edit file form fires up after clicking on the pencil icon, the file details appear. Great.
However, when using Folders Plugin, or Media Library Folders Plugin, the details no longer appear.
According to my research, the issue is due to Folders and MLF plugins not knowing which folder to use, so it only uses the uploads directory and if the file is in a sub directory, no details are displayed within the ACF edit form.
My Question:
Is there a hook I can use to get file information prior to the ACF edit form appearing?
It would then be simple enough to get the folder the file belongs to.
Thanks
also, is there a way that one could provide more File information on the post form itself?
Currently only:
Slug
File Name
file Size
ACF uses the standard WP interface that has always been used when clicking on the classic editor “Add Media” button. If the other plugin you mention modifies this then those modifications should appear. It is more than likely that your other plugin is saving file information in a way that is not the same as WP does.
It is not an “Add Media” issue. Nor is it a “Save Media” issue.
“Edit”
It is an ACF Media Edit form, ACF classes all over the place. Please reread my original post.
ACF uses WP functionality wherever it can. Just because you are using ACF to add a media file does not mean that ACF controls all aspects of the media file.
EDIT
EDIT
not ADD or SAVE
In a post with an ACF file field – EDIT. an ACF form appears. Please stop trolling with ADD and SAVE.
Accidently clicked solved…should be able to give minus
Created New thread that hopefully reads EDIT successfully.
Please explain to me what you find different about the edit vs the add file popup.
When using ACF without other plugins both of these use the same WP Modal Media window.
Yes Edit and Add extend the MediaPopup. (EditMediaPopup, SelectMediaPopup)
With different processing, fields, etc. as one would assume when editing versus adding.
Within the ACF extension of mediapopup for editing, the attachment details are populated. This is where the issue is.
wp.media.attachment(frame.acf.get('attachment'))
when any folder plugin is used, will return no attachment details. This is due to the folder plugins defaulting to filter attachments to “uploads”, which then does not find the attachment.
I did not intend to sort through the ACF code for editing an attachment. My hopes were that someone had already done so and could assist me to override the extension to return the attachment details.
I have sent in an ACF ticket, hopefully they will know if I can override their extension to do what I need it to do. Which is to get the wp.media.attachment to use the attachment’s folder or look through uploads and its subdiretories.
I have other clients to attend to, this is a very low priority to me. If they need to edit the actual attachment details they can from the media post itself and not the ACF edit form.
After providing the Dev team with the function in question and examples, they are aware that if any filter is applied to the media folders, no details will return.
“We’re aware of this issue. The problem’s actually upstream with WordPress and will be fixed in 6.2.1”
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.