Gernott / mask

TYPO3 Extension Mask
https://www.facebook.com/typo3mask
GNU General Public License v2.0
130 stars 86 forks source link

PHP Warning: Undefined array key "imageoverlayPalette" - after migrating mask config some versions #626

Closed nitori closed 8 months ago

nitori commented 8 months ago

As it's a warning it only really appears when debug mode is on.

This appears to happen when you try to open a Mask Element in the Mask backend module after migrating it to the current version.

A simple Mask element from TYPO3 9 that uses the core "image" field triggers that warning. image

Here is a sample mask.json I exported from a TYPO3 9 version:

{
  "tt_content": {
    "elements": {
      "test_image": {
        "color": "#000000",
        "columns": [
          "image"
        ],
        "description": "",
        "icon": "",
        "key": "test_image",
        "label": "Test image",
        "labels": [
          "Test Image"
        ],
        "shortLabel": ""
      }
    }
  }
}

The exact steps are:

  1. use TYPO3 12
  2. Enable debug mode
  3. Configure to use the old mask.json above
  4. Go to Mask Backend module
  5. click the blue popup to migrate
  6. Open the element in Mask backend module, and you should notice that no fields are listed - the error appears in an ajax request and should be visible in the console.

Naturally this can be avoided by just using live mode instead, and the fields will be listed properly.

Greetings Nitori

nhovratov commented 8 months ago

@nitori Thanks Lars for the detailed bug report. Seems like I mistakenly removed the fallback when I migrated to the object structure back then.