Closed (duplicate)
Project:
Drupal core
Version:
8.2.x-dev
Component:
file.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Apr 2016 at 13:35 UTC
Updated:
21 Apr 2016 at 08:38 UTC
Jump to comment: Most recent
Comments
Comment #2
alexpottComment #3
berdirNot sure how you want to fix this exactly?
We could register a canonical link template/route that redirects to the actual file, but do we really want that?
Also note that file_entity *does* add a real canonical link template, with a standard entity view page that shows the file with the fields and so on.
Comment #4
alexpottWell we're in a weird situation where ->url != ->toUrl()->toString(). If someone asked me what was the canonical link to a File entity I would say it was a link to the file.
Comment #5
larowlanThis feels familiar, is there an existing issue?
Comment #6
alexpottThis issue reminds of #2676552: File usage view breaks if an entity uses a file that has no canonical link template but it is not the same.
Comment #7
larowlanThere is also #2355245: ER's label formatter needs to take into account that $entity->urlInfo() might throw an exception - I seem to recall it being an issue in DER - maybe I'm dreaming it.
Also related #2314509: RDF module prevents viewing of unsaved users (slightly)
Comment #8
berdirI know that there's also another issue somewhere where I commented on, but can't find it anymore.
Comment #9
alexpottFound it... #2402533: Provide File::createFileUrl() as a replacement for the deprecated File:url() implementation
Comment #10
berdirthat's the one. this could be closed as a duplicate I think?
Comment #11
alexpottYes I agree.