Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Site broken: Too few arguments to function

Started by Chase Cromwell 7 years ago · 2 replies · 547 views
7 years ago

I just updated both Grav and the Quark theme and now when I load my blog page (chasecrom.com/blog) I get:
Too few arguments to function Grav\Common\Twig\TwigExtension::markdownFunction(), 1 passed in /home/palmariu/public_html/main_site/cache/twig/08/0895f2ad1e6944840a44f3853e1da4766bdff2c54347f7616e8ac0e4b0747e2c.php on line 89 and at least 2 expected
I don't really understand what I can do to fix this or how to downgrade grav back to the prior version (I don't have backups setup apparently)

7 years ago

I figured it out.

So.

In the file system/src/Grav/Common/Twig/TwigExtension.php on line 626 it reads
public function markdownFunction($context = false, $string, $block = true)
this needs to be changed to

public function markdownFunction($string, $context = false, $block = true)

so that the optional function arguments (context and block) are defined after the required ones.

7 years ago

Seems like you found a solution .. or a system bug. However I would be cautious altering system relevant files.

I had issues before myself after upgrading Grav to a newer version flagging all kind of s. As a standard procedure you should delete the 'cache' folder so it regenerates all the cache files. If it references a cached version created prior the upgrade it might through errors.

Not sure if you tried that. If you did.. ignore my comment.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 82 12 hours ago
General · by pamtbaau, 17 hours ago
1 55 16 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 348 5 days ago
General · by Duc , 5 days ago
3 43 5 days ago