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
Bug: theme matching by handle doesn't work, but uuid does #2348
Comments
I tried the same with this config, and it worked (I also had to uncomment the themes:
- name: custom
extends: dspace
handle: '123456789/2'
- name: dspace Could you maybe go over these steps and check that your theme is correctly set up |
@alexandrevryghem I believe it's setup correctly? The copy of I made the repo public incase it would be easier to see where I might have messed up |
@misilot sorry for the late response I was on vacation. Can you try rebasing/merging your branch with the branch from the linked PR and check that both issues are now resolved? |
@alexandrevryghem I was trying to apply this to the 7.6 branch I have, but it doesn't apply cleanly.
is what |
I just tried merging in git merge themed-component-fixes-main
Merge made by the 'ort' strategy.
src/app/shared/theme-support/themed.component.ts | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-) |
Thanks @alexandrevryghem so - name: etdr
extends: krex
uuid: '6d684812-6d29-4564-8b51-f5670957936b' appears to work, but not - name: etdr
extends: krex
handle: '2097/4' However, the duplicating theme element issue did go away! |
@misilot I couldn't reproduce this error. I tried with both dynamically created components like |
So I'm trying to add these additional metadata specific components to specific communities (the etdr theme) If I use in my config.yml file themes:
# Specific Item
# - name: etdr
# extends: krex
# handle: '2097/43295'
- name: etdr
extends: krex
handle: '2097/4'
# default theme, based on DSpace
- name: krex
headTags:
# Insert <link rel="icon" href="assets/krex/images/favicons/favicon.ico" sizes="any"/> into the <head> of the page.
- tagName: link
attributes:
rel: icon
href: assets/krex/images/favicons/favicon.ico
sizes: any I get the following results (not working) However if I use themes:
- name: etdr
extends: krex
uuid: '6d684812-6d29-4564-8b51-f5670957936b'
# default theme, based on DSpace
- name: krex
headTags:
# Insert <link rel="icon" href="assets/krex/images/favicons/favicon.ico" sizes="any"/> into the <head> of the page.
- tagName: link
attributes:
rel: icon
href: assets/krex/images/favicons/favicon.ico
sizes: any It does work as expected. (The duplicative collections was me, since I was trying to prove something was working when I started down customizing it) |
@misilot I used your branch again to test it and I'm still not able to reproduce the error, I asked a colleague (@nona-luypaert) to also test it on your branch to be sure I didn't miss anything and she also wasn't able to reproduce your error. Have you already tried running |
@alexandrevryghem I ran |
Have you also tried running it locally using |
I don't have yarn on the local system. Let me try applying the changes on
our test system and see what it does with built assets and pm2
…On Tue, Aug 1, 2023 at 9:51 AM Alexandre Vryghem ***@***.***> wrote:
Have you also tried running it locally using yarn start:dev/yarn
start:prod, maybe it's docker related?
—
Reply to this email directly, view it on GitHub
<#2348 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALBHSGYG6MCVIUZWEQLDPTXTEJX3ANCNFSM6AAAAAAZ2AQQYU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@alexandrevryghem So I did the following
|
I confirm that matching by handle in DSpace 7.6 doesn't work for me either. |
Hey @alanorth, are you able to reproduce it on the |
I'm using pm2 (I don't remember if I said that before)
…On Thu, Sep 28, 2023 at 3:13 PM Alexandre Vryghem ***@***.***> wrote:
Hey @alanorth <https://github.com/alanorth>, are you able to reproduce it
on the main branch or were you only able to reproduce it in your project?
And if you were able to reproduce it on main, how do you run your dspace
with yarn start:dev/yarn start:prod or with pm2? Because I wasn't able to
reproduce it 😅
—
Reply to this email directly, view it on GitHub
<#2348 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALBHSHXCAA4DH5RDZ7S7OLX4XK6VANCNFSM6AAAAAAZ2AQQYU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, I was testing via |
@alanorth could you maybe give me your |
@alexandrevryghem I was working on DSpace 7.6, not https://gist.github.com/alanorth/4d6e9a1db7a09567fd588d47ec34d8f9 |
Good news, I was able to reproduce the error locally. The error only happens for clients who change their |
@alexandrevryghem glad that might fix the issue, but not sure it is the case since we access the url's like Our |
The handle that is used to find the correct theme isn't the one from the url, but the one in the metadata of the Community/Collection/Item. So in your case that regex will try to retrieve the handle from the url |
Hey @misilot, I apologize for the delay in finishing the PR, but my last few weeks have been quite busy 😅, but I was able to finish it today could you maybe take a look and check if it fixes your issue? |
Thank you for fixing this @alexandrevryghem! |
Modified the identifiers used to associated a community with an institutional theme from handle identifiers to UUIDs. This is a workaround for the the stock DSpace bug described in DSpace/dspace-angular#2348 in which handles may not be properly parsed. The stock DSpace bug is expected to be fixed in a 7.6.x update, so simply commenting out the handles so that can be easily restored when the bug is fixed. Updated the "CommunityThemes.md" documentation to use UUID instead of handle identifiers. https://umd-dit.atlassian.net/browse/LIBCIR-372
Describe the bug
Matching on a collection handle does not appear to work for a collection, but using a UUID does work (except for the duplicated elements #2346)
To Reproduce
Steps to reproduce the behavior:
This works though
Expected behavior
Theming should be applied to the collection items when using the handle, or the uuid.
Related work
The text was updated successfully, but these errors were encountered: