Skip to content
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

A quick xhtml-only fix for the "template with custom terms of use" bug #9892

Merged
merged 1 commit into from
Sep 8, 2023

Conversation

landreev
Copy link
Contributor

@landreev landreev commented Sep 7, 2023

What this PR does / why we need it:

This fixes, or works around the bug by disabling everything inside the file-download-popup-fragment when the page is in CREATE mode.

Which issue(s) this PR closes:

Closes #9825

Special notes for your reviewer:

Going forward, we may want to consider adding some null checks inside the java code to prevent this; it's not entirely impossible that another developer will add some code that will try to call this method on a dataset that doesn't yet have a persistent id for whatever reason - ?

Suggestions on how to test this:

see the linked issue for the steps to reproduce the bug.

edit: would also be prudent to confirm that the file download popup is still working when you are actually downloading files from a dataset that has terms of use. I have tested - but worth confirming.

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

Is there a release notes update needed for this change?:

Additional documentation:

@scolapasta scolapasta added this to the 6.0 milestone Sep 7, 2023
@kcondon kcondon self-assigned this Sep 8, 2023
@kcondon
Copy link
Contributor

kcondon commented Sep 8, 2023

It does do something weird but likely not related to this bug or fix: if you download a file from the files page with custom terms enabled, it does show the terms download popup and accepting it downloads the file and the popup disappears but there is a copy of the popup in the file preview iframe, also with an accept button you can click, though it doesn't seem to do anything. Weird. I think this fix is good and the other maybe a separate bug?

OK, it appears to be as designed after testing on demo. The file preview is a download of type explore and so is also hidden by custom terms form. The download in this case is the preview. So, this works, merging/closing.

@kcondon kcondon merged commit b2ac915 into develop Sep 8, 2023
@kcondon kcondon deleted the 9825-templates-custom-terms-bug branch September 8, 2023 06:10
qqmyers added a commit to QualitativeDataRepository/dataverse that referenced this pull request Oct 13, 2023
qqmyers added a commit to QualitativeDataRepository/dataverse that referenced this pull request Oct 13, 2023
qqmyers added a commit to QualitativeDataRepository/dataverse that referenced this pull request Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trying to create dataset in collection with certain default dataset templates returns error page
3 participants