Hot answers tagged

6

ah-ha! In your test class edit the setUpHeadless() method which might look at first like this: public function setUpHeadless() { // Civi\Test has ...


5

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 work as solution. After that I could update CiviCRM smoothly and works! Hopefully someone will need this in the future!


4

I recently pushed b3db22c002a5d16ae3715b97b58f3f64a1526a3a -- which adds the --user (-U) option and seems to work in WP/D7 (but hasn't been exhaustively tested). Try downloading the latest build of cv.


4

If wp-cli is an option, it takes a --user option, similarly to drush. If that's not an option, looking at the wp-cli source code (here) suggests that wp_set_current_user() will do the trick.


4

cv has a PHP dependency that CiviCRM doesn't - the posix plugin. It's installed by default on many systems with PHP (e.g. Debian/Ubuntu) but with the Red Hat/CentOS "remi" repository, it isn't. You can install the php-process package to resolve this.


3

This appears when you have schedule reminder with is repeat ON and 'Also Include' Recipient set. Try applying below patch diff --git a/CRM/Event/ActionMapping.php b/CRM/Event/ActionMapping.php index 9c8aaae7a5..0874099eb0 100644 --- a/CRM/Event/ActionMapping.php +++ b/CRM/Event/ActionMapping.php @@ -136,7 +136,7 @@ class CRM_Event_ActionMapping extends \Civi\...


3

Ok so this may seem like a silly issue to some but after some messing around I figured out cron didn't have access to the path where CV was installed so to fix it the crontab entry had to be changed to: */5 * * * * /usr/local/bin/cv api job.execute --user=admin --cwd=/var/www/html/siteroot There was no error as the mailer deamon was not firing correctly so ...


3

The cv upgrade:db command from https://github.com/civicrm/cv/pull/2 was recently merged for v0.2.3. This revision hasn't been broadly deployed or tested yet, but it provides a richer upgrade experience: By default, there's a progress indicator. With -vvv, you can get a detailed report/log of the upgrade steps as they execute. With -vvv --dry-run, you can ...


2

That would be nice, but I am afraid it is not there (yet). When you lookup the list of cv commands in de source on GitHub, you will not find this command. However, using the drush source code as inspiration you can create a small script <?php $codeVer = CRM_Utils_System::version(); $dbVer = CRM_Core_BAO_Domain::version(); if (version_compare($...


2

Thanks to the helpful comments, I conclude: Yes it can, with a bit of help. TL;DR you need to define CIVICRM_CMSDIR in your code you need set CIVICRM_SETTINGS as an environment var Longer version As far as I can work out, cv sources civicrm.settings.php before it sources wp-config.php. So if, like me, you have config set in civicrm.settings.php that ...


2

For those that use cv is also possible to use: echo '{"enable_components" :["CiviContribute","CiviMember","CiviMail","CiviReport","CiviEvent"] }' | cv api Setting.create --in=json


2

Thanks to passing JSON objects to drush cvapi I found a solution: echo '{"enable_components" :["CiviContribute","CiviMember","CiviMail","CiviReport","CiviEvent"] }' | drush cvapi Setting.create --in=json


2

Did you run check-req with the --cms-base-url argument? It needs to be specified there too.


1

Is the user "admin" defined in Drupal? If not some commands will not fire under cv. cv needs a user under "username" that is recognized by Drupal as having the rights to fire the command you're interested in. I had this same issue myself which was fixed by identifying an authorized Drupal user.


1

Yes, it is possible, but you have to use some bash magic. For disabling it is: echo '{"logging":0}' | cv api Setting.create --in=json (In case you forget, cv help api shows an example of the bash trick)


1

It's also worth noting that if you're using civicrm-buildkit to create your test sites (highly recommended) you can also rebuild a site with civibuild reinstall.


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