Skip to content

Comments

prevent page from blowing up if no remind msg in bundle #7975#7985

Merged
kcondon merged 2 commits intodevelopfrom
7975-remind
Jul 6, 2021
Merged

prevent page from blowing up if no remind msg in bundle #7975#7985
kcondon merged 2 commits intodevelopfrom
7975-remind

Conversation

@pdurbin
Copy link
Member

@pdurbin pdurbin commented Jun 30, 2021

What this PR does / why we need it:

If the "remind" bundle strings add in PR #7707 and then tweaked in PR #7734 are missing (as could happen when Bundle files from a translation haven't been updated), the page blows up (hangs with a NullPointerException due to a null being used with a .concat operation) when you try to create a dataset or edit the draft.

The solution in this PR is to omit the "remind" message, show the user the old, shorter message, and log to server.log a message that reads "Unable to get reminder string from bundle. Returning empty string."

Which issue(s) this PR closes:

Closes #7975

Special notes for your reviewer:

This seems easier that writing our own version of .concat with null checking.

Suggestions on how to test this:

Create and edit datasets with users that do and don't have the ability to publish. Here are the messages to remove from Bundle.properties during testing:

  • dataset.message.publish.remind.draft=If it's ready for sharing, please publish it.
  • dataset.message.submit.remind.draft=If it's ready for sharing, please submit it for review.
  • dataset.message.publish.remind.version=If it's ready for sharing, please publish it so that others can see these changes.
  • dataset.message.submit.remind.version=If it's ready for sharing, please submit it for review so that others can see these changes.

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

Yes, a slight change. If the installation of Dataverse is missing the "remind" strings in the Bundle, instead of the full message in green below, the reminder ("If it's ready...") will be omitted.

Screen Shot 2021-06-30 at 1 11 50 PM

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

No. Just a bug fix.

Additional documentation:

No.

@coveralls
Copy link

coveralls commented Jun 30, 2021

Coverage Status

Coverage decreased (-0.001%) to 19.314% when pulling 6428c34 on 7975-remind into 9d4ca5a on develop.

Copy link
Contributor

@sekmiller sekmiller left a comment

Choose a reason for hiding this comment

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

Looks good. thanks.

@kcondon kcondon self-assigned this Jul 6, 2021
@kcondon kcondon merged commit 7161f5d into develop Jul 6, 2021
@kcondon kcondon deleted the 7975-remind branch July 6, 2021 18:05
@djbrooke djbrooke added this to the 5.6 milestone Jul 8, 2021
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.

Language Support: Newly added save status message support method throws error, fails if new strings not in bundle.

5 participants