Editor Server side is not working

Editor Server side is not working

PARTHIBAN GANESANPARTHIBAN GANESAN Posts: 4Questions: 1Answers: 0

Hi Allan,

We have a table containing more than 1 million rows. we want to make this table editable using server-side feature in editor.
And I referred below link to create a table:

https://editor.datatables.net/examples/simple/server-side-processing.html

Now the problem comes in server-side script to get the data.

I'm getting only first 10 rows as an output and the total number of records showing null as a result.

"options":[],"files":[],"draw":1,"recordsTotal":null,"recordsFiltered":null,"debug":[{"query":"SELECT COUNT(GBU) as cnt FROM \"PatchMgmt\".\"V_130_PatchReport\" ","bindings":[]}

Error stated below:

Notice: Undefined index: cnt in /var/www/html/Editor-PHP-1.7.2/php/Editor/Editor.php on line 1432

Notice: Undefined index: cnt in /var/www/html/Editor-PHP-1.7.2/php/Editor/Editor.php on line 1433

Please help me to proceed further on this issue and
let me know if anything needed further in detail.

Thanks in advance :)

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Hi,

    The first thing to do would be to update to 1.7.3 since that is the latest release, however, I'm not sure that would resolve this.

    Can you give me a link to your page please? The example you linked to appears to work no problem so I would need to be able to inspect your page with the error to understand what is going wrong.

    Allan

  • Mariusz GluglaMariusz Glugla Posts: 16Questions: 0Answers: 1

    Hi Allan. Regarding this topic, I found a problem in php/Editor/Editor.php, function _ssp_query():

            return array(
                "draw" => intval( $http['draw'] ),
                "recordsTotal" => $ssp_full_count['cnt'],
                "recordsFiltered" => $ssp_set_count['cnt']
            );
    

    Returned alias for COUNT(p_key_column) is 'CNT', not 'cnt'.
    When I updated php so that key is in upper case, problem disappeared.

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Thank you! Are you using Oracle by any chance? Or set an option in your PDO connection to specify uppercase returns/

    Allan

  • Mariusz GluglaMariusz Glugla Posts: 16Questions: 0Answers: 1

    We are using Oracle running on Linux.
    My coleague said, that you have probably Oracle configured with option enabled to preserve case so that if you will write ctn, oracle will not change it to upper case CTN. Is your test instance running on Windows?

  • PARTHIBAN GANESANPARTHIBAN GANESAN Posts: 4Questions: 1Answers: 0

    Hi Allan,

    Have one question regarding full export using CSV / excel.

    In editor, full export was working perfectly on client side.
    But, on server-side, it exports only first page visible data.

    I have referred some discussions on forums and understood that this will works only for client side. But we need this feature on server side reports.

    Any way to implement this on server side reports?

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin

    Is your test instance running on Windows?

    No - its running on Linux. I've encountered cases such as your own when it does change case and others when it doesn't. I will see if I can find a way to make it always work!

    But, on server-side, it exports only first page visible data.

    That is correct. See this FAQ.

    Allan

This discussion has been closed.