Warning: Missing argument when sites is on ftp

Hi! When Im developing my site on MAMP Everything goes great but when I tried to put it on the ftp and load it in the browser Im getting this error. I don’t understand it.

Warning: Missing argument 1 for Collection::limit(), called in /www/barrioestudio/htdocs/kirby/site/snippets/projects.php on line 2 and defined in /www/barrioestudio/htdocs/kirby/kirby/toolkit/lib/collection.php on line 41

Thanks in advance

Could you tell us what your site/snippets/projects.php line 2 says? It looks as though you might be doing a $pages->limit() instead of $pages->limit(3) (or any other number - it doesn’t have to be 3).

1 Like

Thanks! Now I get it.
I’ve edited the limit to display all the projects in a list. How can I do this without breaking it? haha

Best regards, thank you again.

You can either pass a number or a variable (make sure it’s an integer), depending on your use case, e.g.

$projects = $pages->visible()->limit(3);
$limit = 5;
$projects = $pages->visible()->limit($limit);

@texnixe, thank you for the solution. Yesterday i have the same problem, now i have fix it.