Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions doc/release-notes/12252-fix-download-with-guestbook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
## Bug fix for JSF download file
This fixes the issue where the action to download a single file in JSF UI silently fails

See:12251
14 changes: 7 additions & 7 deletions src/main/webapp/file-download-button-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
styleClass="btn-download"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'GlobusTransfer')}">
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'GlobusTransfer', null)}">
<!-- non-tabular data file: -->
<!-- no guest book/terms of use/etc. - straight to the download API url: -->
<span class="globus-btn ui-icon" title="#{bundle['file.globus.transfer']}"/> #{bundle['file.globus.of']} #{fileMetadata.dataFile.friendlyType == 'Unknown' ? bundle['file.download.filetype.unknown'] : fileMetadata.dataFile.friendlyType}
Expand Down Expand Up @@ -118,7 +118,7 @@
styleClass="btn-download"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'Download')}">
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'Download', null)}">
<!-- non-tabular data file: -->
<!-- no guest book/terms of use/etc. - straight to the download API url: -->
#{fileMetadata.dataFile.friendlyType == 'Unknown' ? bundle['file.download.filetype.unknown'] : fileMetadata.dataFile.friendlyType}
Expand All @@ -142,7 +142,7 @@
<li>
<p:commandLink styleClass="highlightBold btn-download" rendered="#{!(guestbookAndTermsPopupRequired)}"
process="@this"
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'bundle')}">
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'bundle', null)}">
#{bundle['file.downloadBtn.format.all']}
</p:commandLink>
<p:commandLink styleClass="highlightBold btn-download" rendered="#{guestbookAndTermsPopupRequired}"
Expand All @@ -160,7 +160,7 @@
<p:commandLink styleClass="btn-download" rendered="#{!guestbookAndTermsPopupRequired and !(fileMetadata.dataFile.originalFormatLabel == 'UNKNOWN')}"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'original')}">
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'original', null)}">
<h:outputFormat value="#{bundle['file.downloadBtn.format.original']}">
<f:param value="#{fileMetadata.dataFile.originalFormatLabel}"/>
</h:outputFormat>
Expand All @@ -182,7 +182,7 @@
<p:commandLink styleClass="btn-download" rendered="#{!guestbookAndTermsPopupRequired}"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'tab')}">
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'tab', null)}">
#{bundle['file.downloadBtn.format.tab']}
</p:commandLink>
<p:commandLink styleClass="btn-download" rendered="#{guestbookAndTermsPopupRequired}"
Expand All @@ -200,7 +200,7 @@
<p:commandLink styleClass="btn-download" rendered="#{!guestbookAndTermsPopupRequired}"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'RData')}">
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'RData', null)}">
#{bundle['file.downloadBtn.format.rdata']}
</p:commandLink>
<p:commandLink styleClass="btn-download" rendered="#{guestbookAndTermsPopupRequired}"
Expand Down Expand Up @@ -228,7 +228,7 @@
<p:commandLink styleClass="btn-download" rendered="#{!guestbookAndTermsPopupRequired}"
process="@this"
disabled="#{(fileMetadata.dataFile.ingestInProgress or lockedFromDownload) ? 'disabled' : ''}"
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'var')}">
actionListener="#{fileDownloadService.writeGuestbookAndStartFileDownload(guestbookResponse, fileMetadata, 'var', null)}">
#{bundle['file.downloadBtn.format.var']}
</p:commandLink>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just noting that https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-12252/2/consoleFull failed with something unrelated:

TASK [dataverse : Wait until localstack status is ready] ***********************
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (18 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (17 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (16 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (15 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (14 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (13 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (12 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (11 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (10 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (9 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (8 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (7 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (6 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (5 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (4 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (3 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (2 retries left).
FAILED - RETRYING: [localhost]: Wait until localstack status is ready (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 18, "changed": false, "content": "", "elapsed": 0, "msg": "Status code was -1 and not [200]: Request failed: <urlopen error [Errno 111] Connection refused>", "redirected": false, "status": -1, "url": "http://localhost:4566/"}

I just kicked off https://jenkins.dataverse.org/job/IQSS-Dataverse-Develop-PR/job/PR-12252/3/

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problems on my laptop:

docker logs dev_localstack

LocalStack version: 4.2.0
LocalStack build date: 2025-02-27
LocalStack build git hash: 2144203e0

2026-03-25T17:24:02.119  WARN --- [  MainThread] localstack.deprecations    : HOSTNAME_EXTERNAL is deprecated (since 2.0.0) and will be removed in upcoming releases of LocalStack! This configuration will be migrated to LOCALSTACK_HOST
2026-03-25T17:24:06.981  INFO --- [et.reactor-0] localstack.request.aws     : AWS s3.CreateBucket => 200
make_bucket: mybucket
Ready.

🤷

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it's working on my laptop, I created an issue on the ansible side:

<p:commandLink styleClass="btn-download" rendered="#{guestbookAndTermsPopupRequired}"
Expand Down
Loading