-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
Unset Media doesn't work #1427
Comments
This would not have an effect for me, because every unset action would result in the behaviour described, not only if the page was saved with an empty field. The second solution is fine for me, though. Thank you! In my case, delete would be the preferred action anyway. |
unset on file field should be working now. |
It does a really weird thing for me. I have multiple Not sure if that's understandable, I can write the steps, if needed. For now I will use |
Having the same issue as @voythas. My workaround for these custom file fields is to remove the unset button from dropzone. EDIT: in fact, this isn't a valid workaround as just using the delete button on images causes its own problem. The image file gets deleted from the file system but the page markdown still lists the (now broken) image file. |
Got the same problem: |
The unset shouldn't really be showing on single file uploads. It's supposed to be available only when |
@w00fz there is still an issue. I had a client come across this. If you utilize a list, and have a field within your list as a file, even if you set multple to If you unset a file (or image) it will set every single file within that list as one. I tested local and confirmed this bug. |
I'm running into the same issue. A client of mine tried to remove an image and had all images being replaced with the same image as being mentioned above. |
If you guys need to test you need to use the beta, that’s where all the changes and fixes are going right now, especially for the media portion. |
The fixes in 1.9 Beta don't address this issue. I submitted another PR #1561 For some reason, I can't seem to commit a clean PR, it always wants to include my upgrade to 1.9 in my fork for some reason. I'm sorry about that. |
It’s not fixed yet. Please remove the button or fix the bug. It has coursed some headaches |
I tried a PR that fixes this. However, I am not good at pull requests. I'll try again hopefully soon. The problem is obvious and I know the fix. |
I'm not sure why this is still closed. I tried submitting a PR #1559 but that got shut down. If I could do a PR off of the main branch, I could solve this quickly. 4 or so people on here see this as a problem, and 3 of our clients already do. It's easy to replicate:
I have the fix too! I just can't seem to do a PR off of a branch that isn't the main branch |
What are you using to create the PR? First fork the 1.6 branch, then when you create the PR, it should let you pick 1.6 as the base by default in github. |
How do you recommend I fork a specific branch? When I click on the fork button, I get https://github.com/hdwebpros/grav-plugin-admin That's been my issue the whole time. I can't seem to fork off of a specific branch. I asked around, and people mentioned stuff about using git to checkout upstream and remote or something like that but it wasn't as simple as just fork, clone, do edits, do PR |
Follow these steps:
|
Maybe deleting my fork will help here. Thanks for the tips! I'll give it a whirl |
Alright. After much finaggling, I got my local 1.6 beta with my forked admin plugin switched to branch 1.9 to work. I flat out don't even see an unset button. Anywhere. It seems to be in the code, but not in the repo's compiled code. Am I missing something? Furthermore, when trying to run
There is no output filename configured in the Webpack conf file. I'm stuck here, can't compile the JS to test my fixes. |
A quick fix or work around, for now, that seems to work for me is to set the limit to a high number. |
Didn't work for me.
@julienbenisty how did you use Limit. Do you have a simple YAML file to show? |
I would submit to fix if I could get this running locally. The problem was that the unset JavaScript targets every single drop zone you have. I wish I could be more of an assistance to you. |
Pull request to fix this at #1670 |
This is now solved, I merged @rotanadan PR. Thanks all for the help and patience. |
Hi, it appears that the "unset" media button (the cross icon when you hover over a preview file) doesn't seem to work.
Setup :
Grav v1.4.3
&Grav Admin Panel v1.7.4
multiple
attribute set tofalse
(It should be all good up to here)
My .yaml file :
Problem 1 :
You can not upload any more files.
Problem 2 :
Now you should end up with all image file fields, filled with the same image ! (the image is the first filled image field)
@lepascal posted an exemple of this issue here with a repeater field, but it's also true with only 2 image fields.
Temporary Solution 1 - NOT WORKING
I wanted to set my image file fields as required using the
validate.required
attribute in order to prevent saving the page if an image field is empty, but this is not working. This is a know bug and I added a comment hereTemporary Solution 2 - working, but not ideal
As the problem seems to come from the cross icon only, I got rid of it.
In my theme, I added this piece of code into my
custom.js
file :Thanks
The text was updated successfully, but these errors were encountered: