Mounir
December 13, 2022, 7:19pm
1
Hey Everyone,
This is my first website with Kirby, excited for it to be on air
unfortunately after I uploaded the website to the host, whenever I try to upload content from the panel I get this error:
TypeError
Kirby\Toolkit\Str::esc(): Argument #1 ($string) must be of type string, null given, called in /home/u379737048/domains/daleelal-khrijeen.com/public_html/kirby/config/methods.php on line 344
Any ideas why?
Mounir
December 13, 2022, 7:20pm
2
this is the line: ```
public static function esc(string $string, string $context = ‘html’): string
texnixe
December 13, 2022, 7:25pm
3
Which Kirby version are you using with which version of PHP?
Mounir
December 13, 2022, 7:54pm
4
Kirby 3, Not sure how to check for my php version…
this is my website: https://daleelal-khrijeen.com/en
texnixe
December 13, 2022, 7:56pm
5
You can check your php version using
<?php
phpinfo();
Mounir:
Kirby 3,
Well, I would need the exact version, there have been quite a few releases between Kirby 3.0.0 and the current latest 3.8.3…
texnixe
December 13, 2022, 8:11pm
7
The issue happens because your field on which you call esc
in line 24 in projects.php snippet seems to be empty.
This is something that has been fixed in later versions of Kirby.
So there are two options:
Make sure that the field contains a value or check that in your code before you call esc
or
Update Kirby
Mounir
December 14, 2022, 10:37am
8
texnixe:
Update Kirby
Thank you Sonia!
I updated the kirby version and it worked!
Happy holidays
texnixe
December 14, 2022, 10:58am
9
Great! Thank you, happy holidays to you, too!