Skip to content

Regression: JavaScript error in console when opening CKEditor 5 image dialog #7117

@indigoxela

Description

@indigoxela

Description of the bug

In the console:

Uncaught TypeError: can't access property "browser", Backdrop.settings.file is undefined

Steps To Reproduce

  1. Go to node/add/post
  2. Click on image toolbar button
  3. Inspect the console log

Actual behavior

There's no field setting to check for cardinality in WYSIWYG, hence the nagging.

Upload does work.

Expected behavior

No nagging

Additional information

  • Backdrop CMS version: latest dev
  • Browser(s) and their versions: FF, probably also Chrome
  • Any WYSIWYG editor (CKE, Tiny...)

Introduced by Issue #440: Support "Multiple" attribute on file uploads.

In core/modules/file/js/file.js:

var fieldCardinality = parseInt(Backdrop.settings.file.browser.fieldCardinality);

Editors don't have "field cardinality settings". Their d&d upload is always sort of "multiple" (one by one), in the dialog the cardinality should be 1.
We probably only need some check there.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions