Skip to content

Turning off the cookie dialog results in a browser error message #6009

Description

@MW3000

Describe the bug

In DSpace 9.3, turning off the Orejime cookie dialog in config does correctly not show the cookie dialog but results in this browser console error message:

Orejime config error:
  - you must define `apps` to manage 4691.5f2889b84616eed0.js:1:82859
    Ie http://localhost:4000/4691.5f2889b84616eed0.js:1
    initialize http://localhost:4000/main.b16bd57a6a3e109c.js:1
    invoke http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    onInvoke http://localhost:4000/main.b16bd57a6a3e109c.js:1
    invoke http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    run http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    J http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    invokeTask http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    onInvokeTask http://localhost:4000/main.b16bd57a6a3e109c.js:1
    invokeTask http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    runTask http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    cr http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    invokeTask http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    Lt http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    _t http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1
    nr http://localhost:4000/polyfills.eb857a8d2c0a4e05.js:1

We explicitly set apps to an empty array in browser-orejime.service.ts if the popup is disabled:

if (!environment.info?.enableCookieConsentPopup) {
this.orejimeConfig.apps = [];

So perhaps it is possible to disable Orejime more thoroughly, or, we might - as a workaround - have to add a fake app here 😬?

To Reproduce

Steps to reproduce the behavior:

  1. Turn off the cookie dialog in config.yml by setting
info:
  # Whether to show the cookie consent popup and the cookie settings footer link or not.
  enableCookieConsentPopup: false
  1. Open the homepage or any other page in a browser
  2. Check the console for the above Orejime error message

Expected behavior

When turning off the cookie dialog, there should not be any error messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects: 10.xIssue impacts 10.x releasesaffects: 9.xIssue impacts 9.x releasesaffects: mainIssue impacts "main" (latest release).bughelp wantedNeeds a volunteer to claim to move forward

    Type

    Projects

    Status
    📋 To Do

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions