Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-20769 Add in columns to support customising profile buttons #10940

Merged
merged 1 commit into from
Sep 5, 2017

Conversation

seamuslee001
Copy link
Contributor

@seamuslee001 seamuslee001 commented Sep 5, 2017

Overview

This adds columns to the civicrm_uf_group table to support customising profile buttons

@eileenmcnaughton @agileware this has been split off from the other parts of the profile button cusomisation PR in an effort to get this part through, all this contains is the database changes


@eileenmcnaughton
Copy link
Contributor

Ok - I think this change is agreed in principle & it makes sense to get this part merged before it goes stale again. I wondered if a field default make sense but registration_link_text does not have one, & that is the prototype for this really.

I'm going to merge - it would be nice if @mlutfy would test the upgrade after the rc is cut since it does touch on adding fields for l10n

@eileenmcnaughton eileenmcnaughton merged commit 079bd33 into civicrm:master Sep 5, 2017
@eileenmcnaughton eileenmcnaughton deleted the CRM-20769-fields branch September 5, 2017 02:32
@litespeedmarc
Copy link
Contributor

I've upgraded a site that has i18n. Simple search on "contact" results into this:

(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => exceptionHandler
        )

    [code] => -19
    [message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`,
FROM civicrm_uf_group_en_CA a
WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1")
LIMIT 25
OFFSET 0
 [nativecode=1054 ** Unknown column 'a.cancel_button_text' in 'field list']
    [type] => DB_Error
    [user_info] => SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`, a.title as `title`, a.description as `description`, a.help_pre as `help_pre`, a.help_post as `help_post`,
FROM civicrm_uf_group_en_CA a
WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1")
LIMIT 25
OFFSET 0
 [nativecode=1054 ** Unknown column 'a.cancel_button_text' in 'field list']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::exceptionHandler prefix="" info="SELECT a.id as `id`, a.is_active as `is_active`, a.group_ty
FROM civicrm_uf_group_en_CA a
WHERE (a.name IN ("new_individual", "new_organization", "new_household")) AND (a.is_active = "1")
LIMIT 25
OFFSET 0
 [nativecode=1054 ** Unknown column 'a.cancel_button_text' in 'field list']"]
)


Oct 01 10:55:24  [info] $backTrace = #0 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/Error.php(945): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/PEAR.php(921): CRM_Core_Error::exceptionHandler(Object(DB_Error))
#2 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/DB.php(985): PEAR_Error->__construct("DB Error: no such field", -19, 16, (Array:2), "SELECT a.id as `id`, a.is_active as `is_act
#3 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/PEAR.php(575): DB_Error->__construct(-19, 16, (Array:2), "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `grou
#4 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -19, 16, (Array:2), "SELECT a.id as `id`, a.is_active as `is_active`,
#5 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/DB/common.php(1905): PEAR->__call("raiseError", (Array:7))
#6 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/DB/mysqli.php(933): DB_common->raiseError(-19, NULL, NULL, "SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `gr
#7 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/DB/mysqli.php(403): DB_mysqli->mysqliRaiseError()
#8 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/DB/common.php(1216): DB_mysqli->simpleQuery("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...")
#9 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/DB/DataObject.php(2446): DB_common->query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...")
#10 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/packages/DB/DataObject.php(1635): DB_DataObject->_query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`..
#11 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/DAO.php(362): DB_DataObject->query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...")
#12 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/DAO.php(1311): CRM_Core_DAO->query("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`...", TRUE)
#13 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/Civi/API/SelectQuery.php(143): CRM_Core_DAO::executeQuery("SELECT a.id as `id`, a.is_active as `is_active`, a.group_type as `group_type`
#14 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/api/v3/utils.php(1254): Civi\API\SelectQuery->run()
#15 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/api/v3/UFGroup.php(75): _civicrm_api3_basic_get("CRM_Core_BAO_UFGroup", (Array:3))
#16 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php(89): civicrm_api3_uf_group_get((Array:3))
#17 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/Civi/API/Kernel.php(169): Civi\API\Provider\MagicFunctionProvider->invoke((Array:9))
#18 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/Civi/API/Kernel.php(100): Civi\API\Kernel->runRequest((Array:9))
#19 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/api/api.php(43): Civi\API\Kernel->runSafe("uf_group", "get", (Array:3))
#20 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/BAO/UFGroup.php(3309): civicrm_api3("uf_group", "get", (Array:3))
#21 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/Resources.php(686): CRM_Core_BAO_UFGroup::getCreateLinks()
#22 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/Invoke.php(275): CRM_Core_Resources::outputLocalizationJS()
#23 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/Invoke.php(84): CRM_Core_Invoke::runItem((Array:12))
#24 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:4))
#25 /home/civicrm/buildkit/build/crm15861/sites/all/modules/civicrm/drupal/civicrm.module(448): CRM_Core_Invoke::invoke((Array:4))
#26 /home/civicrm/buildkit/build/crm15861/includes/menu.inc(527): civicrm_invoke("ajax", "l10n-js", "en_CA")
#27 /home/civicrm/buildkit/build/crm15861/index.php(21): menu_execute_active_handler()
#28 {main}

@litespeedmarc
Copy link
Contributor

My bad. I hadn't run GenCode after pulling in master. Incorrectly thought this wasn't required anymore.

A bit of digging around on GenCode I find this https://docs.civicrm.org/dev/en/master/extensions/civix/, and from there:

run php ./GenCode.php from the xml folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants