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 »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Duplicates in civicrm_discounts table cause "is not of type String" error
Pages: [1]

Author Topic: Duplicates in civicrm_discounts table cause "is not of type String" error  (Read 645 times)

pmusaraj

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.0.4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Duplicates in civicrm_discounts table cause "is not of type String" error
October 19, 2011, 06:55:53 am
I recently upgraded from 4.0.4 to 4.0.6 and I am having an error with event discounts by date. As soon as I add a discount to an event, the registration page for that event gives this error:

Quote
Sorry. A non-recoverable error has occurred.
is not of type String

When I look at the civicrm_discount table, it has two entries with the same start date and end date for that event. I'm guessing that is the reason the code fails, but I don't know how to fix it.

Another side effect, is that after saving, upon returning to the event edit screen, there are two rows under discounts, with the same start and end date. Deleting the duplicate row doesn't work, unchecking the discounts box doesn't work either.

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: Duplicates in civicrm_discounts table cause "is not of type String" error
October 19, 2011, 03:09:49 pm

can you reproduce this on our demo server. If so, please file an issue. If you can investigate and figure out a patch for this that would be great :)

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

pmusaraj

  • I’m new here
  • *
  • Posts: 4
  • Karma: 0
  • CiviCRM version: 4.0.4
  • CMS version: Drupal 7
  • MySQL version: 5
  • PHP version: 5.3
Re: Duplicates in civicrm_discounts table cause "is not of type String" error
November 08, 2011, 12:36:44 pm
Hi Donald,
I cannot reproduce this on the demo server. I am suspecting this is related to the upgrade from 4.0.4 to 4.0.6. I have emptied the tables and tried to look at what could possibly cause this, but I can't figure it out. I'm not much of a programmer, clearly.  :)

What I did find is that it doesn't happen on the first time I add a discount, it happens once I edit the event. I.e. on a second save. For some reason, it seems to create a second, redundant entry. I have attached a screenshot, for a better idea of what happens in backend.

Can I do anything else to help with this?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Duplicates in civicrm_discounts table cause "is not of type String" error

This forum was archived on 2017-11-26.