Fix Unsupported operand types: null + array for HTML input styling added to custom input which is not having the full_html format

Created on 4 September 2022, over 2 years ago
Updated 26 January 2023, about 2 years ago

Problem/Motivation

When using a custom input format like AceEditor as a Paragraph, the book module attempts to add a background style to the "full_html" format which doesn't exist, resulting in the following error:

TypeError: Unsupported operand types: null + array in vardoc_book_editor_js_settings_alter() (line 21 of /app/docroot/profiles/vardoc/modules/vardoc_features/vardoc_book/vardoc_book.module)

I haven't tested other scenarios, but it's a pretty straightforward issue & fix. Simply check if the array exists before trying to merge.

Steps to reproduce

  1. Install Paragraphs module
  2. Create custom input using only AceEditor
  3. Create Paragraph type using the new input
  4. add paragraph type to a entity

Proposed resolution

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Vardoc core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release vardoc-4.0.8 , vardoc-5.0.0-beta1

Vardoc update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

🐛 Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024