CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • CiviEvent non-recoverable error on new event wizard
Pages: [1]

Author Topic: CiviEvent non-recoverable error on new event wizard  (Read 2571 times)

EdGeraghty

  • Guest
CiviEvent non-recoverable error on new event wizard
September 02, 2007, 03:37:30 pm
Posted this to the CiviMail list by mistake, moving into the forum.

Hello,

    I have been working with CiviCRM version 1.8.10954 anerror when
creating a new event. After pressing the "Continue" button on the "Event
Fees (step 3 of 4)" page of the New Event Wizard, I get the following error.

Sorry. A non-recoverable error has occurred. Database Error Code: Field
'default_fee_id' doesn't have a default value, 1364

Array ( [callback] => Array ([0] => CRM_Core_Error [1] => handle )

   
Code: [Select]
=> -1
   [message] => DB Error: unknown error
   [mode] => 16
   [debug_info] => INSERT INTO civicrm_event_page (event_id ) VALUES ( 6 )
[nativecode=1364 ** Field 'default_fee_id' doesn't have a default value]
   [type] => DB_Error
   [user_info] => INSERT INTO civicrm_event_page (event_id ) VALUES ( 6 )
[nativecode=1364 ** Field 'default_fee_id' doesn't have a default value]
   [to_string] => [db_error: message="DB Error: unknown error" code=-1
mode=callback callback=CRM_Core_Error:
:handle prefix="" info="INSERT INTO
civicrm_event_page (event_id ) VALUES ( 6 )  [nativecode=1364 ** Field
'default_fee_id' doesn't have a default value]"]
)

Apparently the event row is created in the civicrm_event table but no rows
are created  in the civicrm_event_page table.  I have been digging through
the code to see where the problem is but I haven't figured all the details
of CiviCRM yet. The error is correct as the default_fee_id is NOT NULL and
no parameters are being inserted for that field.

CREATE TABLE civicrm_event_page (
    default_fee_id int unsigned NOT NULL   COMMENT 'FK to
civicrm_custom_option.',


Any pointers would be greatly appreciated. If people think this is a bug, I
can open an issue.


Ed Geraghty

EdGeraghty

  • Guest
Re: CiviEvent non-recoverable error on new event wizard
September 02, 2007, 03:42:25 pm
Normally I don't reply to myself but I was asked to supply additional information.

 I was not able to replicate this problem creating an event, on the http://demo.civicrm.org site. I am running the following version of MySQL locally:

C:\>mysql -V
mysql  Ver 14.12 Distrib 5.0.27, for Win32 (ia32)
C:\>

Ed Geraghty
« Last Edit: September 02, 2007, 05:29:41 pm by EdGeraghty »

EdGeraghty

  • Guest
Re: CiviEvent non-recoverable error on new event wizard
September 03, 2007, 07:29:54 am
Yet another reply to myself. Seems the default in 5.0.27 is now "Strict Mode" that enforces the constraints on field values. Do you know what version and if strict mode is enabled on the MySQL server for http://demo.civicrm.org?

More information on SQL modes http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html

C:\>mysql -u civicrm -p civicrm
Enter password: ********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8013 to server version: 5.0.27-community-nt

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SELECT @@global.sql_mode;
+----------------------------------------------------------------+
| @@global.sql_mode                                              |
+----------------------------------------------------------------+
| STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+----------------------------------------------------------------+
1 row in set (0.00 sec)

mysql>

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviEvent non-recoverable error on new event wizard
September 03, 2007, 09:39:14 am
demo is running on mysql  Ver 14.12 Distrib 5.0.16, for unknown-freebsd5.3 (i386) using readline 5.0

mysql> SELECT @@global.sql_mode;
+-------------------+
| @@global.sql_mode |
+-------------------+
|                   |
+-------------------+

HTH

kurund
Found this reply helpful? Support CiviCRM

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviEvent non-recoverable error on new event wizard
September 03, 2007, 11:42:16 am

Ed:

This is a bug with CiviCRM. We should work properly with STRICT_TRANS_MODE enabled. Can you please file an issue against 1.8 and we'll get it fixed before the next release

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviEvent non-recoverable error on new event wizard
September 03, 2007, 12:25:29 pm

I checked the code and unfortunately the fix is non-trivial and might involve some database changes. So we'll fix this for CiviCRM v2.0. I've filed an issue under: http://issues.civicrm.org/jira/browse/CRM-2251

Going forward, the development team will develop with the below sql_mode

mysql> SET global sql_mode='STRICT_TRANS_TABLES';

A workaround for this is to set the sql_mode to empty for v1.8 and before

lobo




A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • CiviEvent non-recoverable error on new event wizard

This forum was archived on 2017-11-26.