Title: Error when adding Shortcode to Product page
Last modified: February 1, 2021

---

# Error when adding Shortcode to Product page

 *  Resolved [TLM-C](https://wordpress.org/support/users/bastient/)
 * (@bastient)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-adding-shortcode-to-product-page/)
 * Hello, after adding 30 tables to my website I got a Problem.
    when I add shortcake
   to show table on a product page I get this error :
 * >  Warning: json_decode() expects parameter 1 to be string, object given in /
   > home/tlmmphnt/www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.
   > php on line 326
   > Notice: Trying to get property ‘colNumber’ of non-object in /home/tlmmphnt/
   > www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php on line
   > 27
   > Notice: Trying to get property ‘rowNumber’ of non-object in /home/tlmmphnt/
   > www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php on line
   > 28
   > Notice: Trying to get property ‘mergedCells’ of non-object in /home/tlmmphnt/
   > www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php on line
   > 29
   > Notice: Trying to get property ‘colHeaders’ of non-object in /home/tlmmphnt/
   > www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php on line
   > 30
   > Fatal error: Uncaught TypeError: Argument 1 passed to WPDataTableRows::setColHeaders()
   > must be of the type array, null given, called in /home/tlmmphnt/www/wp-content/
   > plugins/wpdatatables/source/class.wpdatatablerows.php on line 30 and defined
   > in /home/tlmmphnt/www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.
   > php:92 Stack trace: #0 /home/tlmmphnt/www/wp-content/plugins/wpdatatables/source/
   > class.wpdatatablerows.php(30): WPDataTableRows->setColHeaders(NULL) #1 /home/
   > tlmmphnt/www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php(
   > 334): WPDataTableRows->__construct(Object(stdClass)) #2 /home/tlmmphnt/www/
   > wp-content/plugins/wpdatatables/controllers/wdt_functions.php(539): WPDataTableRows::
   > loadWpDataTableRows(’35’) #3 /home/tlmmphnt/www/wp-includes/shortcodes.php(
   > 343): wdtWpDataTableShortcodeHandler(Array, ”, ‘wpdatatable’) #4 [internal 
   > function]: do_shortcode_tag(Array) #5 /home/tlmmphnt/www/wp-includes/shortcodes.
   > php(218): preg_replace_callback(‘/\\[(\\[?)(wpdata…’, ‘do_shortcode_ta…’, ‘
   > <tabl in /home/tlmmphnt/www/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.
   > php on line 92
   >  Il y a eu une erreur critique sur ce site.
 * how could I fix this ?
    Thanks.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-when-adding-shortcode-to-product-page%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-adding-shortcode-to-product-page/#post-13986255)
 * Hi bastient,
 * Sorry for the inconvenience,
 * Can you try this solution?
 * [https://wordpress.org/support/topic/error-500-when-try-tu-update-page-with-html-wpdatatable-idxx/](https://wordpress.org/support/topic/error-500-when-try-tu-update-page-with-html-wpdatatable-idxx/)
 * Best regards.
 *  Thread Starter [TLM-C](https://wordpress.org/support/users/bastient/)
 * (@bastient)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-adding-shortcode-to-product-page/#post-13990562)
 * Thanks that’s perfect !
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-adding-shortcode-to-product-page/#post-13992454)
 * Hi bastient,
 * You are welcome.
 * Best regards.

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

The topic ‘Error when adding Shortcode to Product page’ is closed to new replies.

 * ![](https://ps.w.org/wpdatatables/assets/icon-128x128.gif?rev=3010404)
 * [wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin](https://wordpress.org/plugins/wpdatatables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpdatatables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpdatatables/)
 * [Active Topics](https://wordpress.org/support/plugin/wpdatatables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpdatatables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpdatatables/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-adding-shortcode-to-product-page/#post-13992454)
 * Status: resolved