Kirbytext stopped working with new hosting

I think I’m running Kirby 2. Moved my web host from Media Temple to Namecheap (PHP 7.2) and for some reason the kirbytext stopped working (used to be just fine, nothing that I changed).

The line that creates a problem:
<?php echo kirbytext($story->text()) ?>

If I delete kirbytext, the text from stories is shown without formatting.

What config error is showing:

Notice : Array to string conversion in /home/fessl/storiesbeentold.com/kirby/vendors/parsedown.php on line 982

Notice : Undefined property: Parsedown::$Array in /home/fessl/storiesbeentold.com/kirby/vendors/parsedown.php on line 982

Fatal error : Method Kirbytext::__toString() must not throw an exception, caught Error: Function name must be a string in /home/fessl/storiesbeentold.com/kirby/helpers.php on line 0

My PHP is very basic so have trouble troubleshooting. Any ideas? Maybe it’s some PHP version compatibility? Should I try to upgrade to Kirby 3? Don’t want to unnecessarily spend money though.

Hm, are you sure your Kirby version is not even older? Because the file path kirby/vendors/parsedown.php does not exist in a current Kirby 2 or 3 version.

Edit: Ok, seems to be an early Kirby 2 version and I assume that this version is not compatible with PHP 7.

Without knowing the exact version, I can’t find out which code is causing this issue.

Btw. Does the issue persist if you change your code to


<?php echo $story->text()->kirbytext() ?>

Try to update your kirby 2 installation to the latest version (for Kirby 2). In my experience that usually works without breaking the site. Unless you have very specific custom code/plugins, based on older functions. :warning: Always try this locally first!

1 Like

Thank you so much, I opted to just completely upgrade to Kirby 3 as the most future-proof solution and then repopulate the website.

Apparently Kirby 3 doesn’t read popup: yes anymore and all folder names must have no spaces… Took a while to rewrite. Then I found one instance where I needed to include kirbytext, although Kirby 1 was transforming the Markdown just fine. Good news ➙ everything works now!

I’m glad you got it working! And nice you immediately bit the bullet and updated to Kirby 3. You won’t regret it :+1: