20
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 ...
- 6,721
15
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 ...
- 6,721
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 ...
- 16.3k
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 ...
- 2,826
10
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 ...
- 1,745
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....
- 5,609
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 ...
- 5,609
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 "...
- 5,609
8
votes
Need Legislative District Lookups for CiviCRM/WordPress
The Electoral API extension is what you're looking for.
- 37.9k
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 ...
- 5,609
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 ...
- 5,609
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 ...
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,...
- 7,387
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 ...
- 16.3k
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 ...
- 16.3k
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,
...
- 9,862
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 ...
- 27.6k
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:...
- 5,609
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 ...
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 ...
- 3,780
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 ...
- 16.3k
7
votes
Accepted
CiviCRM core now includes Flexmailer: how to remove old flexmailer extension?
Here's how we handled this:
From within your extensions directory:
cv dis mosaicomsgtpl mosaico flexmailer
rm -rf org.civicrm.flexmailer
cv flush
cv en flexmailer mosaico mosaicomsgtpl
cv ext:up
We'...
- 1,098
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 ...
- 61
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.
...
- 5,609
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. ...
- 6,430
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....
- 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 ...
- 5,609
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 ...
- 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, ...
- 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
...
- 2,321
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
extension × 515wordpress × 50
developer × 45
drupal × 32
hooks × 24
upgrade × 23
api × 22
civievent × 20
civix × 19
error × 17
php × 17
civicontribute × 12
civimail × 11
joomla × 10
civicase × 10
payment-processor × 10
contacts × 9
email × 9
database × 9
activities × 9
installation × 9
core × 9
mailchimp × 9
civimember × 8
webform-civicrm × 8