twomice / com.joineryhq.reltoken

CiviCRM extension: Provides tokens for any related contact, for all available contact tokens. E.g., to get the spouse's first name, or parent's marriage date.
Other
1 stars 5 forks source link

moving to php 8.2.0 #24

Open destrieux opened 4 months ago

destrieux commented 4 months ago

Hi, I'm moving my civicrm server from 7.4.33 to 8.2.0. related tokens works fine with PHP 7.4.33 but not with 8.2.0. The error message follows. It it a known issue and is there any plan to fix it in a future release ? best and many thanks for your help. Christophe

Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Fatal error: Uncaught Error: Cannot assign an empty string to a string offset in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php:85 Stack trace: #0 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(251): _reltoken_evaluate_tokens(Object(Civi\Token\Event\TokenValueEvent), 'civi.token.eval', Object(Civi\Core\UnoptimizedEventDispatcher)) #1 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'civi.token.eval', Object(Civi\Token\Event\TokenValueEvent)) #2 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/Civi/Core/CiviEventDispatcher.php(263): Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object(Civi\Token\Event\TokenValueEvent), 'civi.token.eval') #3 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/Civi/Token/TokenProcessor.php(354): Civi\Core\CiviEventDispatcher->dispatch('civi.token.eval', Object(Civi\Token\Event\TokenValueEvent)) #4 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/TokenSmarty.php(64): Civi\Token\TokenProcessor->evaluate() #5 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/MessageTemplate.php(374): CRM_Core_TokenSmarty::render(Array, Array, Array) #6 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/MessageTemplate.php(274): CRM_Core_BAO_MessageTemplate::renderTemplateRaw(Array) #7 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Contact/Form/Task/PDFTrait.php(238): CRM_Core_BAO_MessageTemplate::renderTemplate(Array) #8 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php(622): CRM_Contact_Form_Task_PDF->postProcess() #9 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Submit.php(56): CRM_Core_Form->mainProcess() #10 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Submit->perform(Object(CRM_Contact_Form_Task_PDF), 'submit') #11 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Task_PDF), 'submit') #12 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php(355): HTML_QuickForm_Page->handle('submit') #13 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Utils/Wrapper.php(98): CRM_Core_Controller->run() #14 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(292): CRM_Utils_Wrapper->run('CRM_Contact_For...', 'Activit\xC3\xA9s', Array) #15 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(69): CRM_Core_Invoke::runItem(Array) #16 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(36): CRM_Core_Invoke::_invoke(Array) #17 /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke(Array) #18 /Applications/MAMP/htdocs/69/wp-includes/class-wp-hook.php(324): CiviCRM_For_WordPress->invoke('') #19 /Applications/MAMP/htdocs/69/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #20 /Applications/MAMP/htdocs/69/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #21 /Applications/MAMP/htdocs/69/wp-admin/admin.php(259): do_action('toplevel_page_C...') #22 {main} thrown in /Applications/MAMP/htdocs/69/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Une erreur critique est survenue sur ce site. Veuillez consulter la boite de réception de l’e-mail d’administration de votre site pour plus d’informations.

En apprendre plus sur le débogage de WordPress.

destrieux commented 2 months ago

Hi Is there any issue using PHP 8 with related tokens (v0.4.0)? I'm using this related token to create and print documents {related.street_address___reltype_a_a_pour_personne_de_confiance_2_est_la_personne_de_confiance_2}

[02-May-2024 16:45:09 Europe/Paris] PHP Warning: Only the first byte will be assigned to the string offset in /Applications/MAMP/htdocs/wordpress/wp-content/plugins/civicrm/civicrm/ext/com.joineryhq.reltoken-0.4.0/reltoken.php on line 85

Many thanks for your help