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

og:tag - ErrorException: time() expects exactly 0 parameters #16

Open
ghost opened this issue Sep 6, 2019 · 1 comment
Open

og:tag - ErrorException: time() expects exactly 0 parameters #16

ghost opened this issue Sep 6, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 6, 2019

So I have an og tag defined as follows:

'tag' => $page->tags()->split(',')

If I have a tag of 'time' I get the following error

Whoops\Exception\ErrorException: time() expects exactly 0 parameters, 2 given in file /Applications/MAMP/htdocs/cms-dev/site/plugins/meta-tags/src/MetaTags.php on line 106

Is there a way I can escape this? I have tried to do the following

'tag' => $page->tags()->kt()->split(',')

But this then returns

<meta property="og:article:tag" content="time&lt;/p&gt;">

Which is wrong as it should just say 'time' within the content.

If I change the tag from 'time' to 'times' then it works, so it specifically relates to the word 'time' and I'm guessing it's already a function within Kirby.

@ghost
Copy link
Author

ghost commented Sep 6, 2019

If I do something like this

explode(',', $page->tags()->value())

Then I get it to work, but the tag now has a whitespace in front of it

<meta property="og:article:tag" content=" time">

Then when I try to remove the whitespace using trim or str_replace for example, I then get the same error about time()

Whoops\Exception\ErrorException: time() expects exactly 0 parameters, 2 given in file /Applications/MAMP/htdocs/cms-dev/site/plugins/meta-tags/src/MetaTags.php on line 106

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

0 participants