Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

LegacyTemplate: add_alignment_class_to_wrapper first parameter cant be NULL #7030

Open
4 of 5 tasks
RedmattersBV opened this issue Aug 10, 2022 · 5 comments
Open
4 of 5 tasks

Comments

@RedmattersBV
Copy link

RedmattersBV commented Aug 10, 2022

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

When you have added filter render_block in your own template, the add_alignment_class_to_wrapper filter which is also added to render_block is giving back an error because of type casting of first parameter to string.

Expected behavior

No error given

Actual behavior

Gives back error that first parameter must be of the type string, null given

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Automattic\WooCommerce\Blocks\BlockTypes\LegacyTemplate::add_alignment_class_to_wrapper() must be of the type string, null given, called in /wp-includes/class-wp-hook.php on line 309 and defined in /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/LegacyTemplate.php:215 Stack trace: #0 /wp-includes/class-wp-hook.php(309): Automattic\WooCommerce\Blocks\BlockTypes\LegacyTemplate->add_alignment_class_to_wrapper(NULL, Array) woocommerce/woocommerce#1 /Users/renetuin/Documents/repos/redpress-v2/wp-includes/plugin.php(189): WP_Hook->apply_filters(NULL, Array) woocommerce/woocommerce#2 /wp-includes/class-wp-block.php(284): apply_filters('render_block', '\n\n', Array, Object(WP_Block)) woocommerce/woocommerce#3 /wp-includes/blocks.php(883): WP_Block->render() woocommerce/woocommerce#4 /wp- in /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/LegacyTemplate.php on line 215

Steps to reproduce

  1. add add_filter('render_block', function($block_content, $block) { return $block_content; }, 10, 2); to functions.php of your theme
  2. Error occurs

WordPress Environment

`

WordPress Environment

WordPress address (URL): http://thunderz.def:8888
Site address (URL): http://thunderz.def:8888
WC Version: 6.7.0
REST API Version: ✔ 6.7.0
WC Blocks Version: ✔ 7.8.3
Action Scheduler Version: ✔ 3.4.0
Log Directory Writable: ✔
WP Version: 6.0.1
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: nl_NL
External object cache: –

Server Environment

Server Info: nginx/1.19.2
PHP Version: 7.4.21
PHP Post Max Size: 200 MB
PHP Time Limit: 30
PHP Max Input Vars: 1000
cURL Version: 7.68.0
OpenSSL/1.0.2u

SUHOSIN Installed: –
MySQL Version: 5.7.34
Max Upload Size: 200 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 6.7.0
WC Database Prefix: wp_
Totale database grootte: 5.15MB
Database gegevens grootte: 3.10MB
Database index grootte: 2.05MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_gla_budget_recommendations: Data: 0.22MB + Index: 0.14MB + Engine InnoDB
wp_gla_merchant_issues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_gla_shipping_rates: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_gla_shipping_times: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_mollie_pending_payment: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_options: Data: 1.08MB + Index: 0.06MB + Engine InnoDB
wp_postmeta: Data: 0.11MB + Index: 0.03MB + Engine InnoDB
wp_posts: Data: 0.41MB + Index: 0.09MB + Engine InnoDB
wp_realmedialibrary: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_realmedialibrary_meta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_realmedialibrary_posts: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_realmedialibrary_tmp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_usermeta: Data: 0.03MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_attributes_lookup: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_download_directories: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_wc_rate_limits: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_yoast_indexable: Data: 0.14MB + Index: 0.16MB + Engine InnoDB
wp_yoast_indexable_hierarchy: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_yoast_migrations: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_yoast_primary_term: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_yoast_seo_links: Data: 0.02MB + Index: 0.03MB + Engine InnoDB

Post Type Counts

acf-field: 397
acf-field-group: 44
attachment: 10
nav_menu_item: 8
page: 7
post: 5
product: 2
product_variation: 2
revision: 7
wp_global_styles: 2

Security

Secure connection (HTTPS): ❌
Je winkel gebruikt geen HTTPS. Leer meer over HTTPS en SSL-certificaten.
Hide errors from visitors: ✔

Active Plugins (15)

Advanced Custom Fields: Background-position: door Redmatters – 1.0.0
ACF Content Analysis voor Yoast SEO: door Thomas Kräftner
ViktorFroberg
marol87
pekz0r
angrycreative
Team Yoast – 3.0.1

Advanced Custom Fields: Iconlist: door Redmatters – 1.0.0
Advanced Custom Fields PRO: door Delicious Brains – 5.12.3
Akismet Anti-Spam: door Automattic – 5.0
Mollie-betalingen voor WooCommerce: door Mollie – 7.3.0
Real Media Library (Free): door devowl.io – 4.18.10
Regenerate Thumbnails: door Alex Mills (Viper007Bond) – 3.1.5
Safe SVG: door 10up – 2.0.2
Toolbar Publish Button: door wpUXsolutions – 1.8
Warpdrive: door Savvii – 2.10.7
WC Variations Radio Buttons: door 8manos – 2.0.5
WooCommerce: door Automattic – 6.7.0 (update naar versie 6.8.0 is beschikbaar)
Yoast SEO: door Team Yoast – 19.5.1
WPS Hide Login: door WPServeur
NicolasKulka
wpformation – 1.9.6

Inactive Plugins (74)

Above & Below Admin Tables: door Robin Metcalfe – 0.0.0
ACF Input Counter: door John A. Huebner II – 1.5
Address correction autocomplete for Woo: door SAHU MEDIA ® – 1.1
Advanced Custom Fields: Advanced Taxonomy Selector: door Daniel Pataki – 3.1.0
Advanced Custom Fields: Gravityforms Add-on: door Say Hello GmbH – 1.3.4
Advanced Custom Fields: Ninjaforms Add-on: door Danny van Holten – 1.1
Advanced Custom Fields: Price: door Maciej Czerpiński – 1.2.1
Advanced Custom Fields: Taxonomy Chooser: door Marktime Media – 1.2
Advanced Custom Fields: Theme Code Pro: door hookturn – 2.3.0
Advanced Order Export For WooCommerce: door AlgolPlus – 3.3.2
Age Gate: door Phil Baker – 2.21.0
AMP: door AMP Project Contributors – 2.3.0
Autoptimize: door Frank Goossens (futtta) – 3.1.0
Classic Editor: door WordPress Contributors – 1.6.2
Duplicate Page: door mndpsingh287 – 4.4.9
Export WordPress Menus: door Tyche Softwares – 1.2
Facebook for WordPress: door Facebook – 3.0.7
Google Listings and Ads: door WooCommerce – 2.0.3
Gravity Forms: door Gravity Forms – 2.5.15
Gravity PDF: door Blue Liquid Designs – 6.4.4
Gutenberg: door Gutenberg Team – 13.8.1
Health Check & Troubleshooting: door The WordPress.org community – 1.4.5
LuckyWP ACF Menu Field: door LuckyWP – 1.0
My Eyes Are Up Here: door interconnect/it – 1.1.10
Ninja Forms: door Saturday Drive – 3.6.12
Ninja Forms - Addon Manager: door The WP Ninjas – 3.0.13
Ninja Forms - Conditional Logic: door The WP Ninjas – 3.1
Ninja Forms - File Uploads: door The WP Ninjas – 3.3.14
Ninja Forms - Layout & Styles: door The WP Ninjas – 3.0.29
Ninja Forms - Mailchimp: door Saturday Drive – 3.2.0
Ninja Forms - Multi-Part Forms: door The WP Ninjas – 3.0.26
Ninja Forms - PDF Form Submissions: door Ninja Forms – 3.0.5
Ninja Forms - Redmatters - WebPower: door Redmatters – 3.0.0
Ninja Forms - Redpress Donation: door Redmatters – 3.0.0
Ninja Forms - Webhooks: door The WP Ninjas – 3.0.5
Ninja Forms Multilingual: door OnTheGoSystems – 0.1.2
Permalink Manager Lite: door Maciej Bis – 2.2.19.2
Pronamic Pay: door Pronamic – 8.5.0
Query Monitor: door John Blackbourn – 3.9.0
Restricted Site Access: door Jake Goldman
10up
Oomph – 7.3.1

RM Cookiebanner: door Redmatters – 1.0.1
Schema: door Hesham – 1.7.9.4
Search & Replace: door Inpsyde GmbH – 3.2.1
Temporary Login Without Password: door StoreApps – 1.7.4
The Events Calendar: door The Events Calendar – 5.16.4
The Events Calendar PRO: door Modern Tribe
Inc. – 4.7.9

TinyPNG - JPEG, PNG & WebP image compression: door TinyPNG – 3.4
Transients Manager: door WPBeginner – 2.0.3
W3 Total Cache: door BoldGrid – 2.2.4
WebP Express: door Bjørn Rosell – 0.25.5
WooCommerce Admin: door WooCommerce – 3.3.2
WooCommerce Beta Tester: door WooCommerce – 2.0.5
WooCommerce Bookings: door WooCommerce – 1.15.35
WooCommerce Findock Payment Gateway: door Redmatters – 1
WooCommerce Multilingual & Multicurrency: door OnTheGoSystems – 5.0.2
WooCommerce PDF Invoices & Packing Slips: door WP Overnight – 3.0.1
WooCommerce PDF Invoices & Packing Slips Professional: door Ewout Fernhout – 2.2.15
WooCommerce Product Add-ons: door WooCommerce – 4.4.0
WooCommerce Salesforce Connector: door Webkul Software Pvt. Ltd. – 2.0
WooCommerce Shipping & Tax: door WooCommerce – 1.26.3
Woocommerce Sisow Payment Methods: door Sisow – 5.5.8
WordPress Importer: door wordpressdotorg – 0.7
WP Cost Estimation & Payment Forms Builder: door Biscay Charly (loopus) – 9.706
WP Crontrol: door John Blackbourn & crontributors – 1.14.0
WP Downgrade | Specific Core Version: door Reisetiger – 1.2.5
WPML Media: door OnTheGoSystems – 2.6.3
WPML Multilingual CMS: door OnTheGoSystems – 4.4.9
WPML String Translation: door OnTheGoSystems – 3.1.7
WPML Translation Management: door OnTheGoSystems – 2.10.5
WP Revisions Control: door Erick Hitter – 1.4.3
Yoast Duplicate Post: door Enrico Battocchi & Team Yoast – 4.5
Yoast SEO Multilingual: door OnTheGoSystems – 1.2.4
Yoast SEO Premium: door Team Yoast – 16.0.3
Yoast Test Helper: door Team Yoast – 1.17

Dropin Plugins (1)

db.php: Query Monitor Database Class (Drop-in)

Settings

API Enabled: –
Force SSL: –
Currency: EUR (€)
Currency Position: left_space
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)

Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)

Connected to WooCommerce.com: –
Enforce Approved Product Download Directories: –

WC Pages

Winkelbasis: woocommerce/woocommerce#6 - /shop/
Winkelwagen: woocommerce/woocommerce#7 - /cart/
Afrekenen: woocommerce/woocommerce#8 - /checkout/
Mijn account: woocommerce/woocommerce#9 - /my-account/
Algemene voorwaarden: ❌ Pagina niet ingesteld

Theme

Name: Thunderz
Version: 1.0.0
Author URL: http://www.redmatters.com/
Child Theme: ✔
Parent Theme Name: RedPress
Parent Theme Version: 1.0.0
Parent Theme Author URL: http://www.redmatters.com/
WooCommerce Support: ✔

Templates

Overrides: /Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/42d00b992f37a04dbbb323b70e2d1504073a87e2.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/de54b5c44514c3b50c86e5807ec793d16ecc028c.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/b82f0895082e507f6066a78df1fbf81f85b74f54.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/db0d3b7af6b7cb98add418ee95d81e8bb6d7e413.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/d22ac27f30bc9c6e8098de631c7021ea440ce734.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/e3161b6dac6264fcb90c90303a309f6a29722a0d.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/016595dbd77d93ad5d633b1ac7e29314011b2b72.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/8242af3483bf2be6c664bcb7824780f6df08fae4.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/d643321d3354a640f156c5e0eaa1e2a1a47b6593.php versie 3.4.0 is verouderd. De hoofdversie is 5.2.0
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/a0b12bbd5893f4a0cd4bdc798952fa159b5775bd.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/f0a043a7ddee3b2aa542525f11d7ab3e64400fd5.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/c79f9fedc63ed352c99c80c2589769e5e44878ba.php versie 3.8.0 is verouderd. De hoofdversie is 5.2.0
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/8e06e719c69dcc3f647c9d458dbe39e97459c757.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/b4113b95ba4ae85a4df7de872e6577ef1e6a2422.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/b98cecb70571fa0d26ffa790fe506a465978e56d.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/8217a555f44b4bd8fe01249cdbc1c52c8b7ad74e.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/9820145ebe0b036a6dae8b97b0f2714b2bc2b159.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/fb807e5f6daf31568dde00809482ba895f41cf67.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/4a719d2cf0770c08352b145483cf65366ee3dc79.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/c8cc7769c2d735f939c5172c0074a6de7a3507ff.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/71cead923a34f524d4b85cf8b3945f0fb4a7b747.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/3ec37d1f41a29b475f54a0358b1bb8b666f37129.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/b96cde5196d88967c7fb4c7b5815f980c4441fcf.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/e431f25bad0661adff8bffa456730fd51bd88739.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/8d2e5987e4e16acbee50e0403c466163fd8fae8f.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/d2fee9585e2c4799b161e5a496032909cdea5a4f.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/254bf5ab48b585bc628bd5d3150022a03fcdf8e3.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/0e37fd8b70510baacffe4daf6a115f39caad63e6.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/93d4e15c399feb5f91b78544ea32dbbf4f253f4d.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/cc4a6db911b4965a587fda1b73253160d3aa52b2.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/4067f599fdad8f05802d64da0c4505d3158d3f0c.php versie 3.4.4 is verouderd. De hoofdversie is 5.6.0
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/97020ae54b938b667aa81aa4542fbf4c0e67b103.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/c6488fa104b20692354ff41b497ee35ba96e9487.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/633348515dc5a09160d4b1748541da001ac1125e.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/c0ff8284906e627d8b05fbc679dee8f021c86259.php versie 3.5.5 is verouderd. De hoofdversie is 6.1.0
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/a30031878e50ef2adb05935e2d9d23fe319b9af0.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/312a3391aeca659492e53bee559cdeec110102d1.php versie - is verouderd. De hoofdversie is 3.0.0
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/3b8864b8fd5c2eb39f6fae0a8cace790247e1493.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/c376051aae48342edf71520053a200b6abcb759e.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/c1ec12e64796c3d56ebcec383ee612b9051a87e1.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/a5d87c023cbbe161ddcec8009805cf63425e29ae.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/d485601e63944206ab60119d2aff98ee79c46302.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/3a41fb18036ffae03f08a9c98a119b0d107eecdd.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/94094c857b405bb085f52ac092e810fec5bed136.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/ac2084654560be0029e70969a337e44a3f2f7c70.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/42787b27ab4fdf092009661509e97a9c8403bea5.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/8ea64f3ce8cc64094d909ce2bf457e2e1263e5d0.php
/Users/renetuin/Documents/repos/redpress-v2/wp-content/uploads/cache/c64a308e9243fa2833b3b283002b9e77434aa7ad.php

Outdated Templates: ❌

					Leer hoe te updaten

Admin

Enabled Features: activity-panels
analytics
coupons
customer-effort-score-tracks
experimental-products-task
experimental-import-products-task
experimental-fashion-sample-products
experimental-product-tour
homescreen
marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
wc-pay-promotion
wc-pay-welcome-page
wc-pay-subscriptions-page

Disabled Features: minified-js
settings

Daily Cron: ✔ Next scheduled: 2022-08-11 11:32:19 +02:00
Options: ✔
Notes: 35
Onboarding: completed

Action Scheduler

Afgerond: 49
Oldest: 2022-08-09 16:23:55 +0200
Newest: 2022-08-10 13:30:41 +0200

In afwachting: 1
Oldest: 2022-08-10 16:21:20 +0200
Newest: 2022-08-10 16:21:20 +0200

Status report information

Generated at: 2022-08-10 15:08:06 +02:00
`

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.
@roykho
Copy link
Member

roykho commented Aug 10, 2022

Hi @RedmattersBV - thanks for reporting. Can you please state the exact error you're seeing?

@RedmattersBV
Copy link
Author

PHP Fatal error: Uncaught TypeError: Argument 1 passed to Automattic\WooCommerce\Blocks\BlockTypes\LegacyTemplate::add_alignment_class_to_wrapper() must be of the type string, null given, called in /wp-includes/class-wp-hook.php on line 309 and defined in /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/LegacyTemplate.php:215 Stack trace: #0 /wp-includes/class-wp-hook.php(309): Automattic\WooCommerce\Blocks\BlockTypes\LegacyTemplate->add_alignment_class_to_wrapper(NULL, Array) woocommerce/woocommerce#1 /Users/renetuin/Documents/repos/redpress-v2/wp-includes/plugin.php(189): WP_Hook->apply_filters(NULL, Array) woocommerce/woocommerce#2 /wp-includes/class-wp-block.php(284): apply_filters('render_block', '\n\n', Array, Object(WP_Block)) woocommerce/woocommerce#3 /wp-includes/blocks.php(883): WP_Block->render() woocommerce/woocommerce#4 /wp- in /wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/LegacyTemplate.php on line 215

@barryhughes barryhughes transferred this issue from woocommerce/woocommerce Aug 31, 2022
@zeinnicholas
Copy link

