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

The "custom" theme no longer works #2977

Closed
tdonohue opened this issue Apr 24, 2024 · 2 comments · Fixed by #2984
Closed

The "custom" theme no longer works #2977

tdonohue opened this issue Apr 24, 2024 · 2 comments · Fixed by #2984
Assignees
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back high priority testathon Reported by a tester during Community Testathon themes
Milestone

Comments

@tdonohue
Copy link
Member

Describe the bug
Originally discovered while testing #2865 , however it's also reproducible on main.

If you attempt to run the DSpace UI with the "custom" theme. a lot of features will no longer work. Here's what the homepage looks like:

custom-theme

To Reproduce
Steps to reproduce the behavior:

  1. Enable custom theme:
    themes:
      - name: custom
    
  2. Start UI in production mode: yarn build:prod; yarn serve:ssr
  3. Access the homepage and it will look like above. The header no longer works, no ability to login or browse the site, much of the homepage content no longer displays, etc. Individual item pages are no better.
  4. Some SSR errors will also be thrown that look like this:
    ERROR TypeError: Cannot read properties of undefined (reading 'onDestroy')
    at Object.ɵɵpipe (C:\dspace-angular\dist\server\main.js:1:4326830)
    at template (C:\dspace-angular\dist\server\1210.js:1:3854)
    at executeTemplate (C:\dspace-angular\dist\server\main.js:1:4182823)
    at renderView (C:\dspace-angular\dist\server\main.js:1:4198373)
    at renderComponent (C:\dspace-angular\dist\server\main.js:1:4198106)
    at renderChildComponents (C:\dspace-angular\dist\server\main.js:1:4198794)
    at renderView (C:\dspace-angular\dist\server\main.js:1:4198836)
    at ComponentFactory.create (C:\dspace-angular\dist\server\main.js:1:4235830)
    at R3ViewContainerRef.createComponent (C:\dspace-angular\dist\server\main.js:1:4239623)
    at Object.next (C:\dspace-angular\dist\server\main.js:1:2265629)
    

Expected behavior
Obviously the custom theme should still work.

Related work
It's unclear to me when this issue began. It might be a side effect of recent Angular upgrades (#2871 or #2934 ) or something else entirely.

@artlowel
Copy link
Member

@tdonohue we can work on this

@ybnd
Copy link
Member

ybnd commented Apr 30, 2024

For future reference: @artlowel and I discussed whether we could make another custom ESLint rule to check for this sort of thing in the future:

AFAIK this is something that should be checked during compilation, and that's how it used to work before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back high priority testathon Reported by a tester during Community Testathon themes
Projects
Status: ✅ Done
3 participants