Skip to content

Upgrade vanilla base 7.6.5 → 7.6.7 - #1664

Closed
milanmajchrak wants to merge 1504 commits into
dtq-devfrom
upgrade/vanilla-7.6.7-sync-dtq-dev
Closed

milanmajchrak wants to merge 1504 commits into
dtq-devfrom
upgrade/vanilla-7.6.7-sync-dtq-dev

Conversation

@milanmajchrak

@milanmajchrak milanmajchrak commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

References

  • Vanilla releases DSpace 7.6.6 and 7.6.7.
  • Same upgrade as PR 1398 (against dtq-dev-767-base), with current dtq-dev merged in and a few fixes on top.
  • Needs the backend from the DSpace PR from the same branch name. Deploy both together.

Description

Moves the CLARIN-DSpace frontend from vanilla 7.6.5 to 7.6.7.

Instructions for Reviewers

List of changes in this PR:

  • c08c189833 merges the dspace-7.6.7 tag with two parents. Only the 7.6.5 to 7.6.7 changes were applied, so the next vanilla release is a normal merge.
  • yarn.lock pins sanitize-html to 2.17.5. Version 2.17.6 needs Node 22, and CI runs Node 18 and 20.
  • locale.service.ts is vanilla 7.6.7 plus one CLARIN method, getCurrentLanguageCodeSync(). The five CLARIN places that need the language synchronously use it.
  • 7.6.7 ignores the Host header and defaults ui.baseUrl to http://localhost:4000. docker/docker-compose.yml sets DSPACE_UI_BASEURL, which defaults to UI_URL.
  • The login route has no notAuthenticatedGuard, as on dtq-dev, so a logged-in user sees "You're Already Logged In" instead of a 404.
  • dtq-dev is merged in twice (db3278482c, f2c120b63f). build.yml takes the Cypress action v7.4.4 from dtq-dev.
  • 5adff1455e and e024b00f7a fix a freeze that came with 7.6.6. The locale interceptor reads the user's language through their EPerson request. When that request reloads, it waited for itself, and all other REST requests waited too. This happened after creating an EPerson, or 15 minutes after login. Root and EPerson requests now skip the EPerson language. The code and tests are the same as DSpace/dspace-angular PR 5323, which upstream backported to 8.x and 9.x but not to 7.x.

Before deploying:

  • A merge of this PR into dtq-dev redeploys dev-5. Merge it only after the BE PR is merged and its Docker build has finished.
  • Each instance's env file needs UI_URL or DSPACE_UI_BASEURL with the public UI URL, including the namespace. Without it compose stops with an error.
  • 7.6.7 changed the DSO selector placeholder from "Search for a ..." to "Search for ...". dspace-ui-tests looks for the old text, so its nightly run on dev-5 fails until the suite is updated.

How to test:

  • Log in, switch to Czech and reload. The header, licence info and static pages stay Czech.
  • Open /robots.txt. The Sitemap: line has the public URL, not localhost:4000.
  • As an admin, create an EPerson. The list shows the new user, and other pages still load. Same after 15 minutes without a reload.

Checklist

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using yarn lint
  • My PR doesn't introduce circular dependencies (verified via yarn check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

🤖 Generated with Claude Code

tdonohue and others added 30 commits September 10, 2025 16:58
…pace-7_x/sass-2e0f0fb0cc

Bump sass from 1.89.2 to 1.92.1 in the sass group
…pace-7_x/babel/runtime-7.28.4

Bump @babel/runtime from 7.28.2 to 7.28.4
…pace-7_x/core-js-3.45.1

Bump core-js from 3.44.0 to 3.45.1
When adding mappings in the item mapper we should use the save icon
rather than the trash icon!
- Track head links in a Map, because Set doesn't deduplicate them properly
- Make ServerHashedFileMapping independent of ThemeConfig
- Make theme pre-fetching configurable (e.g. only prefetch the main theme CSS, but leave route-based theme CSS lazy)
….6_CLEAN' into cache-bust-dynamic-configuration-7.6
…rough an innerHTML attribute or not to properly escape them
…icon-7x

 [Port dspace-7_x] src/app: use correct icon in item mapper
…ations

[WIP] Added czech translations to `cs.json5`
…ring

