Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Examples:
- https://drupal.org/node/2183923#comment-8461447
- https://drupal.org/node/2095959#comment-8461455
- https://drupal.org/node/2028025#comment-8461851
- https://drupal.org/node/2101183#comment-8462063
- https://drupal.org/node/2099741#comment-8462693
- https://drupal.org/node/2177461#comment-8461433
This is not good. :(
I hit this when testing sanchiz's original patch, but didn't hit it subsequently. Guess it's still there though. :(
Comments
Comment #1
webchickAnd here, just commenting deletes all files in the issue. :(
https://drupal.org/comment/8461455#comment-8461455
Comment #2
tim.plunketthttps://drupal.org/comment/8461455#comment-8461455 has about half the files deleted, I didn't upload anything new to that one.
Comment #3
YesCT CreditAttribution: YesCT commented#2186089: Increase the length of Issue tags field had one file in the file table, and after commenting on it, the file list is zero. In my comment, before saving, I checked the comment collapsed field and it was zero.
[edit] Another example: https://drupal.org/node/2028025#comment-8461851
Comment #4
jhodgdonAnother example
https://drupal.org/comment/8462063#comment-8462063
This is terrible!
It looks like the files are not actually being deleted per se, but they are being removed from the issue. It seems to be removing all the files that were marked as "hidden"... maybe anyway?
Comment #5
klonos...btw is not having the ability to hide/rearrange files intentionally not included in the new form (the "Files" fieldset allows only new uploads - doesn't list old files)? Separate issue? Someone already filed one?
Comment #6
drummComment #7
drummAs far as I can tell, this happens when you update (including comment) on an issue when the previous comment is from someone else.
#2159813: Display parts of the issue edit form instead of the comment form on issue pages tries to simplify the form by removing the files table. I committed http://drupalcode.org/project/project_issue.git/commit/4bf4847 to remove that change for now. Adding the D.o UX tag since we might want this back at some point.
That code does seem a bit hacky, it is removing the values for rendering, and re-adding them for saving. I think a better way would be to either:
display: none;
in the theme could work, but should be a last resort. Rendering things just to be hidden is not ideal.)Comment #8
drummNow deployed. Forms rendered before deployment, even if they are saved afterward.
I'll see what can be done to clean up the mess.
Comment #9
webchickDang. That's too bad because it makes the "simplified" form super nasty now, especially on soul-sucking core issues with 50+ files (which is most of them ;)). However, that does indeed seem vastly preferable to deleting files. :)
Comment #10
drummCollecting examples in the summary.
Comment #11
webchickDang. Still not quite.
https://drupal.org/comment/8462693#comment-8462693
In this case, all files were already hidden other than the last patch when I went in to comment. The file upload form field below also only showed that patch (which is probably where the trouble comes from). Looks liek it blew away everything else. :(
Comment #12
drummComment #13
webchickAnother instance :( https://drupal.org/comment/8462769#comment-8462769 This one I'm doubly-triply sure happened post-deployment.
Comment #14
drummGood news: This script looks like it does a good job of repairing these. Admins can legitimately delete files, so I'm assuming all
cid >= 8461165
have this bug.I've tested it with #893302: Search ranking based on the factor "number of comments" & "No of Page Views" is broken and #1316692: Convert hook_admin_paths() into declarative properties on routes and it looks okay. The revision history will have them missing for a bit if there are comments between the problem and this fix; I don't think it worth rewriting all of it.
Bad news: yes, this is still happening, but not too quickly now. About one an hour.
Comment #15
webchickYeah, I think the precise error condition is "if you comment on an issue that has N files marked as hidden, all of the N files will be deleted once you post a comment if your name and the name above you do not match." Or at least, that's what the story was with the two issues I experienced this in, as well as https://drupal.org/comment/8463121#comment-8463121.
This probably is only happening ~once per hour because it's unusual (outside of core) to have issues with enough files to bother hiding old ones.
Comment #16
klonos#1857256-91: Convert the taxonomy listing and feed at /taxonomy/term/%term to Views
Comment #17
webchickAdditional examples:
https://drupal.org/comment/8462981#comment-8462981
https://drupal.org/comment/8461479#comment-8461479
Apparently I was wrong, as that latter one shows, the previous commenter is irrelevant. It's simply deleting all hidden files. Adjusting issue title accordingly.
Comment #18
BerdirYes, deleting all hidden fields is also what I've interpreted this as when I've seen it yesterday. Didn't see this issue then though, would have said that earlier otherwise :)
Comment #19
joachim CreditAttribution: joachim commentedShould we maybe turn off the new feature until this is fixed?
Comment #20
znerol CreditAttribution: znerol commentedComment #21
jonathan1055 CreditAttribution: jonathan1055 commentedAgree with #17 and #18. Here is one that just happened to me #2182063: Remove db_placeholders() function which does not exist in D7 comment #10. That patch file was hidden.
Comment #22
klonos...why am I getting access denied when I try to view the revision diff of this issue by clicking the "View changes" link in #20? Text format permissions?
Comment #23
ianthomas_ukDo you need more examples? I just had this happen on https://drupal.org/node/2045927
Comment #24
drummPlease collect examples in the issue summary.
I ran the recovery script to restore the hidden files for now.
Comment #25
drummThe node from
menu_get_object()
used when building the form in a block is missing the hidden files.Something else on the page is poisoning that copy of the node object. If straightforward to find & fix, that root cause can be fixed. Otherwise, we can load a fresh copy of the node.
Comment #26
drummhttp://drupalcode.org/project/project_issue.git/commit/fab3279 should fix this. I got lucky and quickly found that something generating the issue metadata block was abusing the node object. This is now deployed on Drupal.org.
I think this is another symptom of a core bug we've been working around, #1289336: Calling node_view for the same node with multiple view modes on the same page during node preview does not correctly attach fields.
Comment #27
drummI ran the cleanup script from #14 again, so this should all be cleaned up.
We could probably safely re-instate the code from #7, with some testing, but I would still like the alternative solutions to be investigated.
Comment #28
drummThis hasn't recurred since #27. This issue can be repurposed to get the files UI in line with #2159409: [Meta] Implement first iteration to improve issue queue workflow; or this issue can be closed and a clean followup opened for the files UI.
Comment #29
webchickI think a separate issue for that is best.
Thanks drumm!!
Comment #30
webchickOpened that at #2192449: Improve edit Files UX.
Comment #31
klonosI think fixing this has somehow caused #2192497: Match domains on more than $_SERVER['HTTP_HOST']