Skip to content

Fix Extension Installation And Upgrade Process

Overview

Currently there is a scenario that is described below in which the installation or upgrade process results in an error "Financial Type for Price Field Option is either disabled or does not exist". This pr fixes the error for this scenario.

During the installation or upgradation, this extension tries to create or update price field and price field value entities. The price field value entity depends on a particular financial type. The price field value that this extension tries to create or update depends on Donation financial type. But the problem is that Donation financial type can either be deleted or disabled as it is not a reserved financial type and in this case the civicrm throws the above mentioned error while saving the price field value entity.

This pr fixes the issue by changing the price field value creation in a way that price field value creation uses any first active financial type if Donation is disabled or deleted.

Merge request reports

Loading