1

Have the following error trying to upgrade the DB, any help would be appreciated:

$ drush civicrm-upgrade-db
Exception: "A fatal error was triggered: One of parameters  (value: ) is not of the type Integer"
#0 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Utils\Type.php(362): CRM_Core_Error::fatal("One of parameters
(value: ) is not of the type Integer")
#1 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Core\DAO.php(1247): CRM_Utils_Type::validate(NULL, "Integer")
#2 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Core\DAO.php(1166): CRM_Core_DAO::composeQuery("UPDATE civicrm_
option_value\n        SET value = '{\"paper-size\":\"a4\",\"or...", (Array:1), TRUE)
#3 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Upgrade\Incremental\php\FourFour.php(176): CRM_Core_DAO::execut
eQuery("UPDATE civicrm_option_value\n        SET value = '{\"paper-size\":\"a4\",\"or...", (Array:1))
#4 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Upgrade\Form.php(683): CRM_Upgrade_Incremental_php_FourFour->up
grade_4_4_1("4.4.1", "4.3.4", "4.6.5")
#5 [internal function](): CRM_Upgrade_Form::doIncrementalUpgradeStep(Object(CRM_Queue_TaskContext), "4.4.1", "4.3.4", "4
.6.5", "C:\Users\Miles\AppData\Local\Temp\civA92E.tmp")
#6 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Queue\Task.php(88): call_user_func_array((Array:2), (Array:5))
#7 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Queue\Runner.php(213): CRM_Queue_Task->run(Object(CRM_Queue_Tas
kContext))
#8 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Queue\Runner.php(168): CRM_Queue_Runner->runNext()
#9 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Upgrade\Headless.php(67): CRM_Queue_Runner->runAll()
#10 C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\drupal\drush\civicrm.drush.inc(689): CRM_Upgrade_Headless->run()
#11 [internal function](): drush_civicrm_upgrade_db()
#12 C:\ProgramData\Drush\includes\command.inc(362): call_user_func_array("drush_civicrm_upgrade_db", (Array:0))
#13 C:\ProgramData\Drush\includes\command.inc(214): _drush_invoke_hooks((Array:29), (Array:0))
#14 [internal function](): drush_command()
#15 C:\ProgramData\Drush\includes\command.inc(182): call_user_func_array("drush_command", (Array:0))
#16 C:\ProgramData\Drush\drush.php(92): drush_dispatch((Array:29))
#17 C:\ProgramData\Drush\drush.php(61): _drush_bootstrap_and_dispatch()
#18 C:\ProgramData\Drush\drush.php(16): drush_main()
#19 {main}
WD php: Exception: A fatal error was triggered: One of parameters  (value: ) is not of the type Integer in       [error]

CRM_Core_Error::fatal() (line 328 of C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Core\Error.php).
Exception: A fatal error was triggered: One of parameters  (value: ) is not of the type Integer in CRM_Core_Error::fatal
() (line 328 of C:\xampp\htdocs\ma\html\sites\all\modules\civicrm\CRM\Core\Error.php).
Drush command terminated abnormally due to an unrecoverable error.                                               [error]
1

The code that is failing is trying to update a name_badge format. It looks like 3 new types of labels were added at some point but one of them had an issue and this code is updating that one.

It looks for the id of name_badge in the civicrm_option_group table. It uses that in this sql

 UPDATE civicrm_option_value
 SET value = '{$dimension}'
 WHERE option_group_id = %1 AND name = 'Fattorini Name Badge 100x65'

I'm guessing for some reason the array that feeds %1 is not an integer.

So what to do? You can, as link in the comment suggest, comment out the update. In this case in civicrm/CRM/Upgrade/Incremental/php/FourFour.php around line 176 comment out this code:

CRM_Core_DAO::executeQuery($query, array(1 => array($ogID, 'Integer')));

You might get the problem again with another upgrade.

You might check to see if the following sql comes back with anything

SELECT * FROM `civicrm_option_group` WHERE name = 'name_badge'

I think it will. If so, use the id in the following query.

SELECT name FROM civicrm_option_value WHERE option_group_id =

I think you should get back four rows

Avery 5395
A6 Badge Portrait 150x106
Fattorini Name Badge 100x65
Hanging Badge 3-3/4" x 4-3"/4

If you don't get anything back from the civicrm_option_group` WHERE name = 'name_badge' query check to see if the civicrm_option_value exists

SELECT option_group_id, 
       name 
FROM   civicrm_option_value 
WHERE  name in ('Avery 5395',
                'A6 Badge Portrait 150x106',
                'Fattorini Name Badge 100x65',
                'Hanging Badge 3-3/4" x 4-3"/4')

I'm not sure how recommended this is but you can just add the missing name badge row to the civicrm_option_group table.

INSERT INTO `civicrm_option_group` (`name`, `title`, `is_reserved`, `is_active`, `is_locked`) 
                        VALUES ('name_badge','Name Badge Format',true, true, false)

Now if you got any of the four option values back you'll need to change their option_group_id to match the id of the row you added with the insert.

  • Thanks Paul, I've had a look and there's no 'name_badge' row in that table, the closest is 'event_badge'. – mjcarter Aug 15 '15 at 1:16
  • I'm not sure if just editing the answer will make it pop back up for you. I added some stuff at the end. I will be backpacking away from electronic for the next four day so... – Paul-Tahoe Aug 15 '15 at 3:13
  • I ran the insert query but got an error because the is_locked column doesn't exist - worked ok without that column specified. I got an empty result set with the SELECT statement. Yesterday I tried running the upgrade after commenting out line 9 and that failed because my civicrm_line_item table doesn't have a contribution_id column - not sure if there is something going on with missing columns in the DB, though I found this github.com/civicrm/civicrm-core/pull/3240 which suggests that column was added after 4.34 – mjcarter Aug 16 '15 at 1:59
  • I ran the schema changes there manually on the DB, but then got an error 'already exists' related to this issues.civicrm.org/jira/browse/CRM-14894 - I applied the schema update there and the upgrade completed. However, there was a WSOD after upgrade related to this drupal.org/node/2363903 - I applied the schema update and was able to load Drupal pages of the site, but there is still a WSOD with Civi, looking at the logs it's due to a missing table error (civicrm_recurring_entity). – mjcarter Aug 17 '15 at 3:54
  • It's as if the upgrade process isn't doing the schema updates. Could this be related to Civi being installed in a combined DB with Drupal rather than in it's own database? At the bottom of the Drupal settings.php I've spotted a bunch of lines starting like this $databases['default']['default']['prefix']= array( 'civicrm_acl' => 'dbname.', 'civicrm_acl_cache' => 'dbname.', 'civicrm_acl_contact_cache' => 'dbname.', ... – mjcarter Aug 17 '15 at 3:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.