Questions tagged [developer]

A developer is a person with the technical IT skills to change the code base of CiviCRM. Preferably s/he knows about PHP, SQL, HTML and Javascript.

Filter by
Sorted by
Tagged with
18
votes
3answers
2k views

How do I get more than 25 records from the API?

I'm making a normal api call such as: $params = array( 'version' => 3, 'sequential' => 1, 'membership_type' => 1 ); $result = civicrm_api('Membership', 'get', $params); But I only get ...
11
votes
1answer
692 views

How would you anonymise (or redact) private data for developer stage?

Private information is confidential. However for developers to debug errors they need a copy of your data that's close enough to production to effectively debug. How can we redact, strip or remove ...
10
votes
3answers
779 views

How do I set up dev environment with buildkit?

I am new to the developer/code side of CiviCRM and attending the Dev training at CiviCON. I saw a post on StackOverflow about installing buildkit but haven't seen it re-posted here. I would appreciate ...
8
votes
1answer
526 views

How to print variable/debug data from your extension.php?

I am trying to add a menu entry in the navigation, but this is causing the navigation menu to disappear, I am trying to debug the code but could not find any particular file. I have checked the ...
3
votes
3answers
294 views

ER diagram for the latest Civicrm , Foreign key in Structure, test cases/plans

Where can I get the ER diagram for the latest CiviCRM? I need it for internal reporting purposes in our organization. I am able to download the Table structure from phpMyAdmin. However, it does not ...
3
votes
1answer
112 views

How do I modify a core CiviCRM file (to change a search order)?

