- πΊπ¦Ukraine shoroshanska
Setup: D10.0.0, PHP 8.1.9, typed_data 8.x-1.x-dev
I am getting this error after applying the patch #5 β :
TypeError: Drupal\typed_data\PlaceholderResolver::replacePlaceHolders(): Argument #1 ($text) must be of type string, null given, called in modules/contrib/rules/src/Plugin/RulesDataProcessor/TokenProcessor.php on line 72 in Drupal\typed_data\PlaceholderResolver->replacePlaceHolders() (line 166 of modules/contrib/typed_data/src/PlaceholderResolver.php).The patch #2 β solves the issue for me. And there are no errors in the log.
- πΊπΈUnited States aitala
Hi,
I have the same issue with patch #5 and patch #2 works.
I think #5 is causing an issue with the Rules module (in this case Rules 8.x-3.x-dev (2022-Jun-18) )
[24-Feb-2023 08:19:49 America/New_York] TypeError: Drupal\typed_data\PlaceholderResolver::replacePlaceHolders(): Argument #1 ($text) must be of type string, null given, called in /home/ipmsusa3/public_html/drupal9/modules/contrib/rules/src/Plugin/RulesDataProcessor/TokenProcessor.php on line 72 in /home/ipmsusa3/public_html/drupal9/modules/contrib/typed_data/src/PlaceholderResolver.php on line 168 #0 /home/ipmsusa3/public_html/drupal9/modules/contrib/rules/src/Plugin/RulesDataProcessor/TokenProcessor.php(72): Drupal\typed_data\PlaceholderResolver->replacePlaceHolders(NULL, Array) #1 /home/ipmsusa3/public_html/drupal9/modules/contrib/rules/src/Context/ContextHandlerTrait.php(320): Drupal\rules\Plugin\RulesDataProcessor\TokenProcessor->process(NULL, Object(Drupal\rules\Context\ExecutionState)) #2 /home/ipmsusa3/public_html/drupal9/modules/contrib/rules/src/Context/ContextHandlerTrait.php(297): Drupal\rules\Plugin\RulesExpression\ActionExpression->processValue(NULL, Array, Object(Drupal\rules\Context\ExecutionState)) #3 /home/ipmsusa3/public_html/drupal9/modules/contrib/rules/src/Context/ContextHandlerTrait.php(83): Drupal\rules\Plugin\RulesExpression\ActionExpression->processData(Object(Drupal\rules\Plugin\RulesAction\SystemEmailToUsersOfRole), Object(Drupal\rules\Context\ExecutionState))
Thanks,
Eric - πΊπΈUnited States jsutta United States
#2 worked for me in Drupal 9.5.4 with Rules 8.x-3.0-alpha7. Because I have the Rules module installed I avoided #5 just in case based on the feedback from others.
- last update
9 months ago 72 pass - π΅π¦Panama gtoyloy18
Hi, I tried a couple of this patches but they didn't work as expected.
Also y had issues with the deprecated str_replace() passing null to parameter #3. - First commit to issue fork.
- last update
8 months ago 71 pass - Status changed to Fixed
6 months ago 8:53pm 10 July 2024 - πΊπΈUnited States tr Cascadia
Fixed by the commit in π [meta] Add scalar type hinting and return value typing Fixed . The solution was as in #5 - use parameter and return type hints to enforce values being passed to the placeholder resolver.
The related issue in Rules will be fixed in the Rules issue queue.
Automatically closed - issue fixed for 2 weeks with no activity.