This behaviour only occurs in v5.14. It seems to be fixed in v6.0.
However, we're looking for a quick fix which we can apply to v5.14.
There's a discussion on Zulip chat about this: https://dataverse.zulipchat.com/#narrow/stream/378866-troubleshooting/topic/dataset.20status.20change.20isn't.20visible.20after.20publish.20.28v5.2E14.29
Normally, when publishing a dataset, the dataset page refreshes every few seconds and then displays the published dataset.
With 5.14 however, the page is still refreshed, but at the end the old draft version is displayed, although the dataset is in status published. If you refresh the page manually, the message "Info – The "DRAFT" version was not found. This is version "1.0". " is displayed. But if you go back to the list, and open the dataset again, it's in the correct state (published)
In the background the log shows a null pointer exception:
[2023-09-22T13:47:14.081+0200] [Payara 5.2022.5] [SCHWERWIEGEND] [] [javax.enterprise.resource.webcontainer.jsf.context] [tid: _ThreadID=98 _ThreadName=http-thread-pool::http-listener-1(2)] [timeMillis: 1695383234081] [levelValue: 1000] [[
javax.faces.view.facelets.TagAttributeException: /dataset.xhtml @93,82 test="#{not empty DatasetPage.getSignpostingLinkHeader()}" /dataset.xhtml @93,82 test="#{not empty DatasetPage.getSignpostingLinkHeader()}": java.lang.NullPointerException
at com.sun.faces.facelets.tag.TagAttributeImpl.getObject(TagAttributeImpl.java:318)
...
Caused by: java.lang.NullPointerException
at edu.harvard.iq.dataverse.DatasetPage.getSignpostingLinkHeader(DatasetPage.java:6149)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.el.ELUtil.invokeMethod(ELUtil.java:236)
... 84 more
]]
The method DatasetPage.getSignPostingLinkHeader (
|
if (!workingVersion.isReleased()) { |
) is called a lot of times during the publishing process. The last 3 times it's called during the auto refresh phase, workingVersion is null. This leads to the null pointer exception.
Fixing this method does not help, because then another NPE is thrown. The actual problem is that methods are called on DatasetPage when the page is refreshed, but workingVersion and dataset are null.
Here's a screencast showing this behaviour:
https://github.com/IQSS/dataverse/assets/5524896/c1262c31-5e12-4312-b0be-618a3112e102
Would be really helpful if anyone is aware which change from v5.14 to v6.0 fixedx this behaviour.
Thank you!
This behaviour only occurs in v5.14. It seems to be fixed in v6.0.
However, we're looking for a quick fix which we can apply to v5.14.
There's a discussion on Zulip chat about this: https://dataverse.zulipchat.com/#narrow/stream/378866-troubleshooting/topic/dataset.20status.20change.20isn't.20visible.20after.20publish.20.28v5.2E14.29
Normally, when publishing a dataset, the dataset page refreshes every few seconds and then displays the published dataset.
With 5.14 however, the page is still refreshed, but at the end the old draft version is displayed, although the dataset is in status published. If you refresh the page manually, the message "Info – The "DRAFT" version was not found. This is version "1.0". " is displayed. But if you go back to the list, and open the dataset again, it's in the correct state (published)
In the background the log shows a null pointer exception:
The method DatasetPage.getSignPostingLinkHeader (
dataverse/src/main/java/edu/harvard/iq/dataverse/DatasetPage.java
Line 6148 in 9f4ddbb
Fixing this method does not help, because then another NPE is thrown. The actual problem is that methods are called on DatasetPage when the page is refreshed, but workingVersion and dataset are null.
Here's a screencast showing this behaviour:
https://github.com/IQSS/dataverse/assets/5524896/c1262c31-5e12-4312-b0be-618a3112e102
Would be really helpful if anyone is aware which change from v5.14 to v6.0 fixedx this behaviour.
Thank you!