Open litody opened 11 years ago
Please use a debug tool as FireBug and report error details, row number, type of error, etc. Thanks
it doesn't give a row number. It is my server returning 500 to the ajax call and the message is given above on the two POST return messages. The first from javascript console and the second what shows in apache logs
tried another console and got more info:
Response Headers Cache-Control no-cache Connection close Content-Length 2414 Content-Type text/html; charset=UTF-8 Date Fri, 04 Jan 2013 13:49:47 GMT Server Apache/2.2.11 (Win32) DAV/2 modgeoip/1.2.7 Request Headers Accept application/json, text/javascript, /_; q=0.01 Accept-Encoding gzip, deflate Accept-Language en-us,en;q=0.5 Connection keep-alive Content-Length 145 Content-Type application/x-www-form-urlencoded; charset=UTF-8 Cookie laravel_session=c38821bcb1c1f54608a5428348b4fd956b5b1acf%2B6nH7tRGBRVbEpz7suMOXXK2aDMmpPgUbJefpRPya Host localhost User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1 X-Requested-With XMLHttpRequest
HTML Unhandled Exception Message:
SQLSTATE[HY000]: General error: 1364 Field 'preview' doesn't have a default value
SQL: INSERT INTO pongo_pages
(author_id
, lang
, name
, parent_id
, slug
, role_id
, role_level
, access_level
, extra_id
, order_id
, is_home
, is_valid
, template
, header
, layout
, footer
, updated_at
, created_at
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Bindings: array ( 0 => 1, 1 => 'en', 2 => 'top', 3 => '0', 4 => '/top', 5 => '1', 6 => 50, 7 => '0', 8 => '0', 9 => 1000000, 10 => 0, 11 => 1, 12 => 'default', 13 => 'default', 14 => 'default', 15 => 'default', 16 => '2013-01-04 13:49:47', 17 => '2013-01-04 13:49:47', )
Location:
G:\xxx\laravel\laravel\database\connection.php on line 263
POST
back_url #
is_valid 1
page_access 0
page_extra 0
page_id
page_lang en
page_name top
page_owner 1
page_parent 0
page_parent_slug
page_slug top
Source
page_id=&page_lang=en&page_name=top&page_parent=0&page_slug=top&page_parent_slug=&page_extra=0&page_owner=1&page_access=0&is_valid=1&back_url=%23
Response:
SQLSTATE[HY000]: General error: 1364 Field 'preview' doesn't have a default value SQL: INSERT INTO `pongo_pages` (`author_id`, `lang`, `name`, `parent_id`, `slug`, `role_id`, `role_level`, `access_level`, `extra_id`, `order_id`, `is_home`, `is_valid`, `template`, `header`, `layout`, `footer`, `updated_at`, `created_at`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Bindings: array ( 0 => 1, 1 => 'en', 2 => 'top', 3 => '0', 4 => '/top', 5 => '1', 6 => 50, 7 => '0', 8 => '0', 9 => 1000000, 10 => 0, 11 => 1, 12 => 'default', 13 => 'default', 14 => 'default', 15 => 'default', 16 => '2013-01-04 13:49:47', 17 => '2013-01-04 13:49:47', )
G:\xxx\laravel\laravel\database\connection.php on line 263
#0 G:\xxx\laravel\laravel\database\connection.php(183): Laravel\Database\Connection->execute('INSERT INTO `po...', Array) #1 G:\xxx\laravel\laravel\database\query.php(823): Laravel\Database\Connection->query('INSERT INTO`po...', Array) #2 [internal function]: Laravel\Database\Query->insert_get_id(Array, 'id') #3 G:\xxx\laravel\laravel\database\eloquent\query.php(267): call_user_func_array(Array, Array) #4 G:\xxx\laravel\laravel\database\eloquent\model.php(402): Laravel\Database\Eloquent\Query->__call('insert_get_id', Array) #5 G:\xxx\laravel\laravel\database\eloquent\model.php(402): Laravel\Database\Eloquent\Query->insert_get_id(Array, 'id') #6 G:\xxx\laravel\bundles\cms\controllers\ajax_page.php(140): Laravel\Database\Eloquent\Model->save() #7 [internal function]: Cms_Ajax_Page_Controller->post_save_settings() #8 G:\xxx\laravel\laravel\routing\controller.php(325): call_user_func_array(Array, Array) #9 G:\xxx\laravel\laravel\routing\controller.php(285): Laravel\Routing\Controller->response('save_settings', Array) #10 G:\xxx\laravel\laravel\routing\controller.php(165): Laravel\Routing\Controller->execute('save_settings', Array) #11 G:\xxx\laravel\laravel\routing\route.php(153): Laravel\Routing\Controller::call('cms::ajax_page@...', Array) #12 G:\xxx\laravel\laravel\routing\route.php(124): Laravel\Routing\Route->response() #13 G:\xxx\laravel\laravel\laravel.php(167): Laravel\Routing\Route->call() #14 G:\xxx\laravel\public\index.php(34): require('G:\xxx\laravel...') #15 {main}
Still not working, same exception above.
When trying to insert a new page the settings page accepts values and pressing save validates them. But the call to server fails with an internal server error 500
POST http://localhost/laravel/public/cms/ajax_page/save_settings 500 (Internal Server Error)
apache log shows:
POST /laravel/public/cms/ajax_page/save_settings HTTP/1.1" 500 "http://localhost/laravel/public/cms/page/new/en"
I am running windows 7 and apache with PHP 5.3.4. My localhost is in an apache virtualhost. I have no idea whether this is a pongocms caused error or my server configuration. Are there any required apache modules for ajax calls to work correctly or is it something else.