This thread is resolved. Here is a description of the problem and solution.
Problem: The client encountered a PHP Fatal error indicating that the allowed memory size was exhausted while using the WPML plugin. This error was found in the PHP error logs and specifically occurred in the Macroable.php file.
Solution: If you're experiencing this issue, it's likely related to your server or hosting settings. We recommend contacting your hosting provider to address this issue. Additionally, you can review similar cases and solutions by visiting the following custom search URL: related WPML forum tickets. Please also ensure that your server meets our minimum requirements.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If needed, please open a new support ticket.
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
<b>Background of the issue: </b>
I was routinely checking my PHP error logs, and I found the following errors.
[07-Aug-2024 03:58:20 UTC] PHP Fatal error: Allowed memory size of 5368709120 bytes exhausted (tried to allocate 262144 bytes) in /home/nuclearmed/htdocs/nuclearmed.org/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php on line 56
[07-Aug-2024 06:31:37 UTC] PHP Fatal error: Allowed memory size of 5368709120 bytes exhausted (tried to allocate 262144 bytes) in /home/nuclearmed/htdocs/nuclearmed.org/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php on line 56
This is Macroable.php from 40 to 60
/**
* Dynamically handle calls to the class.
*
* @param string $method
* @param mixed[] $parameters
* @return mixed
*
* @throws BadMethodCallException
*/
public static function __callStatic($method, $parameters)
{
if (! static::hasMacro($method)) {
throw new BadMethodCallException("Method {$method} does not exist.");
}
Before this ticket gets assigned to one of my colleagues, I will try to help.
The "allowed memory exhausted" error is usually related to server/hosting settings so they (the hosting support) might be the only ones who can fix it.
However, there are a good amount of existing tickets related to this exact error with recommendations and solutions from our team.
I created this custom search URL below - can you please take a look at the tickets showing up and see if the solution that worked for the customers works for you, too?
There's a chance that they just happened in the background for a second if you did not see any issues on the front-end and in the functionality of the site.