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

Error when using a model for og:image fallback #83

Closed
Milos2504 opened this issue Mar 15, 2024 · 1 comment
Closed

Error when using a model for og:image fallback #83

Milos2504 opened this issue Mar 15, 2024 · 1 comment
Labels
type: bug 🐛 Is a bug; fixes a bug

Comments

@Milos2504
Copy link

I use a model for og:image fallback. This works fine with pages which have a cover image. However if a page doesn't have a cover image, an error (also below) comes up when I try to access that page in the panel.

Model:

    public function metaDefaults(string $lang = null): array
	{

		return [

			// or any meta tag
			'og:image' => $this->cover() ? $this->cover()->url() : '',
			"og:image:width" => 1230,
			"og:image:height" => 600,

		];
	}

Error:

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 12288 bytes) in C:\xampp\htdocs\local\site\plugins\kirby-seo\classes\Meta.php on line 64

Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 32768 bytes) in C:\xampp\htdocs\local\kirby\vendor\filp\whoops\src\Whoops\Util\Misc.php on line 1

Removing the model makes the error go away.

@tobimori tobimori added the type: bug 🐛 Is a bug; fixes a bug label Mar 15, 2024
@tobimori
Copy link
Owner

Fix released in 1.0.0-rc.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Projects
None yet
Development

No branches or pull requests

2 participants