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
4
votes
1answer
33 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?
1
vote
0answers
13 views

Which javascript features can I use in CiviCRM core?

Does CiviCRM have an agreed-upon browser version to target for javascript features? For example: Can I use Object.create() (IE 9+)? Can I use 'use strict'; (IE 10+)? Can I use let (IE 11+)? Can I ...
2
votes
3answers
129 views

How to customise the activities tab listing

I used to hack the Activities BAO to change the search results to make the subject line something more useful; i.e. extract other data from particular activity types and auto-create a summary in place ...
1
vote
0answers
1k views

ngChange event fired twice when using multi-select with crmUiSelect

I'm trying to use CiviCRM's crmUiSelect AngularJS directive to create a select2 element in a form. I want to call a function in my controller when the user changes this element, so I'm using the ...
0
votes
1answer
780 views

Multi-select not working with crmUiSelect AngularJS select2 directive

I created a select2 element with CiviCRM's crmUiSelect AngularJS directive by using the following code in my controller: $scope.options = [ {"value": "foo", "label": "Foo"}, {"value": "bar", "...
3
votes
2answers
56 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 ...
4
votes
1answer
55 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 ...
3
votes
2answers
53 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 ...
3
votes
0answers
71 views

Should I use implicit annotation for AngularJS dependency injection?

I am learning AngularJS and have read that it supports three different ways to specify dependencies. Their docs say that inline array notation "is the preferred way to annotate application ...
0
votes
1answer
169 views

How to create entity in CiviCRM

I am trying to create the Entity in CiviCRM with my extension. But I am struck here. Unable to find the XML folder in my CiviCRM installation. After running the below command civix generate:entity ...
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 ...
2
votes
1answer
53 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 ...
3
votes
1answer
224 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....
3
votes
2answers
177 views

Which version of Angular/AngularJS does CiviCRM use?

I'm working on learning Angular/AngularJS for use with CiviCRM and confused about which version I should be learning. How can I see which version CiviCRM is using?
4
votes
1answer
134 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'...
3
votes
1answer
58 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 ...
5
votes
4answers
309 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 ...
1
vote
2answers
62 views

book library mgmnt and student credit system

I just started exploring the civiCRM options for our donation based educational institution. It fits the donor managment, people management needs. However I would like to add two more functionalities, ...
3
votes
2answers
33 views

Where can our small non-profit find assistance with CiviCRM?

Looking for an individual in Michigan, USA, to assist with understanding a civicrm database that was created for our non-profit. Many bugs and errors in the system, and training on system needed for ...
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 ...
2
votes
1answer
77 views

Append an option to the BlockSchedule Directive in crmMailing

I'm making a first foray into customizing the mailing compose screen. I want to add a third option to the options in BlockSchedule.html (schedule.mode = regular) which will open up a few more options ...
1
vote
1answer
31 views

Adding settings with form to my extension - what am I missing?

I would like to add a settings form to a new extension to hold some extension-specific settings. I've put together the extension and form using civix, and am testing in civiCRM 4.7.17 on local MAMP. ...
2
votes
1answer
27 views

Where do I find Apache error logs for sites that I installed with buildkit?

I installed a site with buildkit. Now I'm doing some dev work which is producing WSOD / 500 / "Internal Server Error" errors, but I can't find any logs about these errors. I've looked in /var/log/...
3
votes
1answer
73 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 ...
11
votes
1answer
622 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 ...
2
votes
1answer
23 views

How should I go about proposing (and then possibly creating) a new CiviCRM feature?

I have an idea for a small new feature. I think this feature would be useful to a significant portion of the Civi user community. I'm willing to build it. Is there a standard process for proposing my ...
1
vote
1answer
27 views

Unit Tests on Single DB

My rig has a CMS & Civi combined database. This was to make life easier through drush sql-sync from @prod to @dev. However, @dev is a vagrant box, with two databases, one for CMS, one for Civi. ...
0
votes
1answer
46 views

civicrm_processProfile hook ignored

After submitting the profile with success from the front-end of the site, a civicrm contact is created but the following hook is not working.. function wordpress_civicrm_processProfile($name) { ...
4
votes
4answers
242 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 ...
3
votes
2answers
63 views

Can an extension remove its custom fields on uninstall?

As the developer of an extension that creates its own custom fields, what can I do to cause those custom fields to be removed when the extension is uninstalled?
0
votes
0answers
50 views

How do I change code in DEVELOPER tab?

How do I change the code in Developer tab in CiviCRM reports?
4
votes
1answer
68 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?)
5
votes
1answer
123 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 '...
7
votes
2answers
200 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?
0
votes
1answer
57 views

Error when trying to install buildkit

I am trying to install buildkit and re-educate myself with some of the more up to date CiviCRM development practises :-) However, I get an error when I run civicrm_download_tools. I am running Ubuntu ...
4
votes
3answers
476 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 ...
2
votes
1answer
47 views

Can't accesss cv from CiviUnitTestCase::createExternalAPI in buildkit environment

I'm QAing https://github.com/civicrm/civicrm-core/pull/9255 and trying to run a couple of relevant test locally: ~/src/civicrm-buildkit/build/qa/sites/all/modules/civicrm$ tools/scripts/phpunit ...
3
votes
2answers
147 views

Best way to write module for 'unusual' payment gateway

We are looking at writing a module for Ezidebit. Ezidebit allow the setup of Direct Debit payments online. However, the initial request to Ezidebit includes the payment frequency and Ezidebit ...
0
votes
1answer
25 views

CiviReport - Add days to Transaction Date for Estimated Deposit Date

Our Treasurer has asked for a report that will help him reconcile the monthly bank statement more efficiently. As with most financial services vendors, our vendor (iATS) has a delay between the ...
5
votes
1answer
214 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).
2
votes
1answer
33 views

Report for Unbatched Contributions

We use Civi accounting batches to export our contributions to an external accounting program. The office manager has asked me to create a report (in Drupal or Civi) that will show all contributions ...
2
votes
2answers
85 views

Buildkit Site fails to load due to PHP ugrade from 5 to 7

After Upgrading from php 5.6 to php 7, when i try to access the sites created using buildkit, I am unable to access it. After typing Civibuild show dmaster I get the following ERROR: Failed ...
4
votes
0answers
48 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 ...
1
vote
1answer
25 views

GitHub Pull Request errors

I have found that the best way to deal with pull requests that have failed validation due to coding standard error is to close the PR, delete the remote branch in Git and create a new one with the ...
2
votes
1answer
43 views

GitHub, Jenkins and coding standards

I have submitted a few PRs recently for code developed using NetBeans. I have configured NetBeans Code Sniffer to use what I think are the coding standards for CiviCRM. However, this produces lots ...
1
vote
4answers
74 views

How do I control the order in which hooks fire?

If I have two extensions that both use, say, hook_civicrm_post, how can I control the order in which the two extensions fire?
1
vote
2answers
92 views

Where can I find the field string length?

I need to import addresses using the API. Some addresses go over the CiviCRM limit. For instance street_address has a limit of 96 characters. I would like to know where are these limits defined in ...
2
votes
1answer
87 views

How to use API to bulk delete contacts quickly?

In development I would like to use the API to delete all contacted except conctact_id 1 and 2. With Contact This: $result=civicrm_api3('Contact', 'delete', array( 'id' => array('NOT IN' =&...
7
votes
2answers
51 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. ...
2
votes
3answers
181 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 ...