Looks like one of core CiviCRM files (namely part of mySQL query at CRM/Contact/BAO/Query.php) has to be changed in order to achieve "Search results sort by Last Name". What would be the best (I mean, ...
2
votes
1answer
87 views

How can I deal with a missing or corrupt binary (“advanced”) log table?

Sometimes I install an extension that creates a new MySQL table, but it breaks because I have binary ("advanced") logging enabled. CiviCRM tries to write to the binary log, and it fails because the ...
9
votes
1answer
260 views

How to develop extension that relies on libs brought in by composer

I'm wanting to (re)develop an extension and I'd like to use some 3rd party libraries, eg. guzzle, that I would normally manage via composer. So my github repo will contain a composer.json file, but ...
5
votes
1answer
142 views

What is the mechanism for tailoring an Angular form?

I want to modify the behaviour of an Angular form. The answer to question 4700 tells me 'how' to do it (add some JavaScript), but I'm interested in 'where' to do it. If it was a PHP form I could use ...
3
votes
1answer
232 views

How to add a new entity in CiviCRM extension

As I am new to CiviCRM. I am trying to create a new entity for my extension to add some new data in database schema. The documentation I am following to create a new entity is: https://docs.civicrm....
2
votes
2answers
148 views

How to Override System Workflow message template variables, single and batch

My client has advanced invoice requirements. In the past we had a custom Drupal module and a custom template file. Added a link "Print Invoice" to the individual contributions Form.tpl and then did a ...
10
votes
2answers
2k views

What are the different cache clearing mechanisms relevant when developing?

When doing developpment, i sometimes found it difficult to clear all the cache in a way i'm sure everything i have done is taken into account. Let's take some examples : in an extension, i do an ...
9
votes
1answer
83 views

How do I modify the new 4.6 CiviMail form?

I am the author of a CiviCRM extension that needs to disable, depending on configuration, the URL tracking and open tracking checkboxes of the mailing form. In version 4.4 this was accomplished using ...
6
votes
2answers
187 views

How could I use CiviCRM for sponsorship

We have a node called sponsorship that is a person, place, or thing. Person is likely a child, but it could be a teacher, nurse, etc. A person generally has one donor that pays a monthly amount. A ...
5
votes
1answer
217 views

How can I use Xdebug with CiviCRM unit tests?

Ideally in conjunction with an IDE (I use Netbeans, but will fire up pretty much anything that gets this to work).
3
votes
1answer
159 views

Tutorial for creating pages with ajax

For our CiviCRM instance, I use to create forms that allow the user to execute some specific tasks. Typically they end up on a form, they enter some values, and the postProcess function executes some ...
2
votes
3answers
187 views

Adding a contact summary tab

I am completely new to Civicrm and successfully created an extension that modify and existing page{Contact Page} but I am required to create a extension that shows a new CIVICRM Contact Tab that show ...
2
votes
1answer
81 views

Recommended way to deal with delete action in a page?

When developing extensions I have always followed this path when I had a page listing stuff (for example books) and an action link to delete the book: Create the page and add a link to the form ...
1
vote
1answer
77 views

How to detect/handle card failure from Payment Provider's callback URL

I have implemented a payment gateway for SwipeHQ's 1-off payment mechanism. It's similar to PayPal's mechanism in that there's an LPN that notifies CiviCRM of the success/failure of the transaction, ...
0
votes
1answer
118 views

entityRef widget seems to not respecting params

Whatever has been tried, this code doesn't restrict entityRef widget output according to desired parameters: $selection = array(132, 168, 169); $sa_custom_props = array( 'api' => array('params' =...
6
votes
3answers
594 views

What's the correct way to log debug info to log?

The "current" wiki says to use CRM_Core_Error::debug and says, "Most runtime errors are logged here, as well as data that you explicitly write to log using the CRM_Core_Error::debug log=true parameter....
4
votes
1answer
98 views

What character is VALUE_SEPARATOR?

I need to run a MySQL query to split the values in the fee_level field of the civicrm_participant table. I just can't determine what character to use as the delimiter. When I look at VALUE_SEPARATOR ...
4
votes
3answers
532 views

How to set a default value for a custom field

EDIT: this is NOT working, at least in CiviCRM 5.24.2 EDIT: this is done automatically by CiviCRM from 5.18+ I have a custom fieldset on Contributions that uses an option list. The option list has a ...
4
votes
1answer
164 views

How can I use CiviCRM's cache table?

When developing an extension, I'd like to cache some data to avoid the expense of re-calculating it. Is there a civicrm version of the Drupal's caching interface for developers?
3
votes
1answer
74 views

recently viewed items stack: Add a configuration option for MAX_ITEMS in Recent.php

What's the recommended way to make the max item count of civi's recently viewed items stack configurable. Current value ist a constant MAX_ITEMS defined directly in CRM/Utils/Recent.php. A quick ...
3
votes
1answer
52 views

How do I run CiviCRM PHPUnit tests from within Netbeans?

I want to run PHPUnit tests from within my IDE - and I know Karin G. has created excellent directions for PHPStorm, but I use Netbeans 8.2. What can I do?
3
votes
1answer
74 views

Under what circumstances is API joining available?

If I go to the API explorer and select ContributionSoft as the entity, I see options to enable joining. But I don't see any joining options available for other entities like Contribution and ...
3
votes
1answer
46 views

What are best practices for deploying changes?

I'm looking to set up best practices for a development workflow (i.e. dev > staging > production) In Drupal there is features, which allows you to export your configuration into code and then deploy ...
2
votes
1answer
54 views

Unable to locate folder xml under the civicrm root directory

I am new to civicrm and trying to build extension. The extension is build and activated. The stage where I got stocked is when I trying to add entity for my civicrm extension. I am following the ...
2
votes
1answer
98 views

Multiple values for custom fields in Activities?

Anyone has seen any custom implementation/extension of custom group multiple values for Activities? Since we are using Activities for many different scenarios, many times the requirement of having ...
2
votes
1answer
50 views

Long running Scheduled Job

In the Areas extension (https://lab.civicrm.org/extensions/org.civicoop.areas) an administrator can define areas such as West Coast and a contact living in a city in West Coast is linked to the area ...
2
votes
1answer
2k views

How can I trigger a selection for a Select2 EntityRef element via javascript?

The CiviCRM EntityRef form element uses a Select2 select box to make lots of CiviCRM forms more awesome. A user can, for example, search for contacts to choose one. Great. I am building an extension ...
1
vote
1answer
52 views

Can hook_civicrm_links create links beside rows of a contact's Events tab?

I've looked at CRM/Event/Selector/Search.php to see it creating the View/Edit/Delete links, but am just unsure how to make this work. Can someone advise what the appropriate $objectName and $op should ...
1
vote
1answer
46 views

Participant quantity passed to Additional Participant pages

On an event registration form I need to tailor a Price Set field (ticket type) for all participant pages, based on what is selected in the Participant count on the first page. This is doable on the ...
1
vote
1answer
36 views

Is upgrade possible for `payment` type Extension?

I see extension of type 'payment' has been deprecated and hence not listed in the active modules we get from getActiveModuleFiles() function. Due to this, any upgrade to this ext. is not possible ...