No more general server-side components?

No more general server-side components?

jacob.steinbergerjacob.steinberger Posts: 86Questions: 18Answers: 1
edited July 2017 in Editor

I've run into a problem with trying to use server-side processing, multi-column filtering and loading a "prefilter" via searchCol. From what I can tell, it doesn't work with Editor. The variable is passed by the client, but it appears to do nothing on the server-side.

A working example, of prefiltering via searchCol, was posted by Allen some time ago here (http://live.datatables.net/waselab/106/edit). That doesn't use Editor, it uses an "older" server-side processing script that appears to no longer be distributed. I re-downloaded base DataTables, and the server_processing.php and ssp.class.php isn't included. The download page suggest using editor for server-side components.

I'd like to try the non-Editor solution to see if it works but can't without those files.

Still digging, but curious if the older server-side scripts are available somewhere.

This question has an accepted answers - jump to answer

Answers

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394
    edited July 2017

    I re-downloaded base DataTables, and the server_processing.php and ssp.class.php isn't included

    They are in /examples/server_side/scripts in my download.

  • jacob.steinbergerjacob.steinberger Posts: 86Questions: 18Answers: 1

    It may be because I was downloading it through the 'package builder' and not the direct download link. Silly, I know, but there were are.

    As for my technical issue, the client-side GET works fine, but it looks like the backend php doesn't handle the sSearch

    &columns%5B0%5D%5Bdata%5D=ReceivedAt
    &columns%5B0%5D%5Bname%5D=
    &columns%5B0%5D%5Bsearchable%5D=true
    &columns%5B0%5D%5Borderable%5D=true
    &columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=2017-07-25
    &columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false
    

    values properly. I'll keep digging and start another thread as needed.

    Thanks for the reply, Tangerine.

  • allanallan Posts: 61,762Questions: 1Answers: 10,111 Site admin
    Answer ✓

    It may be because I was downloading it through the 'package builder' and not the direct download link

    Yes. The download builder only includes the Javascript and CSS files. It doesn't include any extra PHP such as the server-side processing demo script. For that you would need to download the release package.

    As for my technical issue, the client-side GET works fine, but it looks like the backend php doesn't handle the sSearch

    Is your server-side using POST or GET? If you are using the Editor PHP libraries (I'm not clear if that is the case or not), then most likely you are using ->process( $_POST ) so GET parameters would be ignored.

    This example shows server-side processing being used with the Editor PHP libraries.

    Allan

  • jacob.steinbergerjacob.steinberger Posts: 86Questions: 18Answers: 1

    Dag nabbit. So simple, and that's exactly the problem. I was just walking through the code and made it to _get, and was trying to figure out why all the calls to _get didn't have a second variable (ie., http).

    Thanks Allan, so obvious after the fact.

This discussion has been closed.