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.
Problem/Motivation
File uses the type uri. Which has caused weird problems before, because the file URI isn't actually a valid URI. There are validation problems and so on.
The UriItem field type uses uri_link as the default formatter. But that is not compatible with public:// / private://
Proposed resolution
Switch to use string? Maybe actually support stream wrappers in fromUri() ?
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#18 | 2539622-18.patch | 4.55 KB | Nikhil_110 |
#18 | interdiff_17-18.txt | 3.85 KB | Nikhil_110 |
#17 | 2539622-17.patch | 1.1 KB | Nikhil_110 |
#3 | 2539622-1.patch | 978 bytes | dawehner |
Comments
Comment #1
dawehnerThe later one sounds more sane, to be honest.
Comment #2
BerdirThat would be neat :) if you need a Url object for a file url, you need something like this: Url::fromUri(file_create_url($file->getFileUri()). Would be nice if it would understand that directly.
Comment #3
dawehnergit stash
Comment #4
BerdirComment #17
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedPatch #3 fixed the issue. and patch uploaded for 9.5.x
Comment #18
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedPatch #17 Fixed CCF issue.
Comment #19
Nikhil_110 CreditAttribution: Nikhil_110 at Srijan | A Material+ Company commentedComment #20
smustgrave CreditAttribution: smustgrave at Mobomo commentedJust looking at the file sizes #18 quadrupled the size of the original patch..why is that? Issue summary should include those additional changes.
This needs steps to reproduce for D10 also.
Once that's done a test case will be needed.