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) »
  • default_fee_id and default_discount_fee_id not being set in 4.2.x?
Pages: [1]

Author Topic: default_fee_id and default_discount_fee_id not being set in 4.2.x?  (Read 354 times)

chiebert

  • I post occasionally
  • **
  • Posts: 50
  • Karma: 1
  • CiviCRM version: 4.3
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
default_fee_id and default_discount_fee_id not being set in 4.2.x?
December 03, 2012, 01:28:09 pm
I just upgraded a test site to 4.2.6 (from 4.1.x) and I'm noticing that now the default_fee_id and default_discount_fee_id fields are not being populated in the civicrm_event table when I configure those two things through the UI for a new event.

I think I just replicated this (mis)behaviour on http://drupal.demo.civicrm.org/ by creating a new event, configuring a default fee and a default discount fee, and then trying to 'get' the event details via the API explorer. According the the API docs, a 'get' should return those two fields, but in this case nothing was returned. This matches my experience here on my dev, where those fields remain NULL for new events.

What's strange is that when I return to edit the event fees via the UI, the correct fees are there, and still marked as default. And if I configure an online payment page, the correct discount fee is shown. Unfortunately, this isn't good enough, since I have custom code that implements hook_civicrm_pre() and uses the API to get the default fee and default discount fee, if set. Since this isn't set (according to the API results), that test loop fails and I get the wrong behaviour.

So: is this a bug? or has the API (and, I assume, the schema) changed?

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: default_fee_id and default_discount_fee_id not being set in 4.2.x?
December 03, 2012, 04:37:45 pm

those fields are now obsolete (i suspect). We should plan on getting rid of those columns in a future release

all amounts have now moved to pricesets and the default values are stored there

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 »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • default_fee_id and default_discount_fee_id not being set in 4.2.x?

This forum was archived on 2017-11-26.