Hi there, I think you miss understand => “Finally I have managed to make the library work” this mean I didn’t get the “Script expired” message but I can’t get this to work, the same issue where the JSON is printed out to a popup window still happening so nothing is really fixed I am still need some support to make this work otherwise my boss won’t never buy something that doesn’t work with our system.
Thanks
Finally I have managed to make the library work and this is how the code looks like currently:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
public function indexAction() { $CODE_PATH = 'PHPSuito/'; require_once $CODE_PATH.'jqGrid.php'; require_once $CODE_PATH.'jqGridRender.php'; require_once $CODE_PATH.'DBdrivers/jqGridPdo.php'; $adapter = Zend_Registry::get('dbAdapter'); $grid = new jqGridRender($adapter->getConnection()); $grid->SelectCommand = 'SELECT * FROM companies'; $grid->dataType = 'json'; $grid->setColModel(); $grid_url = Zend_Controller_Front::getInstance()->getRequest()->getControllerName().'/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName(); $grid->setUrl($grid_url); $grid->setGridOptions(array( "rownumbers" => true, "rownumWidth" => 35, "rowNum" => 10, "sortname" => "companies_id", "toppager" => true, "rowList" => array(10, 20, 50), )); $grid->setColProperty("companies_id", array("label" => "ID", "width" => 60)); $grid->setColProperty("created_date", array( "formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "m/d/Y") ) ); $grid->navigator = true; $grid->setNavOptions( 'navigator', array("cloneToTop" => true, "add" => false, "edit" => false, "del" => false, "excel" => false) ); $grid->renderGrid('#grid', '#pager', true, null, null, true, true); } |
There is not “echo” or “print_f” or any other output statement around meaing the code you’re seeing here is the code being executed. The template is completely empty as well.
No matter what the error still happening and for some reason the response comes as a whole HTML page and not a JSON, why? no ideas!!
Any other clue or test you want me to perform?
That’s exactly what I did but still not working :-\
I can’t test anymore apparently, I got this “Script expired” message when I try to execute the code 🙁
There is not such thing on my code, what you’re seeing here is exactly what I currently have in my class
Hi, by setting:
$grid->logtofile = false;
the error above dissapear but I am still getting an issue. Check below:

Ok, I’ve discovered how to fix the previous issue by setting:
|
1 2 3 |
$grid->logtofile = false; |
But the error still and I can see the following on the debug output:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Array ( [0] => Array ( [time] => 2017-02-01 14:07:44 [query] => SELECT COUNT(*) AS COUNTR FROM companies [data] => [types] => [fields] => [primary] => [input] => ) [1] => Array ( [time] => 2017-02-01 14:07:44 [query] => SELECT * FROM companies ORDER BY companies_id asc LIMIT 0, 10 [data] => [types] => [fields] => [primary] => [input] => ) ) |
I am not sure what this means or what I’m missing, could you help?
Hi there, I am getting an error when the grid is being render and I don’t know why or how to trace it. This is how my code looks like:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
public function indexAction() { $CODE_PATH = 'PHPSuito/'; require_once $CODE_PATH.'jqGrid.php'; require_once $CODE_PATH.'jqGridRender.php'; require_once $CODE_PATH.'DBdrivers/jqGridPdo.php'; $adapter = Zend_Registry::get('dbAdapter'); $grid = new jqGridRender($adapter->getConnection()); $grid->SelectCommand = 'SELECT * FROM companies'; $grid->dataType = 'json'; $grid->setColModel(); $grid_url = Zend_Controller_Front::getInstance()->getRequest()->getControllerName().'/'.Zend_Controller_Front::getInstance()->getRequest()->getActionName(); $grid->setUrl($grid_url); $grid->setGridOptions(array( "rownumbers" => true, "rownumWidth" => 35, "rowNum" => 10, "sortname" => "companies_id", "toppager" => true, "rowList" => array(10, 20, 50), )); $grid->setColProperty("companies_id", array("label" => "ID", "width" => 60)); $grid->setColProperty("created_date", array( "formatter" => "date", "formatoptions" => array("srcformat" => "Y-m-d H:i:s", "newformat" => "m/d/Y") ) ); $grid->navigator = true; $grid->setNavOptions( 'navigator', array("cloneToTop" => true, "add" => false, "edit" => false, "del" => false, "excel" => false) ); $grid->renderGrid('#grid', '#pager', true, null, null, true, true); } |
Then the JSON returned is something like:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
{ "records": "1", "page": 1, "total": 1, "rows": [ { "companies_id": "1", "parent_companies_id": "0", "client_of_companies_id": "0", "asset_locations_id": null, "companies_name": "container", "companies_number": "000001", "companies_url": "", "location_number": null, "statuses_id": "1", "managed": "0", "created_date": "0000-00-00 00:00:00", "created_by_users_id": "0", "updated_date": "2017-01-16 15:53:35", "updated_by_users_id": null, "host_companies_id": "0", "host_company": "0", "view_pricing": "1", "is_demo": "0", "expired_date": "0000-00-00", "companies_region_name": null, "companies_location_name": null, "companies_address1": null, "companies_address2": null, "companies_city": null, "companies_state_name": null, "companies_state_abbr": null, "companies_country_name": null, "companies_country_abbr": null, "companies_logo": "default.jpg", "companies_zip": null, "internal_name": null, "internal_number": null, "phone": null, "fax": null, "number_of_subcompanies": "0", "company_type": null, "companies_header": "default_header.jpg", "send_alert": "1", "create_asset": "1", "create_servicepak": "1", "create_contract": "1", "alert_section_1": null, "alert_section_2": null, "group_companies_id": "0", "email": null, "VAT": null, "CustomerSiteID": null, "DistributorID": null } ] } Can not write to log! |
What log is that? How I disable such feature? I don’t need to write anything
Suppose I can extract the connection information from $dbAdapter->conn can I use Zend_Db_Select or Zend_Db_Table for build proper SQL queries? Could you investigate this part with your team and let me know? I don’t want to pay for something I can’t use in this project so I want to be sure I can use it
Thanks in advance
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top