• Resolved ImageJeffinho2016

    (@jeffinho2016)


    Since 3.4, using the shortcode
    [table-info id=42 field=number_rows /]
    returns a fatal error
    PHP Fatal error: Uncaught TypeError: TablePress_Frontend_Controller::shortcode_table_info(): Return value must be of type string, int returned in /home/xxxxxxxxxl/wp-content/plugins/tablepress/controllers/controller-frontend.php:1067

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author ImageTobias Bäthge

    (@tobiasbg)

    Hi @jeffinho2016,

    Thanks for your post and sorry for the trouble!

    Yes, this is a bug in TablePress 3.4 that unfortunately wasn’t identified when some tighter checks on data types were added. I will of course fix this with the next release!

    In the meantime, you can already fix this yourself, with a very small change:

    In that PHP file /wp-content/plugins/tablepress/controllers/controller-frontend.php, you will find this in line 1067:

    return $output;

    Using e.g. FTP access to the site or simply via the “Plugin Editor” that is built into WordPress, in the “Plugins” menu, please change that line to

    return (string) $output;

    After that, the error will disappear and everything will be working fine again.

    Best wishes,
    Tobias

    Plugin Author ImageTobias Bäthge

    (@tobiasbg)

    Hi @jeffinho2016,

    Quick update: I have just released TablePress 3.4.1 which prevents this error from showing 🙂 You should be seeing the update in your site’s admin dashboard shortly.

    For more details, you can find the release notes at https://tablepress.org/release-announcement-tablepress-3-4-1/

    Best wishes,
    Tobias

Viewing 2 replies - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.