-
-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metadata display modes - Switch to Full View doesn't work when metadata record is called in Simple View from external web application #4511
Comments
it seems that https://vanilla.geocat.net/geonetwork/srv/api/records/da165110-88fd-11da-a88f-000d939bc5d8/formatters/xsl-view?root=div&view=advanced&approved=true is not called when accessing Full view after using the permalink. |
Probably related to https://github.com/geonetwork/core-geonetwork/pull/3909/files So it works fine when you run a search first. |
After analyzing this with Jose, it is an issue related to the order of operations execute when the app starts which explains that it also may happens randomly - the search (made to retrieve record info) may not complete before the record view is initialized. Records info when loading a formatter are mainly required to know if a draft version exist or not. And the formatter load is not made if the current record is not set. An option to fix that is https://github.com/geonetwork/core-geonetwork/blob/master/web-ui/src/main/resources/catalog/components/search/mdview/mdviewModule.js#L124-L129 // if ($scope.mdView.current.record == null) {
// return;
// }
var showApproved = $scope.mdView.current.record == null ? true : $scope.mdView.current.record.draft != 'y'; This would affect a direct link to a draft version (but I'm not sure we have such a link). At least it could be a good workaround for the majority of users currently not using the draft mode. Testing, feedback and ideas welcomed. |
Hey, I still get an empty content when I directly access the url, such as refreshing the page. If I first access the page in default view (click through the home page), then change to full view it will work. But if I refresh the page or if I copy and past the link to another browser or another tab, this issue still exists. |
I have tested in a new code checkout and with incognito window in the browser and works fine for me. Please @zhuoyuezhou can you cleanup the WRO4J Javascript & CSS cache in http://localhost:8080/geonetwork/srv/eng/admin.console#/tools with the button |
@josegar74 Hi, I tested. It works! But I find another thing strange. If I click one record from the home page, change it to full view. Then go back to home page, click another record, change it to full view, it‘ll first show the information from the previous metadata record and then change to the current one. That happens occasionally, not sure if you'd replicate that. |
@zhuoyuezhou indeed I can confirm that behaviour, I have created another issue to track it: #4526 |
Hello @josegar74 , it seems like I am running into the same issue: If I access the URL with the custom formatter in it, geonetwork will show the banner and then an empty space. If I add anything in the URL and type Enter, the metadata is displayed. @fxprunayre Tried your patch and I can confirm that it fixes the issue. Do you think it will be merged in a future geonetwork version? Thanks! |
Also, while on the subject of formatters, is there a way to change the "defaultView" formatter? Can you do it from the settings UI or do you have to change the source and make your own build? From what I can read here:
But I would rather not have to recompile geonetwork just for this (not really sure the formatter.list will change the default formatter either ...) Thanks! |
…ta record is called in Simple View from external web application geonetwork#4511
…ta record is called in Simple View from external web application #4511
Should have been covered by #3909. Let us know in another ticket if you have issue on this. |
@fxprunayre Thanks for your answer! I am using current master, so I guess this is not fixed, I cannot see a way to set the default formatter (when clicking on a search results for instance) with the Settings UI. I'll create another ticket |
The first formatter in your UI config will be the default. |
Ok, but it says "Milestone 3.8.0" and I am running "master" (3.11-SNAPSHOT), so it means that It has an issue? Or the milestone in the github issue is not correct? |
…ta record is called in Simple View from external web application #4511
…ta record is called in Simple View from external web application geonetwork#4511
…ta record is called in Simple View from external web application geonetwork#4511
Test:
Access the detail page of a metadata using the permalink, for example: https://vanilla.geocat.net/geonetwork/srv/eng/catalog.search#/metadata/da165110-88fd-11da-a88f-000d939bc5d8
Switch to the full view: an empty content is displayed, no javascript errors, seem not even executed the request to retrieve the formatter full view.
Search for the metadata uuid
da165110-88fd-11da-a88f-000d939bc5d8
and in the metadata detail page switch to Full view --> it works.The text was updated successfully, but these errors were encountered: