When trying to add a file list (files module) to a Gutenberg page the system throws an error.
PHP Fatal error: Uncaught TypeError: AcfService\Implementations\NativeAcfService::getField(): Argument #2 ($postId) must be of type string|int|false, null given, called in /wp-content/plugins/modularity/source/php/Module/FilesList/FilesList.php on line 58 and defined in /wp-content/plugins/modularity/vendor/helsingborg-stad/acfservice/src/Implementations/NativeAcfService.php:16
Problem seems to come from the fact that the module gets its data from a post ID and when the block is used in Gutenberg the data is "inline" so no post ID is needed.
https://github.com/helsingborg-stad/Modularity/blob/main/source/php/Module/FilesList/FilesList.php#L58
When trying to add a file list (files module) to a Gutenberg page the system throws an error.
PHP Fatal error: Uncaught TypeError: AcfService\Implementations\NativeAcfService::getField(): Argument #2 ($postId) must be of type string|int|false, null given, called in /wp-content/plugins/modularity/source/php/Module/FilesList/FilesList.php on line 58 and defined in /wp-content/plugins/modularity/vendor/helsingborg-stad/acfservice/src/Implementations/NativeAcfService.php:16
Problem seems to come from the fact that the module gets its data from a post ID and when the block is used in Gutenberg the data is "inline" so no post ID is needed.
https://github.com/helsingborg-stad/Modularity/blob/main/source/php/Module/FilesList/FilesList.php#L58