Closed (fixed)
Project:
Collect
Version:
8.x-1.x-dev
Component:
Metadata Management
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Mar 2015 at 11:16 UTC
Updated:
26 Apr 2015 at 23:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
arla commentedActually, isn't the link a duplicate of #2449371: Link to container raw data?
Comment #2
arla commentedDiscussed with @miro_dietiker and this is not a duplicate.
The other issue is about providing the complete, escaped, raw data in the UI. The purpose is to be able to review the data e.g. for schema/property management.
The fetched content link is about providing the content for downloading, or viewing outside the Drupal UI.
Comment #3
mbovan commentedAfter #2448225: Filter container list for schema URI and origin URI this problem has activated. Because url is parsed from current request there is a problem if we click on "Show content in a new button" from this url
http://.../admin/content/collect/11?destination=/admin/content/collect(url is created if we click on 'View' button on container listing page).In uploaded patch, replaced url parsing with container id from the collect container object, which we can get from current request.
Comment #4
miro_dietikerYeah, that looks ugly. The proposed solution already looks better... But it still looks like a workaround.
We need a test that exactly shows how it is currently broken and fixed after with that destination parameter.
Comment #5
mbovan commentedAdded tests to assert that generated web page is accessible. Also provided test-only patch.
Comment #6
berdir\Drupal::routeMatch()->getRawParameter('collect_container') should give you the same.
And yeah not pretty. It's still relying on the current route, which will be a problem if this is every called in a different way?
Apparently we are relying on it, shouldn't we pass the entity or $items into this method? Or have a generic $context array, if the container is there, use it, if not, don't display this link?
Comment #7
mbovan commentedAdded collect container as a second parameter in build() method (SpecializedDisplaySchemaInterface class) so we can always get needed collect container id.
Comment #8
miro_dietikerFixxxed. Thx!