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

ItemPageCcLicenseFieldComponent wrongly assumes that any license in dc.rights is a CC license #3170

Open
abelgomez opened this issue Jul 6, 2024 · 6 comments · May be fixed by #3338
Open
Assignees
Labels
affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug integration: Creative Commons Related to CC license

Comments

@abelgomez
Copy link
Contributor

Describe the bug

The ItemPageCcLicenseFieldComponent, which is rendered for any untyped item, wrongly assumes that any value in dc.rights is a valid CC license.

To Reproduce

Create an untyped item, set dc.rights and dc.rights.uri, and see a section in the item with the title "Creative Commons license".

imagen
imagen

Expected behavior

The title of the license section should only mention Creative Commons if dc.rights is a valid CC license.

I think that ItemPageCcLicenseFieldComponent should be renamed to ItemPageLicenseFieldComponent. If dc.rights.uri points to a valid CC license, it should work as the current ItemPageCcLicenseFieldComponent. If dc.rights/dc.rights.uri have other type of license, the component should render the license text as specified in dc.rights.

Related work

This should be considered before implementing #3167.

@abelgomez abelgomez added bug needs triage New issue needs triage and/or scheduling labels Jul 6, 2024
@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward integration: Creative Commons Related to CC license affects: 8.x Issue impacts 8.x releases affects: 7.x Issue impacts 7.x releases and removed needs triage New issue needs triage and/or scheduling labels Jul 9, 2024
@amgciadev
Copy link
Contributor

We have encountered this too and we solve it by simply amending the label: "item.page.cc.license.title": "Rights and licensing". Happy to submit a PR. Label item.page.cc.license.title could also be renamed to: item.page.license.title to be more generic?

@abelgomez
Copy link
Contributor Author

@amgciadev that would serve too.

However, I think that changing the label can be a temporary solution that can be applied on a use-case basis to specific installations (using the translation files) until the underlying issue is solved. That is: the component's name (and label key) are misleading since it does not do any check about the CC license.

I think that refactoring the ItemPageCcLicenseFieldComponent is the way to go. However, that would be a breaking change. Is that acceptable, @tdonohue ?

I'm also happy to submit a PR with the refactoring (in fact, it's in my to-do list together with some other open issues), but I'm a bit busy these days, and that would have to wait a few weeks.

Cheers!

@tdonohue
Copy link
Member

tdonohue commented Sep 4, 2024

@abelgomez : I'm not against a refactor here to try to determine if a license is actually a CC license before displaying it as such. As long as it doesn't break existing sites which use dc.rights to store CC License (and I don't think it should), then it could be backported to 7.x and 8.x.

I'll assign this to you @abelgomez since it sounds like you want to claim it (to do in a few weeks time).

@tdonohue tdonohue removed the help wanted Needs a volunteer to claim to move forward label Sep 4, 2024
@abelgomez
Copy link
Contributor Author

Hi @tdonohue , it won't break existing sites using the default template, but it may break existing sites with modifications or custom templates relying on the ItemPageCcLicenseFieldComponent since we don't know how developers have used it.

But I think it can be done with minimal impact, and in any case this kind of breaking changes are not rare (e.g., the migration to "standalone" components between Dspace 7 and 8 has been quite painful for me 😊).

We can address in this upcoming PR the related issue #3167.

abelgomez added a commit to sistedes/dspace.ui that referenced this issue Sep 20, 2024
@abelgomez abelgomez linked a pull request Sep 20, 2024 that will close this issue
12 tasks
@abelgomez
Copy link
Contributor Author

abelgomez commented Sep 20, 2024

Hi @tdonohue ,

I have started to work on this in #3338, and I'm near to have a proposal to fix this issue. Nevertheless, I'm still drafting the PR and the documentation.

In the meantime, I have a question: I started this work in the 8_x branch (since it was marked as in project DSpace 8.x and 7.6.x Maintenance.

Should I create the PR against the main branch instead?

@tdonohue
Copy link
Member

@abelgomez : Yes, I'd recommend PRs almost always be created against main. The only exception is when the code changes do not affect the main branch. So, please do update your PR to be against main.

abelgomez added a commit to sistedes/dspace.ui that referenced this issue Sep 20, 2024
abelgomez added a commit to sistedes/dspace.ui that referenced this issue Oct 21, 2024
abelgomez added a commit to sistedes/dspace.ui that referenced this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug integration: Creative Commons Related to CC license
Projects
Status: 🏗 In Progress
Development

Successfully merging a pull request may close this issue.

3 participants