I was just able to successfully install this on a D7 w/ 5.46alpha. When I tried installing on D9 w/ 5.44, I got the following stacktrace.
When I traced it down, it seems like the issue is with creating the option values from within CustomField.create
. The option group and values are created, but not saved to the database due to being in a transaction. When the custom field is created, it fails because the option_group_id
references a non-existent record.
I'm reporting it just for other folks to find - I'm going to manually create the fields and move on.
#1 /home/jon/local/mysite/web/sites/all/civicrm-custom/extensions/nz.co.fuzion.relatedpermissions/CRM/Relatedpermissions/Upgrader.php(95): CRM_Relatedpermissions_Upgrader->create_custom_fields()
#2 /home/jon/local/mysite/web/sites/all/civicrm-custom/extensions/nz.co.fuzion.relatedpermissions/CRM/Relatedpermissions/Upgrader/Base.php(306): CRM_Relatedpermissions_Upgrader->install()
#3 /home/jon/local/mysite/web/sites/all/civicrm-custom/extensions/nz.co.fuzion.relatedpermissions/relatedpermissions.civix.php(131): CRM_Relatedpermissions_Upgrader_Base->onInstall()
#4 /home/jon/local/mysite/web/sites/all/civicrm-custom/extensions/nz.co.fuzion.relatedpermissions/relatedpermissions.php(30): _relatedpermissions_civix_civicrm_install()
#5 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Extension/Manager/Module.php(61): relatedpermissions_civicrm_install()
#6 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Extension/Manager/Module.php(33): CRM_Extension_Manager_Module->callHook(Object(CRM_Extension_Info), 'install')
#7 /home/jon/local/mysite/vendor/civicrm/civicrm-core/CRM/Extension/Manager.php(293): CRM_Extension_Manager_Module->onPreInstall(Object(CRM_Extension_Info))
#8 /home/jon/local/mysite/vendor/civicrm/civicrm-core/api/v3/Extension.php(42): CRM_Extension_Manager->install(Array)
#9 /home/jon/local/mysite/vendor/civicrm/civicrm-core/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_extension_install(Array)
#10 /home/jon/local/mysite/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(149): Civi\API\Provider\MagicFunctionProvider->invoke(Array)
#11 /home/jon/local/mysite/vendor/civicrm/civicrm-core/Civi/API/Kernel.php(81): Civi\API\Kernel->runRequest(Array)
#12 /home/jon/local/mysite/vendor/civicrm/civicrm-core/api/api.php(22): Civi\API\Kernel->runSafe('Extension', 'install', Array)
#13 phar:///usr/local/bin/cv/src/Command/BaseCommand.php(49): civicrm_api('Extension', 'install', Array)
#14 phar:///usr/local/bin/cv/src/Command/ExtensionEnableCommand.php(91): Civi\Cv\Command\BaseCommand->callApiSuccess(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 'Extension', 'install', Array)
#15 phar:///usr/local/bin/cv/vendor/symfony/console/Command/Command.php(257): Civi\Cv\Command\ExtensionEnableCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 phar:///usr/local/bin/cv/vendor/symfony/console/Application.php(850): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 phar:///usr/local/bin/cv/vendor/symfony/console/Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(Civi\Cv\Command\ExtensionEnableCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 phar:///usr/local/bin/cv/src/Application.php(46): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 phar:///usr/local/bin/cv/vendor/symfony/console/Application.php(124): Civi\Cv\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 phar:///usr/local/bin/cv/src/Application.php(15): Symfony\Component\Console\Application->run()
#21 phar:///usr/local/bin/cv/bin/cv(27): Civi\Cv\Application::main('phar:///usr/loc...')
#22 /usr/local/bin/cv(14): require('phar:///usr/loc...')
#23 {main}