Warning: Undefined array keys header/footer in Drupal\ckeditor5_premium_features_export_word\Plugin\CKEditor5Plugin\ExportWord->convertConfigOptionsFormatToV2()

Created on 17 January 2025, 3 months ago

Problem/Motivation

Saving empty converter options for the header and/or footer (admin/config/ckeditor5-premium-features/export-word) will lead to these warnings:

Warning: Undefined array key "header" in Drupal\ckeditor5_premium_features_export_word\Plugin\CKEditor5Plugin\ExportWord->convertConfigOptionsFormatToV2() (line 180 of modules/contrib/ckeditor5_premium_features/modules/ckeditor5_premium_features_export_word/src/Plugin/CKEditor5Plugin/ExportWord.php).
Warning: Undefined array key "footer" in Drupal\ckeditor5_premium_features_export_word\Plugin\CKEditor5Plugin\ExportWord->convertConfigOptionsFormatToV2() (line 183 of modules/contrib/ckeditor5_premium_features/modules/ckeditor5_premium_features_export_word/src/Plugin/CKEditor5Plugin/ExportWord.php).

Steps to reproduce

1. Add export to word plugin in your format settings.
2. Save export settings here - admin/config/ckeditor5-premium-features/export-word with empty header and/or footer configurations.
3. Go to the content creation/edit form where the format from step 1 is used and see the warnings.

Proposed resolution

Fix the issue in the code by adjusting the check for header/footer configurations, like adding isset check

πŸ› Bug report
Status

Active

Version

1.3

Component

Plugin: Export to Word

Created by

πŸ‡ΊπŸ‡¦Ukraine quadrexdev Lutsk

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024