I'm getting the same issue within the ClassicTemplate.php file on line 233.

You need to perform some checks here and at least accept a null value, otherwise we simply can't use the FSE with other plugins that enhance the Block editor.

@darcie
Copy link
Member

darcie commented Feb 17, 2023

I have a report of the same issue for ClassicTemplate.php when adding a shortcode to a page:

Fatal error: Uncaught TypeError: Argument 1 passed to Automattic\WooCommerce\Blocks\BlockTypes\ClassicTemplate::add_alignment_class_to_wrapper() must be of the type string, null given, called in /home/nginx/domains/example.com/public/wp-includes/class-wp-hook.php on line 309 and defined in /home/nginx/domains/example.com/public/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/ClassicTemplate.php:234 Stack trace: #0 /home/nginx/domains/example.com/public/wp-includes/class-wp-hook.php(309): Automattic\WooCommerce\Blocks\BlockTypes\ClassicTemplate->add_alignment_class_to_wrapper() #1 /home/nginx/domains/example.com/public/wp-includes/plugin.php(191): WP_Hook->apply_filters() #2 /home/nginx/domains/example.com/public/wp-includes/class-wp-block.php(284): apply_filters() #3 /home/nginx/domains/example.com/public/wp-includes/class-wp-block.php(241): WP_Block->render() #4 /home/nginx/domains/example in /home/nginx/domains/example.com/public/wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/ClassicTemplate.php on line 234

Ref 5966075-zen

@aaronware
Copy link

Just a note that if you are getting this error and you are using the render_block filter if you explicitly return ''; it will "work" with the casting. We had this happen recently and I came across this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants