Title: json_decode() error
Last modified: October 27, 2020

---

# json_decode() error

 *  Resolved [joeyjody](https://wordpress.org/support/users/joeyjody/)
 * (@joeyjody)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/json_decode-error/)
 * Hi!
    i hope someone will be able to help me. I created a simple table with your
   plugin, and implemented the shortcode into a page. Now I’m trying to edit that
   page and it throws me this error :
 * > Warning: json_decode() expects parameter 1 to be string, object given in /home/
   > clients/b4e9a747f990ccf19cf7d357ee13a8e0/webpreview/wp-content/plugins/wpdatatables/
   > source/class.wpdatatablerows.php on line 326
   > Fatal error: Uncaught TypeError: Argument 1 passed to WPDataTableRows::setColHeaders()
   > must be of the type array, null given, called in /home/clients/b4e9a747f990ccf19cf7d357ee13a8e0/
   > webpreview/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php
   > on line 30 and defined in /home/clients/b4e9a747f990ccf19cf7d357ee13a8e0/webpreview/
   > wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php:92 Stack trace:#
   > 0 /home/clients/b4e9a747f990ccf19cf7d357ee13a8e0/webpreview/wp-content/plugins/
   > wpdatatables/source/class.wpdatatablerows.php(30): WPDataTableRows->setColHeaders(
   > NULL) #1 /home/clients/b4e9a747f990ccf19cf7d357ee13a8e0/webpreview/wp-content/
   > plugins/wpdatatables/source/class.wpdatatablerows.php(334): WPDataTableRows-
   > >__construct(Object(stdClass)) #2 /home/clients/b4e9a747f990ccf19cf7d357ee13a8e0/
   > webpreview/wp-content/plugins/wpdatatables/controllers/wdt_functions.php(520):
   > WPDataTableRows::loadWpDataTableRows(‘3’) #3 /home/clients/b4e9a747f990ccf19cf7d357ee13a8e0/
   > webpreview/wp-includes/shortcodes.php(343): w in /home/clients/b4e9a747f990ccf19cf7d357ee13a8e0/
   > webpreview/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php
   > on line 92
 * What is happening here?
    Thank you for your help!

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

 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13587292)
 * Hi joeyjody,
    Sorry for inconvenience, Can you please tell me do you use some
   cache plugin on your server? If that is true then please clear server and browser
   cache and try to create the same table and check are you still have this issue?
 * We suppose that this table with error are saved in database with wrong data, 
   because all necessary files are not included because of caching plugin. you will
   need to delete it.
 * If you still have issue with new table as well, please open a new private pre-
   purchase ticket on our [support platform](https://tmsplugins.ticksy.com/) with
   temporary wp-admin credentials, so we can investigate.
 *  Thread Starter [joeyjody](https://wordpress.org/support/users/joeyjody/)
 * (@joeyjody)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13590348)
 * Thank you for your reply.
    Emptying cache solved the problem! I didn’t even have
   to create a new table, the old one works just fine now, and I can edit the page
   again. Very nice! Thanks a lot for your help!
 * Have a nice day!
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13591568)
 * Hi joeyjody,
 * You are welcome.
 * I am glad that now everything is working fine.
 * Best regards.
 *  [doleq](https://wordpress.org/support/users/doleq/)
 * (@doleq)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13890753)
 * Hello.
    I have the same problem. I reset the CACHE, recreate the table and there
   is still a problem.
 * [https://www.przewodygrzejne.info/przewodniki_projekto/raychem-wybor-systemu-do-ogrzewania-podjazdow/](https://www.przewodygrzejne.info/przewodniki_projekto/raychem-wybor-systemu-do-ogrzewania-podjazdow/)
 * Warning: json_decode() expects parameter 1 to be string, object given in /autoinstalator/
   wordpress7/wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php on
   line 326
 * Fatal error: Uncaught TypeError: Argument 1 passed to WPDataTableRows::setColHeaders()
   must be of the type array, null given, called in /autoinstalator/wordpress7/wp-
   content/plugins/wpdatatables/source/class.wpdatatablerows.php on line 30 and 
   defined in /autoinstalator/wordpress7/wp-content/plugins/wpdatatables/source/
   class.wpdatatablerows.php:92 Stack trace: #0 /autoinstalator/wordpress7/wp-content/
   plugins/wpdatatables/source/class.wpdatatablerows.php(30): WPDataTableRows->setColHeaders(
   NULL) #1 /autoinstalator/wordpress7/wp-content/plugins/wpdatatables/source/class.
   wpdatatablerows.php(334): WPDataTableRows->__construct(Object(stdClass)) #2 /
   autoinstalator/wordpress7/wp-content/plugins/wpdatatables/controllers/wdt_functions.
   php(524): WPDataTableRows::loadWpDataTableRows(’32’) #3 /autoinstalator/wordpress7/
   wp-includes/shortcodes.php(343): wdtWpDataTableShortcodeHandler(Array, ”, ‘wpdatatable’)#
   4 [internal function]: do_shortcode_tag(Array) #5 /autoinstalator/wordpress7/
   wp-includes/shortcodes.php(218): preg_replace_callb in /autoinstalator/wordpress7/
   wp-content/plugins/wpdatatables/source/class.wpdatatablerows.php on line 92
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13920442)
 * Hi doleq.
 * Sorry for inconvenience,
 * Can you please update on the latest version 2.1.7, clear your server and browser
   cache and check is it resolved?
 * Best regards.
 *  [doleq](https://wordpress.org/support/users/doleq/)
 * (@doleq)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13926423)
 * Welcome.
    I updated and cleared the cache. The problem still exists.
 * Sincerely.
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13931734)
 * Hi doleq,
 * Sorry for the inconvenience,
 * We need to investigate this on your website.
 * Please open a new private pre-purchase ticket on our [support platform](https://tmsplugins.ticksy.com/)
   with temporary wp-admin credentials, so we can investigate.
 * Best regards.

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

The topic ‘json_decode() error’ 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/)

 * 7 replies
 * 3 participants
 * Last reply from: [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/json_decode-error/#post-13931734)
 * Status: resolved