One page on my client’s site (might still be using Kirby 2) recently became inaccessible and I see a 500 error on the page. She has not made any changes to the site on the frontend or backend in years.
The page that errors out is: https://deweyhagborg.com/projects
She had a look at the site error log and noticed the following error which has actually been recurring in the log since the beginning but only on Sept 30 did it become a “fatal error” and not just a “notice” or “warning”:
[04-Oct-2020 14:38:42 UTC] PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function Collection::limit(), 0 passed in /home2/deweyhag/public_html/site/snippets/projects.php on line 2 and exactly 1 expected in /home2/deweyhag/public_html/kirby/toolkit/lib/collection.php:50
Stack trace:
#0 /home2/deweyhag/public_html/site/snippets/projects.php(2): Collection->limit()
#1 /home2/deweyhag/public_html/kirby/toolkit/lib/tpl.php(22): require(’/home2/deweyhag…’)
#2 /home2/deweyhag/public_html/kirby/helpers.php(13): Tpl::load(’/home2/deweyhag…’, Array, false)
#3 /home2/deweyhag/public_html/site/templates/projects.php(9): snippet(‘projects’)
#4 /home2/deweyhag/public_html/kirby/toolkit/lib/tpl.php(22): require(’/home2/deweyhag…’)
#5 /home2/deweyhag/public_html/kirby/kirby.php(705): Tpl::load(’/home2/deweyhag…’)
#6 /home2/deweyhag/public_html/kirby/kirby.php(680): Kirby->template(Object(Page), Array)
#7 /home2/deweyhag/public_html/kirby/kirby.php(781): Kirby->render(Object(Page))
#8 /home2/deweyhag/public_html/index.php(16): Kirby->launch in /home2/deweyhag/public_html/kirby/toolkit/lib/collection.php on line 50
Thank you so much for your help!