Deprecated: Breakdance\Util\Timing\start(): Implicitly marking parameter $desc as nullable is deprecated, the explicit nullable type must be used instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/breakdance/plugin/util/timing.php on line 11

Deprecated: Breakdance\AJAX\BreakdanceAjaxHandlerException::__construct(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/breakdance/plugin/ajax/api.php on line 244

Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/xmlrpc.php on line 216

Deprecated: Non-canonical cast (boolean) is deprecated, use the (bool) cast instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/xmlrpc.php on line 235

Deprecated: Non-canonical cast (double) is deprecated, use the (float) cast instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/wordfence/lib/wfConfig.php on line 1799

Deprecated: Non-canonical cast (binary) is deprecated, use the (string) cast instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/wordfence/lib/wfMD5BloomFilter.php on line 79

Deprecated: Case statements followed by a semicolon (;) are deprecated, use a colon (:) instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/wordfence/modules/login-security/classes/controller/settings.php on line 284

Deprecated: Breakdance\Lib\Vendor\Twig\Environment::getTemplateClass(): Implicitly marking parameter $index as nullable is deprecated, the explicit nullable type must be used instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/breakdance/plugin/lib/mozart-scoped-psr4/Twig/Environment.php on line 262

Deprecated: Breakdance\Lib\Vendor\Twig\Environment::loadTemplate(): Implicitly marking parameter $index as nullable is deprecated, the explicit nullable type must be used instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/breakdance/plugin/lib/mozart-scoped-psr4/Twig/Environment.php on line 330

Deprecated: Breakdance\Lib\Vendor\Twig\Environment::createTemplate(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/breakdance/plugin/lib/mozart-scoped-psr4/Twig/Environment.php on line 386
Magento 2 – Disabling CSP in 2.4.6-p6+ – XB23.net

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/breakdance/plugin/lib/mozart-scoped-psr4/Twig/Extension/CoreExtension.php on line 1447

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /home/xb23/htdocs/www.xb23.net/wp-content/plugins/breakdance/plugin/lib/mozart-scoped-psr4/Twig/Extension/CoreExtension.php on line 1447

Magento 2 – Disabling CSP in 2.4.6-p6+

As of version 2.4.6-p6+ Magento 2 now puts pages that contain payment information into enforced CSP mode, before it was in Report-Only mode. Now the change is good but it does break things, here is how you can temporarily put them back into reporting mode and allowing inline scripts.

Add this into the env.php file

'system' => [
            'default' => [
                'csp' => [
                   'mode' => [
                      'storefront_checkout_index_index' => [
                         'report_only' => '1'
                      ],
                      'admin_sales_order_create_index' => [
                        'report_only' => '1'
                      ]
                   ],
                   'policies' => [
                      'storefront_checkout_index_index' => [
                        'scripts' => [
                            'inline' => '1'
                        ]
                      ],
                      'admin_sales_order_create_index' => [
                        'scripts' => [
                            'inline' => '1'
                        ]
                      ]
                   ]
                ]
            ]
        ]

Then in terminal run this:

bin/magento app:config:import

And voila! – Everything will now be working again.

    Leave a Reply

    Your email address will not be published. Required fields are marked *