We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #1024082
Serialized array - not displaying columns
Closed

Comments

  •  2
    Patrick started the conversation

    Hi,

    Columns will not display (and no data visible) when using serialized php array as a datasource.

    I have followed all your instructions from your site but to no avail and also I have tested this with a simple php file (see below) and the result was that the php itself works (i.e. testing outside of wpdatatables) but the data and coiumns do not show or work when creating it via th wpdatatables admin interface.

    I have tested this on 2 sites and have the same issue.

    Could you let me know how to fix this.

    *** test-wpdatatables.php *** see below

    $return_array = array();
    $return_array[] = array(
        'Id' => '1', // Set the ID
        'Title' => 'Test1', // Set the title
        'Content preview with link' => 'Content1');
    $return_array[] = array(
        'Id' => '2', // Set the ID
        'Title' => 'Test2', // Set the title
        'Content' => 'Content2');
    $return_array[] = array(
        'Id' => '3', // Set the ID
        'Title' => 'Test3', // Set the title
        'Content' => 'Content3');
    echo serialize( $return_array );



  • [deleted] replied

    Hi Patric,

    I tested your code and it works normally. I created simple php file like Attach1 and then just upload it through our plugin and save. You can see resulting table in Attach2. 

    Please try to follow these steps and if you still have problems send me a temporary admin credentials so I can take a look 

  •  2
    Patrick replied

    Hi Miljko,

    Actually that example I gave over simplified what I was doing, I got it to work eventually and it came down to 2 things that got it to work

    define('WP_USE_THEMES', false); // (1) this on the first line
    include(dirname( __FILE__ ) . '/wp-blog-header.php');

    // the WP_Query stuff
    // the array $return_array = array(); // Initializing the array that will be used for the table

    // (2) then this before the last line
    header("HTTP/1.1 200 OK");
    echo serialize( $return_array );

    Hope that helps anybody else, who may have the same issue

    BTW : Great product, really impressed

    Cheers


  • [deleted] replied

    Hi Patrick,

    Thank you for sharing this. We really appreciate it. Also thank you for your kind words