Client side rendering (CSR) ignores `nameSpace` configuration causing broken resource loading
…2284_fix-issue4500-hierarchical-browse-pagination-7_x'
Bumps [core-js](https://github.com/zloirock/core-js/tree/HEAD/packages/core-js) from 3.45.1 to 3.46.0.
- [Release notes](https://github.com/zloirock/core-js/releases)
- [Changelog](https://github.com/zloirock/core-js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zloirock/core-js/commits/v3.46.0/packages/core-js)

---
updated-dependencies:
- dependency-name: core-js
  dependency-version: 3.46.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [axios](https://github.com/axios/axios) from 1.11.0 to 1.13.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](axios/axios@v1.11.0...v1.13.1)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps the sass group with 1 update: [sass](https://github.com/sass/dart-sass).


Updates `sass` from 1.92.1 to 1.93.2
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](sass/dart-sass@1.92.1...1.93.2)

---
updated-dependencies:
- dependency-name: sass
  dependency-version: 1.93.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: sass
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [isbot](https://github.com/omrilotan/isbot) from 5.1.30 to 5.1.31.
- [Changelog](https://github.com/omrilotan/isbot/blob/main/CHANGELOG.md)
- [Commits](omrilotan/isbot@v5.1.30...v5.1.31)

---
updated-dependencies:
- dependency-name: isbot
  dependency-version: 5.1.31
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Consider the language set in the users profile when setting it on page load. Also match languages case-insensitive. Updated tests
[Port dspace-7_x] Removes references to X.509 authentication method
Use `rel="nofollow"` on Discovery search facet links to signal to
well-behaved bots that they should not crawl facets. Faceted search
results are derivative content of primary DSpace objects and cause
excessive load on the server and even exhaust your crawl budget on
crawlers like Google.

See: https://developers.google.com/search/blog/2024/12/crawling-december-faceted-nav
See: https://developers.google.com/search/docs/crawling-indexing/crawling-managing-faceted-navigation
(cherry picked from commit 0022e29)
(cherry picked from commit 1ad7804026bec3e6214f6d32ed651b7d9acc65b6)
[Port dspace-7_x] Use nofollow for Discovery search facet links
…ivate-items-issue-11569-7_x

Add noindex robots meta tag for non-discoverable items (7_x)
(cherry picked from commit 8ad6197)
[Port dspace-7_x] Fix 'sync-i18n' script source file access
FrancescoMolinaro and others added 25 commits May 19, 2026 11:57
[Port dspace-7_x] Fix DSpace#5672: resolve health check issue with response handling
Bumps the testing group with 1 update: [axe-core](https://github.com/dequelabs/axe-core).


Updates `axe-core` from 4.11.3 to 4.11.4
- [Release notes](https://github.com/dequelabs/axe-core/releases)
- [Changelog](https://github.com/dequelabs/axe-core/blob/develop/CHANGELOG.md)
- [Commits](dequelabs/axe-core@v4.11.3...v4.11.4)

---
updated-dependencies:
- dependency-name: axe-core
  dependency-version: 4.11.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: testing
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps the postcss group with 1 update: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.5.12 to 8.5.14
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.5.12...8.5.14)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.14
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: postcss
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [sanitize-html](https://github.com/apostrophecms/apostrophe/tree/HEAD/packages/sanitize-html) from 2.17.3 to 2.17.4.
- [Changelog](https://github.com/apostrophecms/apostrophe/blob/main/packages/sanitize-html/CHANGELOG.md)
- [Commits](https://github.com/apostrophecms/apostrophe/commits/HEAD/packages/sanitize-html)

---
updated-dependencies:
- dependency-name: sanitize-html
  dependency-version: 2.17.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [express](https://github.com/expressjs/express) from 4.22.1 to 4.22.2.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/v4.22.2/History.md)
- [Commits](expressjs/express@v4.22.1...v4.22.2)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 4.22.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…y while maintaining 'DELETE' display in UI through getActionDisplayLabel() method. Updated form dropdown to show 'DELETE' label. Added unit tests for action display label handling.
…-7_x

[Port dspace-7_x] :Backport change DELETE to OBSOLETE (DELETE) and update view table (DSpace#4484)
[Port dspace-7_x] Fix browse-by pages sending unnecessary request to author index
…pace-7_x/express-4.22.2

Bump express from 4.22.1 to 4.22.2
…pace-7_x/postcss-06160b2e2d

Bump postcss from 8.5.12 to 8.5.14 in the postcss group
…pace-7_x/sanitize-html-2.17.4

Bump sanitize-html from 2.17.3 to 2.17.4
…pace-7_x/testing-a398129e23

Bump axe-core from 4.11.3 to 4.11.4 in the testing group
Applies the dspace-angular 7.6.5->7.6.7 delta onto the CLARIN fork dtq-dev
(head ac78637, incl. #1392) as a two-parent merge with merge-base dspace-7.6.5.
Resolves the 29 conflicting files per the section-4.2 recipes; regenerates
yarn.lock with classic Yarn 1.22 (v1; direct axios dropped, node-html-parser
added, ngx-mask pinned 13.1.15).

Out-of-marker / build-caught fixups (vanilla API changes breaking CLARIN callers):
- locale.service: vanilla changed getCurrentLanguageCode() to Observable<string>;
  reverted it (and setCurrentLanguageCode) to fork's sync string form while keeping
  vanilla's getLanguageCodeList(ignoreEPersonSettings) param (used by the interceptor).
- license-contract-page: getAuthorizedCollection gained a searchHref param -> pass
  'findSubmitAuthorized' (the fork's previous hardcoded value).

Validation: build:prod (SSR) OK, lint clean, check-circ-deps clean, frozen-lockfile no-op.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- yarn.lock: sanitize-html 2.17.6 -> 2.17.4 (2.17.6 requires node >=22.12, CI runs 18/20)
  Also drops the orphaned htmlparser2@12 subgraph (htmlparser2, domelementtype,
  domhandler, domutils, entities, dom-serializer) that only 2.17.6 pulled in;
  htmlparser2 key restored to vanilla form "^10.1, ^10.1.0". package.json unchanged.
- locale.service.spec.ts + locale.interceptor.spec.ts: align with sync getCurrentLanguageCode
  (7 TS2345 errors made the whole karma bundle fail to load, so no test ran at all)
- locale.service.ts: drop now-dead subs/ngOnDestroy/OnDestroy left over by the sync revert

Validated on node 20.19.0: install/frozen-lockfile/lint/circ-deps/build:prod/test:headless
(5488 tests SUCCESS, 0 failed). frozen-lockfile engines gate additionally re-verified
on node 18.20.4 (both CI matrix legs).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2.17.4 was the wrong stopping point. The reason for not taking 2.17.6 is its
engines.node >=22.12.0 (CI runs 18.x and 20.x) - but 2.17.5 has no engines field
at all and still depends on htmlparser2 ^10.1.0, the version already hoisted in
this lockfile, so it was available at no cost and was overlooked.

2.17.5 carries real XSS hardening that has no GHSA advisory, so "no advisory is
patched in 2.17.5" was not a sound safety argument:
- allowedSchemesAppliedToAttributes grows from 3 to 20 entries, so a javascript:
  URL in formaction, action, data, xlink:href, poster and 12 others is now
  scheme-checked; 2.17.4 let those through
- the srcset check is extended to imagesrcset
- tagAllowed() guards are added to the raw-text passthrough branches, which is
  the code path of the critical GHSA-rpr9-rxv7-x643

Verified: yarn install resolves 2.17.5, htmlparser2 stays 10.1.0, no engines error
on node 20.19.0, --frozen-lockfile is "Already up-to-date", lint clean,
test:headless TOTAL: 5488 SUCCESS. The only source that uses sanitize-html is
markdown.pipe.ts; none of the 17 newly scheme-checked attributes appear in its
MathJax allowlist, and MathJax SVG output is byte-identical between 2.17.4 and
2.17.5. 2.17.6 remains blocked on the node bump.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
7.6.7 stopped deriving `ui.baseUrl` from DSPACE_UI_HOST/PORT/SSL and hardcoded
`http://localhost:4000` instead, so those vars are now silently ignored for this
purpose. Legacy `/bitstream/handle/...` redirects and the robots.txt Sitemap would
point at localhost with no error in the log.

`docker/docker-compose.yml` now requires DSPACE_UI_BASEURL with no default, so a
deploy that forgets it fails loudly. It has to be added to each instance's env file
(deploy.yml passes `--env-file /opt/dspace-envs/...`). CI is unaffected -
docker-compose-ci.yml has no dspace-angular service.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…UI_URL

Two problems an independent review found in the previous two commits.

**D7 was not implemented as decided.** The instruction was to prefer vanilla unless
it breaks CLARIN functionality. `locale.service.ts` on the base branch is byte-identical
to `dspace-7.6.5`, i.e. the fork never customised it and a 3-way merge could not have
conflicted - yet the head carried a third blob with 7.6.5's logic. That silently dropped
vanilla's language-detection fix: the full Accept-Language q-list scan, case-insensitive
matching (`DE` and `en-GB` fell through to defaultLanguage), and "don't write an
auto-detected language to the cookie". Worse, the specs had been rewritten to assert the
old behaviour and vanilla's case-insensitivity test deleted, so green CI proved nothing.

`locale.service.ts`, `locale.service.spec.ts` and `locale.interceptor.spec.ts` are now
byte-identical to `dspace-7.6.7` again (verified with `git diff --numstat`).

The reason for the original revert was real: five CLARIN call sites are synchronous
template getters, and vanilla's `getCurrentLanguageCode()` has to be an Observable because
`getLanguageCodeList()` depends on the auth state. But those call sites do not want language
*negotiation* - they want the language the UI is currently rendering in. So they now use a
new, additive `getCurrentLanguageCodeSync()`, and vanilla's method is untouched. The CLARIN
test lives in a separate `locale.service.clarin.spec.ts` so the upstream spec stays
byte-identical and does not re-conflict on the next merge.

**`DSPACE_UI_BASEURL` ignored an existing convention and would have bricked every deploy.**
`UI_URL` is already defined in `build-scripts/run/envs/*` and already feeds the backend's
`dspace.ui.url` via `docker-compose-rest.yml` and `cli.yml` - the same value `ui.baseUrl` is
documented to hold. Requiring a brand-new variable with no default meant `start.sh`,
`deploy.yml` and every documented `docker/README.md` recipe would abort, and an override
compose file cannot rescue it because compose interpolates per file before merging.

`DSPACE_UI_BASEURL` now defaults to `UI_URL` and only fails when neither is set. Verified:

    envs/.default (UI_URL only)  -> DSPACE_UI_BASEURL: http://dev-5.pc
    neither set                  -> error: required variable UI_URL is missing a value
    DSPACE_UI_BASEURL explicit   -> wins over UI_URL

`envs/.local` gained `UI_URL`; `docker/README.md` now carries the requirement next to the
recipes that need it. Two corrections to the earlier rationale: the blast radius also
includes the Google Scholar `citation_pdf_url` / `citation_abstract_html_url` meta tags, and
the pre-upgrade derived value was `http://dspace-angular:4000/`, not a working public URL -
so this fixes a long-standing wrong value rather than a regression the upgrade introduced.
The namespace caveat is now documented: `DSPACE_UI_NAMESPACE` must match the path in the URL
or the legacy-bitstream redirect drops the prefix.

Tests: locale specs 21 SUCCESS (16 upstream incl. the restored case-insensitivity test, plus
5 new), header/clarin-license-info/html-content specs 9 SUCCESS, lint clean on all changed
files.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Vanilla 7.6.7 put notAuthenticatedGuard on the login route. A logged-in
user then gets a 404 instead of the "Already Logged In" panel that
dtq-dev shows. The guard stays on the register and forgot password
routes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
build.yml: took dtq-dev's cypress-io/github-action v7.4.4 with
Chrome for Testing. The upgrade's DSPACE_UI_BASEURL env stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rest of build.yml already uses v7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…6.7-sync-dtq-dev

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
milanmajchrak and others added 2 commits October 27, 2026 17:16
Since 7.6.7 the locale interceptor reads the logged in user's language through an EPerson request. When that request goes stale (after creating an EPerson, or when the cache expires after 15 minutes), its reload passes the same interceptor and waits for itself. All other REST requests then wait too and the UI stops loading data. EPerson requests now skip the EPerson language, like the root request already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DSpace/dspace-angular PR 5323 fixed the same freeze in main and was
backported to 8.x and 9.x, not to 7.x. Using the same code and tests
keeps later vanilla merges free of conflicts. The spec also resets the
spy calls, so each test only sees its own request.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milanmajchrak

Copy link
Copy Markdown
Collaborator Author

Not going into dtq-dev. The 7.6.7 upgrade lives in its own branch dtq-dev-767-base, which now points to e024b00 (the head of this PR).

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.