editor warning: JSON formatting error

editor warning: JSON formatting error

kinghenry7kinghenry7 Posts: 6Questions: 0Answers: 0
edited March 2014 in Editor
http://pytools.webfactional.com/capstoneTemp/DataTablesEditor/PROPERTY.html

I an running the demo generated code from the DataTablesEditor and it does not seem to be loading. I think my server is pointing to php5.4 as I think editor needs >=php5.3 to run properly. I am pretty sure all my table names and fields are accurate as I have set up the non-editor datatables here:

http://pytools.webfactional.com/capstoneTemp/

using server side php script as mentioned in another demonstration page from datatables.

Hoping to get a response soon, need this for a project I am working on for a client.

Replies

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    The column sequences in your two versions are not the same; but I can't say if that is the complete answer.
  • allanallan Posts: 63,530Questions: 1Answers: 10,473 Site admin
    Hi,

    Thanks for the links!

    The data being returned from the server is stating:

    [code]


    Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list'' in /home/pytools/webapps/htdocs/capstoneTemp/DataTablesEditor/php/lib/Database/Driver/Mysql/Query.php:98
    Stack trace:
    [/code]

    So I guess your primary key for the table is not `id` ? You can use the third parameter of the Editor PHP class to tell the library what the primary key is - `id` is just the default:

    [code]
    Editor::inst( $db, 'myTable', 'myPkey' )
    [/code]

    Let us know how you get on with that!

    Allan
  • kinghenry7kinghenry7 Posts: 6Questions: 0Answers: 0
    oh wow thank you so much. It has made serious progress but now the alert pops up a new error:

    Requested unknown parameter 'SPOST' from the data source for row 0

    will be looking into this now. THANK YOU!
  • kinghenry7kinghenry7 Posts: 6Questions: 0Answers: 0
    yeah so i just regenerated the code i was asking for some columns that I didn't need. It seems to be working really well now. will be wrapping it in bootstrap according to the tutorial i found on your site as well. thanks so much for the quick feedback allan!
  • allanallan Posts: 63,530Questions: 1Answers: 10,473 Site admin
    Great to hear! :-)

    Allan
This discussion has been closed.