Skip to content

error warning it site editor with duotones #50200

@tkapler

Description

@tkapler

Description

I do have custom duotones in theme.json, they work fine

this is the definition btw

            "duotone": [
                {
                    "name": "DT Powerbox 200 to 300",
                    "slug": "dt-powerbox-200-300",
                    "colors": [
                        "var(--wp--preset--color--powerbox-200)",
                        "var(--wp--preset--color--powerbox-300)"
                    ]
                },
                {
                    "name": "DT Powerbox 700 to 800",
                    "slug": "dt-powerbox-700-800",
                    "colors": [
                        "var(--wp--preset--color--powerbox-700)",
                        "var(--wp--preset--color--powerbox-800)"
                    ]
                }
			],

But when i do use gutenberg plugin and having debug=true theese errors popup when I open Site Editor:

Warning: Trying to access array offset on value of type null in /var/www/vhosts/powerbox.one/httpdocs/wp-content/plugins/gutenberg/lib/block-supports/duotone.php on line 344

Warning: Trying to access array offset on value of type null in /var/www/vhosts/powerbox.one/httpdocs/wp-content/plugins/gutenberg/lib/block-supports/duotone.php on line 345

  | Warning: Trying to access array offset on value of type null in /var/www/vhosts/powerbox.one/httpdocs/wp-content/plugins/gutenberg/lib/block-supports/duotone.php on line 346

  | Warning: Trying to access array offset on value of type null in /var/www/vhosts/powerbox.one/httpdocs/wp-content/plugins/gutenberg/lib/block-supports/duotone.php on line 347

Step-by-step reproduction instructions

debug = true
set up duotones in theme.json
enable gutenberg plugin
go to site editor

Screenshots, screen recording, code snippet

No response

Environment info

latest versions of guenberg and wordpress

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

Labels

Global StylesAnything related to the broader Global Styles efforts, including Styles Engine and theme.json[Feature] ColorsColor management[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions