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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • 2.2.0: Error when deleting a price option from a price set
Pages: [1]

Author Topic: 2.2.0: Error when deleting a price option from a price set  (Read 2135 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
2.2.0: Error when deleting a price option from a price set
March 16, 2009, 10:57:11 pm
When deleting a price-option from a price-set (task=civicrm/admin/price/field/option) I get the following error:

Quote
Sorry. A non-recoverable error has occurred.

civicrm_event_page is not supported in PriceSet::usedBy()

Return to home page.

I tried duplicating this on the Drupal demo but this failed.

Looking at the code for PriceSet::getUsedBy() in CRM/Core/BAO/PriceSet.php I notice the following at line 165 ...

Code: [Select]
$queryString = "SELECT entity_table, entity_id FROM civicrm_price_set_entity ";
When I run that query I get 5 rows returned where the entity_table column is set to 'civicrm_event_page'.

It appears these rows were not updated during the data conversion to 2.2.0. What should I do?

Thanks,
Ken

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: 2.2.0: Error when deleting a price option from a price set
March 17, 2009, 09:38:44 am

can you change the rows via sql to 'civicrm_event', you might also need to tweak the entity_id to match civicrm_event id

If this works, can you please file an issue and link to this forum. We'll fix the upgrade script for 2.2.1

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

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: 2.2.0: Error when deleting a price option from a price set
March 18, 2009, 12:12:16 am
Thanks, Lobo.

I will do as you suggest and report the results.

However, I'm concerned that some urgent action may be required!

The event Id's and the event_page Id's don't always line up - so people who do the upgrade and don't keep a backup of their original database are in trouble. Even those who do keep a backup may have trouble getting the data out of their backup.

When I run this query ...

Code: [Select]
SELECT `civicrm_event_page`.`event_id` , `civicrm_event_page`.`id`
FROM civicrm_event_page, civicrm_price_set_entity
WHERE `civicrm_event_page`.`id` = `civicrm_price_set_entity`.`entity_id`
AND `civicrm_price_set_entity`.`entity_table` = 'civicrm_event_page'
ORDER BY `civicrm_event_page`.`event_id` ASC

... I get the following result ...

Code: [Select]
event_id id
389 389
390 390
391 391
401 400
409 407

... showing the event Ids and event-page Ids are not always equal.

Ken

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: 2.2.0: Error when deleting a price option from a price set
March 18, 2009, 01:07:29 am
Ken:

Can you file an issue for this.

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: 2.2.0: Error when deleting a price option from a price set
March 18, 2009, 06:18:27 am

i'm not sure what we can do for sites already upgraded (since event_page and event_page_id are different). We will probably change the reference automatically and ask the admin to manually verify and fix the price sets for each event

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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 2.2 Release Testing »
  • 2.2.0: Error when deleting a price option from a price set

This forum was archived on 2017-11-26.