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

Out of memory issue when used inside a thrive theme #191

Open
Toshiwoz opened this issue Feb 5, 2024 · 1 comment
Open

Out of memory issue when used inside a thrive theme #191

Toshiwoz opened this issue Feb 5, 2024 · 1 comment

Comments

@Toshiwoz
Copy link

Toshiwoz commented Feb 5, 2024

I have tested the plugin on a fresh installation, all works fine.
But on my client's website, the list of user favorites throws an out of memory error:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /home/hsd/techniques.hitsongsdeconstructed.com/wp-includes/formatting.php on line 236

It does not happen when used on a normal page.

@Toshiwoz
Copy link
Author

Toshiwoz commented Feb 6, 2024

I temporarily fixed it removing the apply_filter function, I'm pretty sure that is not the right solution but in the meantime this works for me.

This is the original code:

private function filterMarkup()
{
$this->html .= apply_filters('the_content', $this->markup);
$this->replacePostFields();
$this->replaceFavoritesFields();
$this->replaceThumbnails();
$this->replaceCustomFields();
}

This is my change:

	private function filterMarkup()
	{
		// $this->html .= apply_filters('the_content', $this->markup);
		$this->html .= $this->markup;
		$this->replacePostFields();
		$this->replaceFavoritesFields();
		$this->replaceThumbnails();
		$this->replaceCustomFields();
	}

Also, this comment might be useful, as other plugins had the same issue with thrive:
https://wordpress.org/support/topic/toc-shortcode-doesnt-work-with-thrive-architect/#post-15906759

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