Skip to content

Remove error message "Uncaught fieldName not defined in message" in Browser console #74

@sypets

Description

@sypets

Summary / Description

In the developer tools of the browser, the error message "Uncaught fieldName not defined in message" (in file paste-reference.js line no 215) is displayed. This occurs in the TYPO3 backend.

Image

code (in version 3.0.2):

214 if (typeof evt.data.fieldName === 'undefined') {
215       throw 'fieldName not defined in message';
216 }

in latest version of main, this is line:240

Version

  • paste_reference: 3.0.2
  • TYPO3 12.4.25
  • PHP 8.2

Steps to reproduce

  1. Go to TYPO3 Backend
  2. Open Developer Tools (e.g. F12 in Firefox or Chrome)
  3. switch to tab "Console"
  4. in page module, reload a page (can be empty, can contain textmedia elements)
  5. Check to see if there are messages in the Console

Expected behaviour

In normal behaviour, I would not expect these messages to occur. It clutters up the console when you are testing something else.

Actual behavior

Several error messages are shown

Additional

Possible fix

I don't know why the fieldName is not set here, but if we are listening for a "message", perhaps they don't always have data.fieldname. I would gracefully exit in that case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions