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
19 votes
3 answers
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 ...
Owen Kelly's user avatar
12 votes
2 answers
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 ...
samuelsov's user avatar
  • 2,321
12 votes
1 answer
1k 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 ...
ñull's user avatar
  • 1,208
11 votes
2 answers
94 views

How to communicate with the users of an extension?

We are discussing about which version(s) to maintain compatibility with, and would like to be able to discuss that with the users of that extension. Is there an easy way to do that? Eg. civicrm.org ...
Xavier's user avatar
  • 10.2k
10 votes
3 answers
883 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 ...
KSneed's user avatar
  • 103
9 votes
1 answer
378 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 ...
artfulrobot's user avatar
  • 3,910
9 votes
1 answer
87 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 ...
konadave's user avatar
  • 192
9 votes
0 answers
114 views

Can anybody volunteer to test my Android App: Cividroid - A CiviCRM companion on Android!? [closed]

I am working on an Android App for CiviCRM: Cividroid - A CiviCRM companion on Android! as a GSoC 2015 project. I am not a regular CiviCRM user and hence I don't have a live environment to test the ...
IJP's user avatar
  • 91
8 votes
1 answer
665 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 ...
Siddharth Gupta's user avatar
7 votes
2 answers
259 views

Find CiviCRM version programmatically?

Within a CiviCRM extension, what's the best way to determine the current CiviCRM version in versions 4.6.x and above?
TwoMice's user avatar
  • 1,794
7 votes
2 answers
64 views

Are there up-to-date CiviCRM coding standards available?

I am using NetBeans 8.1 under Windows to develop/debug some CiviCRM code. Previous attempts at getting the contribution accepted ran into trouble as they failed to comply with the coding standards. ...
Stephen Palmstrom's user avatar
7 votes
1 answer
176 views

Are we going to switch to angular 2?

Angular has a new shiny version that seems to offer several new features and a faster experience. https://angular.io/features.html https://medium.com/google-developer-experts/angular-2-introduction-...
Xavier's user avatar
  • 10.2k
6 votes
4 answers
860 views

CiviCRM and Docker

Are any of the CiviCRM core team using docker? and is there a preferred installation? I note there are a few drupal docker projects, such as this but couldn't see anything for Civi.
ErichBSchulz's user avatar
  • 1,571
6 votes
4 answers
317 views

API: How do I delete a custom value?

I may be blind but I can't see any api call to delete a custom value?! CustomValue entity is missing a delete action. What am I missing?
nielo's user avatar
  • 1,294
6 votes
2 answers
203 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 ...
mike_kc's user avatar
  • 529
6 votes
3 answers
918 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....
Jon G - Megaphone Tech's user avatar
6 votes
1 answer
117 views

Moving Angular extension into /ang/

I'm attempting to move code from an angular extension into core. I've created an ang/crmModuleName and moved the ctrl and partials into it, and crmModuleName.css into the ang/ and crmModuleName.js ...
jdax's user avatar
  • 91
5 votes
2 answers
814 views

CiviCRM integration with Eventbrite

I would like to create/update events in CiviEvent by using Eventbrite webhooks. One of the requirements is having an endpoint page that will receive data sent by Eventbrite API. How can I create that ...
Djordje Marjanovic's user avatar
5 votes
1 answer
102 views

How do I make the menubar a different color on my dev/staging sites

Wouldn't it be nice if I could visually distinguish my various dev/staging sites with a different menubar color for each one? Is this possible in CiviCRM and if so what version?
Coleman's user avatar
  • 17.6k
5 votes
2 answers
188 views

Fetch data over the web: curl, file_get_contents or something else?

I've written quite a few extensions that need a way to fetch data from the web. Sometimes I've used file_get_contents sometimes cURL, other times I've sucked in (geddit!) Guzzle. Each of those has it'...
artfulrobot's user avatar
  • 3,910
5 votes
1 answer
235 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).
Jon G - Megaphone Tech's user avatar
5 votes
4 answers
319 views

Why is it important to define new Entities for new types of data?

The Developer Guide includes detailed instructions on declaring a new entity which begins with this: If you want your extension to store data in the database, then you will need to create a new ...
artfulrobot's user avatar
  • 3,910
5 votes
1 answer
108 views

"Unknown path" when viewing a newly generated angular page

I'm trying to get started learning how to make Angular pages within a CiviCRM extension so I ran civix help generate:angular-page and read some help text about an example. Cool. Then I ran civix ...
Sean's user avatar
  • 3,158
5 votes
1 answer
68 views

Will unsupervised dedupe rules be used in API Contact create?

I want to import an old database using API Contact create. In the de-dupe rule documentation it mentions "They are also used when you Import contacts". I see in the API documentation that there exists ...
ñull's user avatar
  • 1,208
5 votes
1 answer
217 views

How do I install an extension directly from git?

Now that I have found my extension directory, is installing an experimental (or developmental) extension as simple as cloning it into there? eg: # find extension directory DIR=$(cv ev --out=pretty '...
ErichBSchulz's user avatar
  • 1,571
5 votes
1 answer
159 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 ...
Ken West's user avatar
  • 1,037
4 votes
4 answers
309 views

How to create a hook in an extension?

I want to give others the chance to do something when certain events happen in my extension. So to be clear: I'm not wanting to use existing hooks in my extension, I'm wanting to create a new hook ...
artfulrobot's user avatar
  • 3,910
4 votes
2 answers
245 views

How to increase limits on activity attachments?

Current (4.6.7) limits say that an activity can have up to 3 attachments, each being less than 2MB. I need more, and a bigger file size limit. What are the obstacles to achieving this? I can't see ...
artfulrobot's user avatar
  • 3,910
4 votes
4 answers
378 views

What's the recommended way to handle redirection after quickform submissions?

I often find myself writing calls to CRM_Utils_Redirect in my postProcess methods. But in core code I don't see this. I see the use of methods like $session->replaceUserContext and postProcess ...
michaelmcandrew's user avatar
4 votes
1 answer
102 views

Within an extension how can load a custom `Civi` name-spaced class?

Within my extension I can load classes from CiviCRM's core codebase like this: $foo = new \Civi\Core\AssetBuilder(); And I can also load custom classes that I've written in my extension like this: ...
Sean's user avatar
  • 3,158
4 votes
3 answers
182 views

hide profile title in Fieldset (legend)

Is there a way to hide the profile title. I have added a tracking profile which is being populated by values passed in the URL to the contribute page. The fields I have added are being hidden, so the ...
mike_kc's user avatar
  • 529
4 votes
1 answer
70 views

What does LExIM stand for?

I've heard a few developers refer to LExIM. What on earth is it? (Other than "Reading" in Albanian or an on-line learning company?)
ErichBSchulz's user avatar
  • 1,571
4 votes
1 answer
90 views

How do I make one hyperlink which shows its target page as a modal dialog when clicked?

There are lots of links in CiviCRM which will: (a) open an overlaid modal dialog when clicked, and (b) open the same content in a new page when Ctrl+clicked or middle-clicked. This is cool and I want ...
Sean's user avatar
  • 3,158
4 votes
3 answers
779 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 ...
artfulrobot's user avatar
  • 3,910
4 votes
2 answers
171 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 ...
Mike Steigerwald's user avatar
4 votes
1 answer
218 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?
Alan Dixon's user avatar
  • 6,654
4 votes
2 answers
71 views

Custom API Action: Access Request Body

I'm developing a custom API v3 action which is intended to handle a webhook request from Zoom (https://marketplace.zoom.us/docs/api-reference/webhook-reference). Zoom follows REST standards by putting ...
Rupert Raphael Amodia's user avatar
4 votes
1 answer
46 views

How does in-line editing editing work in CiviCRM?

Is there a reference anywhere for the in-line editing, e.g., 'Click Here to Edit' in CiviCRM? I need something similar for my extension and want to reuse as much as I can.
Mike Steigerwald's user avatar
4 votes
2 answers
91 views

How do I write the _spec function for my custom API?

When I run... civix generate:api foo bar ...civix generates the following code: function _civicrm_api3_foo_Bar_spec(&$spec) { $spec['magicword']['api.required'] = 1; } From this example, I ...
Sean's user avatar
  • 3,158
4 votes
1 answer
68 views

Is there a way to alternate between different outbound mail servers?

I would like to be able to use different mail servers to send different emails, for instance: all transactional emails (contribution receipt, event registration...) sent by our mail server, all mass ...
Xavier's user avatar
  • 10.2k
4 votes
1 answer
56 views

What is the best way to change the intro on a Contribution page based on URL?

I have a contribution page that uses values passed via URL to track specific information about the source of the contribution. www.domain.org/civicrm/contribute/transact?reset=1&id=8&campaign=...
mike_kc's user avatar
  • 529
4 votes
1 answer
34 views

How do I see which permissions are necessary to execute a given API call?

If I pick a random entity and action, what steps can I take (manually if necessary) to see which specific permissions are necessary for CiviCRM to execute an API call with check_permissions=1?
Sean's user avatar
  • 3,158
4 votes
1 answer
91 views

How to manage AngularJS dependencies within an extension

I'm creating an extension and using AngularJS within it. I've found a 3rd party AngularJS library that I'd like to use in my extension (in this case ngInfiniteScroll). What is the proper way to make ...
Sean's user avatar
  • 3,158
4 votes
3 answers
43 views

What's the best way to code for extensions to work for multiple civicrm versions?

For some extensions, we need to have a different behaviour for different civicrm versions. I can either manage two branches, but I'll have to backport some fixes and that seems a big overhead. For ...
Xavier's user avatar
  • 10.2k
4 votes
1 answer
97 views

How do I set up PhpStorm for CiviCRM development?

I've acquired PhpStorm and I was wondering if there was any guidance on the best way to set it up for CiviCRM development. I saw there was a little information about coding style setup but there are a ...
John's user avatar
  • 1,922
4 votes
0 answers
239 views

How can I put an AngularJS page inside a crm-popup modal window?

If I add class="crm-popup" to an internal hyperlink in CiviCRM, I can make CiviCRM open the target page inside a modal dialog. Cool! But if the target page is an AngularJS page (e.g. /civicrm/a/#/...
Sean's user avatar
  • 3,158
3 votes
3 answers
414 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 ...
Parthibaraj Rajasekar's user avatar
3 votes
1 answer
113 views

How do I test a CiviCRM upgrade script?

I have a PR that adds a file CRM/Upgrade/Incremental/sql/4.7.alpha1.mysql.tpl. How should I go about testing this code?
Jon G - Megaphone Tech's user avatar
3 votes
2 answers
90 views

How to reset the headless test db?

I'm using headless phpunit tests. I noticed that the first time I do this it pauses and says about installing schema for xxxx - a test database. If you break stuff enough, you can end up with a ...
artfulrobot's user avatar
  • 3,910
3 votes
2 answers
117 views

Create new contact sub-type when extension is installed

I'm building a new extension using civix and buildkit. I need to create a new ContactType (sub-type of individual) on install (if it doesn't already exist). I know how I would do it, but I'd prefer ...
Jason Brown's user avatar