18 votes
Accepted

How do I set up an API key for a user?

Hopefully a new release will be made for the API Key extension soon. Here are detailed instructions for creating one manually without needing to get access to your database through phpMyAdmin, mysql ...
user avatar
  • 6,671
14 votes
Accepted

What are the different cache clearing mechanisms relevant when developing?

For the first example, you need to 1. clear the compiled Smarty templates cache. In the second case you need to 2. rebuild the menu system using your xml file. 3. There are some db cache tables you ...
user avatar
  • 6,671
11 votes
Accepted

Way to automatically install extensions?

The cv cli tool provides the following commands for working with extensions: ext:disable Disable an extension ext:download Download and enable an extension ext:enable ...
user avatar
  • 16.2k
10 votes

Do CiviCRM Extensions Cost Anything?

Like CiviCRM, its extensions are currently without any upfront or ongoing licensing fees. People are free to offer paid extensions, but I am not aware of them. You are free to use, modify and share ...
user avatar
  • 2,816
9 votes

What are the different cache clearing mechanisms relevant when developing?

+1 for Joe's comment which is pretty thorough. Re: drush cc all -- this command can be pretty important in the workflow for Drupal dev. In Civi-Drupal, the analogous command is drush cvapi system....
user avatar
  • 5,589
9 votes
Accepted

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

Approaches There are a few different patterns one could follow in connecting Civi extensions with composer: (Broad scope) Site build via composer: The entire web site is defined with a custom ...
user avatar
  • 5,589
8 votes

What is the root url needed for extension pages?

The URL formula is different for each CMS. The most accurate approach is to open a CiviCRM page and examine its URL. For example, I logged into the public demo sites for v4.5, navigated to "...
user avatar
  • 5,589
8 votes

Need Legislative District Lookups for CiviCRM/WordPress

The Electoral API extension is what you're looking for.
user avatar
8 votes
Accepted

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

(Update) As of v4.7.0, the approaches below still work, but there's a better way to write to the log file using a PSR-3 logger, e.g.: Civi::log()->info('Hello, log!'); Civi::log()->error('I'm ...
user avatar
  • 5,589
8 votes
Accepted

Find CiviCRM version programmatically?

Agree with Chris that System.get is a great API for inspecting the system -- with a trade-off of breadth vs speed. If you need something more performant, use CRM_Utils_System::version(), e.g. $ cv ...
user avatar
  • 5,589
8 votes
Accepted

Where is extension data stored?

Its a bad idea of upgrading as uninstall and install new version of extension. You can upgrade the extension either one of the following two ways: If the extension is listed under CiviCRM extension ...
user avatar
8 votes

Upgrade to 5.47.x fails with error: Exception: "API error: DB Error: constraint violation on ReportTemplate.create"

The problem here was the Extension Extended Reports - however it's possible that you have a different extension causing the problem. In 5.47.0 CiviGrant component was transferred to an extension. You ...
user avatar
  • 1,685
7 votes

Simple, consistent N. Am. phone validation/reformatting everywhere?

There's an extension that does precisely this: https://github.com/cividesk/com.cividesk.normalize It used to be in the extensions directory, but it's gone now for some reason. It uses libphonenumber,...
user avatar
  • 7,357
7 votes
Accepted

How do I add a new settings page for my extension?

You'll want to start with the civix generate:form command. Alter the generated code to have your form class extend CRM_Admin_Form_Setting instead of CRM_Core_Form and then follow the example of other ...
user avatar
  • 16.2k
7 votes
Accepted

Can numeric version naming conventions for CiviCRM extensions use the Drupal module naming conventions?

It's hard to apply the Drupal model to CiviCRM because the release cycles are so very different. Drupal releases a complete overhaul every 3-5 years, with nothing but bugfixes in-between. Civi's ...
user avatar
  • 16.2k
7 votes

Find CiviCRM version programmatically?

I'd use System.get API call. (source) In the return values, there's a value for version which corresponds to the value in civicrm-version.php $ cv api System.get name=version { "is_error": 0, ...
user avatar
7 votes
Accepted

Implementing a support ticket/help desk system?

You could involve CiviCase, but depending on your needs you may get away with just creating custom Activity Type(s) and custom Activity Statuses. And then given you are doing this in Drupal, I would ...
user avatar
  • 27.2k
7 votes

How can I run extension DB updates?

The equivalent would be any of these: Navigate to civicrm/admin/extensions/upgrade?reset=1 Navigate to "System Status" or "Manage Extensions". Those pages will link to the above. On CLI, run cv ext:...
user avatar
  • 5,589
7 votes
Accepted

Safe to uninstall Mosaico extension?

Mosaico doesn't create any custom data in CiviCRM, so it is safe to Uninstall the extension. However, any template created in Mosaico will be lost. To uninstall the extension you will need to disable ...
user avatar
7 votes

How to create a hook in an extension?

EDIT This answer is now deprecated, you should use @bgm's answer instead, or for an alternative and possibly cleaner approach, try my other answer All thanks to the code example link in Eric's answer ...
user avatar
  • 3,688
7 votes
Accepted

ContactLayout extension not working with civicrm 5.10

Short answer: you need to update your extensions. Visit your extension admin page and apply all updates. Longer answer: There are incompatibilities between older and newer versions of the ...
user avatar
  • 16.2k
6 votes

Has integration been done for Textify Mobile?

My name is Mitch Cannon, and I'm the VP of Technology for Textify Mobile. We currently only offer a private API for specific integrations and partnerships. With that said, we are actively developing a ...
user avatar
6 votes
Accepted

How to transfer ownership of an extension

There are several places which rely on the full name of the extension: Extension directory: One must create a new record for the new extension key. Ownership, release-history, etc, will be different. ...
user avatar
  • 5,589
6 votes

Extension Manager fails and so do certain scheduled jobs

I was able to reproduce your issue and fix it on my Linux install. It seems to only happen with Linux, not MacOSX. I can fix it by changing the filename of the job to be first letter caps only, i.e. ...
user avatar
  • 6,091
6 votes
Accepted

CiviRules and CiviCRM 4.7

I'm in the same boat! Just about to install and enable as we need to trigger email to customer when they submit a profile from WordPress... UPDATE From initial testing it seems to work fine with 4.7....
user avatar
  • 696
6 votes
Accepted

Civix reports "Failed to locate civicrm.settings.php"

The generate:api subcommand (and a few others) require access to a working copy of CiviCRM. To locate this, it uses a process reminiscent of drush or wp-cli. For example, if the command-line is ...
user avatar
  • 5,589
6 votes

Should I disable extensions prior to upgrading CiviCRM?

In general, I'd recommend no. Some extensions - literally - may not be reinstallable if they aren't qualified for that version of Civi. My recommendation: TAKE BACKUPS!!! Then don't disable ...
user avatar
  • 2,343
6 votes

What does LExIM stand for?

LExIM is the new overall release and extension strategy: LEAP BY EXTENSION. ITERATE BY MONTH. It basically means that: CiviCRM development will now happen mostly through extensions, ...
user avatar
  • 1,561
6 votes
Accepted

How to install a not listed Extension?

Here is the documentation from the administrator guide: https://docs.civicrm.org/sysadmin/en/latest/customize/extensions/#installing-a-new-extension There are three steps: Upload extension package ...
user avatar
  • 2,289
6 votes
Accepted

Extensions for 5.0+

The 4.7 -> 5.0 increment is a normal monthly release. There shouldn't be any reason that extensions should break. The shift from 4.7 to 5.x is about changing how version numbers increment, not a major ...
user avatar
  • 1,685

Only top scored, non community-wiki answers of a minimum length are eligible