Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving to php 8.2.0 #24

Open
destrieux opened this issue Feb 18, 2024 · 2 comments
Open

moving to php 8.2.0 #24

destrieux opened this issue Feb 18, 2024 · 2 comments

Comments

@destrieux
Copy link

destrieux commented Feb 18, 2024

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.

@twomice twomice changed the title moving to phpo moving to php 8.2.0 Feb 19, 2024
Repository owner deleted a comment from destrieux Feb 19, 2024
@destrieux
Copy link
Author

destrieux commented May 2, 2024

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}

  • with PHP 7.4.33, everything runs smoothly
  • with PHP 8.2.0, no readable pdf is generated
    in PHP logs, I have the same message

[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

@destrieux
Copy link
Author

Hi
I'm still struggling to use related tokens with PHP8, getting the Fatal error: Uncaught Error: Cannot assign an empty string to a string offset in .../ext/com.joineryhq.reltoken-0.4.0/reltoken.php:85
Is there any plan to fix this ?
Best and thanks for this extension

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

No branches or pull requests

1 participant