Needs work
Project:
Drupal core
Version:
main
Component:
file.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Oct 2015 at 19:55 UTC
Updated:
28 Dec 2022 at 23:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
dawehnerAre you sure we don't need an update path for it?
Comment #3
mikeryanI'm not sure... What would be updated? The table schema already has uri defined as NOT NULL.
Comment #4
alexpottWe need to clear the cached definitions - just need an empty hook_update_N in the file module for this.
Comment #5
mikeryanComment #6
mikeryanComment #7
mikeryanNote that #2590993: Create stub entities with proper default values is no longer dependent on this patch - the "work-around" there turned out to be necessary anyway.
Comment #8
berdirThe description of this function is shown in the UI when running updates. So it should be written in a way that tells the user what it does.
I agree that it makes sense that URI should be required.
But why does the schema have a NOT NULL if the field is not required? Are we altering the schema somewhere manually or automatically (e.g. due to the existence of an index on that column?)
Checking.... Yeah, FileStorageSchema adds that not null automatically due to the call to addSharedTableFieldIndex().
That doesn't seem 100% right.. it should only do that if the field is indeed required? Or maybe throw an exception if there's a mismatch?
Might be good to have some feedback from @plach.
Comment #12
kenorb commentedThe following error happened when submitted /webform/%/test
I haven't test the patch yet.
Comment #16
benedicte_w commentedHere's the patch for drupal 8.7.4.
I choosed not to include changes on file.install and clear the caches manually.
Comment #19
shivam kaushal commentedComment #20
shivam kaushal commentedComment #23
larowlanThis needs to reroll from #5 and include the changes from @Berdirs review
Comment #24
immaculatexavier commentedRerolled patch against #5 and included the changes from @Berdirs review
Comment #26
medha kumariPatch #24 applied successfully in 9.5.x-dev branch
Comment #28
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge require as a guide.
@immaculatexavier thank you for the patch but please include an interdiff so we can see the changes.
From what I can tell #8.1 or #8.2 have not been addressed.
8.1 = the description appears to be the same from what it was
8.2 = dont' see any follow up for that.
Also the hook update is targeting D8 so that's not correct.
Thanks