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

Related Tokens causes the System Status page to fail in CiviCRM 5.45 #20

Closed rgilman closed 2 years ago

rgilman commented 2 years ago

On upgrading from 5.43.2 to 5.45, the System Status page generated an error:

Fatal error: Allowed memory size of 402653184 bytes exhausted (tried to allocate 20480 bytes) in /var/www/civ.context.org/htdocs/wp-content/plugins/civicrm/civicrm/Civi/Token/Event/TokenRegisterEvent.php on line 67

All of the other pages in the site that I tested worked fine without any memory issues.

Line 67 is: $params = array_merge($this->defaults, $params);

I understand the array_merge can cause memory problems, so I did echo var_dump($params); just before line 67. What resulted was a huge looping dump. I eventually closed the page but not before I had copied a big block of text that turned out to include 882 repetitions of the same 76 lines of an array that starts with:

array(3) { ["entity"]=> string(7) "contact" ["field"]=> string(8) "checksum" ["label"]=> string(8) "Checksum" } array(3) { ["entity"]=> string(7) "contact" ["field"]=> string(16) "current_employer" ["label"]=> string(16) "Current Employer" } array(3) { ["entity"]=> string(7) "contact" ["field"]=> string(12) "world_region" ["label"]=> string(12) "World Region" } ...

Thinking that this might be a conflict with an extension, I disabled Related Tokens and the System Status page then loaded normally.

I doubt this is fundamentally a System Status page issue. That's just where I happened to observe it.

twomice commented 2 years ago

Thanks for reporting, @rgilman . At first glance this sounds very much like previously reported issue #18 , which was fixed in version 0.3.1 (latest version at this moment). Can you verify whether you're using that version?

rgilman commented 2 years ago

@twomice, I'm happy to report that 0.3.1 seems to fix the issue. However, I didn't get any message previously through Civi that 0.3.1 was available. I just did the manual update from github now, with your prompting.

MegaphoneJon commented 2 years ago

@twomice a ping to close this.

twomice commented 2 years ago

Closing, thanks @MegaphoneJon