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 ...
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 ...
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,
...
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 ...
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:...
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 ...
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 ...
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'...
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 ...
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, ...
6
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 ...
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
...
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 ...
6
votes
Accepted
CiviCRM menu bar corrupted after installing Shoreditch
There has been some work going on to support shoreditch for CiviCRM 5.13. The temporary solution(until a new release is available) is to make the Menu colour to white by navigating to CiviCRM >> ...
6
votes
Accepted
What is the actual status of CiviHR
As far as I know, they had too many issues with the more recent versions of CiviCRM so it's no longer supported. A client of mine had a chat with Jamie @ Compucorp last February (2020) at the ...
5
votes
Accepted
Has anyone gotten CiviRebux working?
As Chris says, the problem is due to CiviCRM's Data Logging feature having a problem with column names that are MySQL reserved words. As John says, in this case it's the column named desc.
I think ...
5
votes
Accepted
How to remove "Extended Demographics"?
The easiest would be if you can find it in the CiviCRM custom groups? Using Administer/Customize Data and Screens/Custom Fields. If that does not work, check the table civicrm_custom_group. You will ...
5
votes
Accepted
Disabling Stripe extension breaks database
Getting your site back online, in phpmyadmin:
In table civicrm_extension, enable stripe (change 0 to 1)
In table payment_processor, disable any using stripe (change 1 to 0)
This should allow your ...
5
votes
Accepted
What are `*.mgd.php` files for?
So a little research takes me to Totten's blog where he lays out the rational for splitting out entity definitions into seperate PHP files.
The full definition of the array format is laid out in the ...
5
votes
CiviCRM membership component
This functionality already exists in CiviCRM; however, by default it isn't exposed to the UI. Look in the database at civicrm_membership_log.
The main difference between what you're describing and ...
5
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 ...
5
votes
How to create a hook in an extension?
Here is an example of a hook we created for CiviRules:
https://lab.civicrm.org/extensions/civirules/blob/master/CRM/Civirules/Utils/HookInvoker.php
Hope this helps :-)
5
votes
How to create a hook in an extension?
Here is an example using the named parameter syntax:
CRM_Utils_Hook::singleton()->invoke(
['pdf', 'pdf_variables', 'receipt'],
$pdf, $pdf_variables, $receipt,
CRM_Utils_Hook::$_nullObject, ...
5
votes
Are extensions that work with CiviCRM 4.7 also compatible with 5.x?
Because 5.0 does not include breaking changes, it is considered equally compatible with 4.7 extensions. There is always minor risk of breakage when upgrading software, but 4.7 to 5.0 is not considered ...
5
votes
Accepted
How to set a id attribute to button?
I believe you cannot set id to a button using php however you can define your own class for the button and use JS to set the id for that class.
Here is the snippet to add class for button
$this->...
5
votes
Accepted
Insert and Get New ID in Extension
You could do something like CRM_Core_DAO::executeQuery("SELECT LAST_INSERT_ID()");. If your needs are simple that seems like the easiest.
Probably to do it "right", you would use civix generate:...
5
votes
Why should I use an ~/extensions directory rather than the default ~/ext for new extensions?
The ext dir that ships in the tarball is for extensions bundled directly with core like IATS. If you put other extensions in there they will get wiped when you upgrade, so it's common to put them ...
5
votes
Accepted
Why should I use an ~/extensions directory rather than the default ~/ext for new extensions?
There are several things in play at different levels with regard to the CiviCRM extensions directory location. The concepts to be aware of are:
CiviCRM shipping codebase
Drupal multisite
Drupal's ...
5
votes
Can't upgrade from 5.26.* to 5.28.*
Issue causing this:
Extensions.
In PHP logs I found out Symphony was mentioned along with Flexmailer. We had alpha outdated version of Flexmailer causing issues. Disabling it/ updating it seems to ...
5
votes
Accepted
unexpected extensions listed in system status
A couple versions ago the concept of "hidden" extensions was introduced. The theory was it would allow for moving bits of code out of core and into extensions without anyone noticing any ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
extension × 551wordpress × 54
developer × 45
drupal × 32
upgrade × 28
api × 26
hooks × 25
civievent × 22
error × 19
php × 19
civix × 19
civicontribute × 12
civimail × 12
payment-processor × 12
custom-fields × 11
joomla × 11
civicase × 10
contacts × 9
email × 9
activities × 9
installation × 9
core × 9
mailchimp × 9
civimember × 8
webform-civicrm × 8