7 votes

passing JSON objects to drush cvapi

Here is how to pass an array to drush echo '{"retrieval_parameters":{"jobId":97727336,"filePath":"Raw Recipient Data Export May 15 2017 22-07-43 PM 674.zip"}}' | drush cvapi Omnirecipients.get --in=...
user4278's user avatar
  • 1,021
7 votes
Accepted

Can I chain API calls through drush?

Drush can read parameters from standard input in JSON format if you supply the argument --in=json. This is what we need for API chaining, because chaining uses nested parameters, and in contrast to a ...
Noah Miller's user avatar
  • 1,057
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 ...
Experiance Tranquility's user avatar
4 votes
Accepted

Is command-line upgrade broken on CiviCRM 4.7.7?

Someone actually provided the answer to another person on the CiviCRM chat channel, so I'm posting it here: <juri_> "You have requested a non-existent service 'sql_triggers'." <juri_> ...
Jon G - Megaphone Tech's user avatar
4 votes
Accepted

How do I use cv to run database upgrades from the command line?

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 ...
Tim Otten's user avatar
  • 5,684
4 votes

Cron job has started producing output

Not sure why it's suddenly started producing output when it didn't previously, but you could use: #!/bin/sh a=`drush -r /home/crwheelmen/www/www --quiet civicrm-api job.execute` if echo $a | grep -qv ...
Aidan's user avatar
  • 13.4k
3 votes

Civi 5.x not recognizing PHP 7.1 in Drush

That sounds like your command line version of php is different to the one being used by your webserver. See eg https://drupal.stackexchange.com/questions/44967/the-php-version-is-not-correctly-...
Aidan's user avatar
  • 13.4k
3 votes
Accepted

Drush sql-sync and civicrm issue

In stead of using drush for this, I use the "mysqldump --skip-triggers"command exactly for that reason: mysqldump --skip-triggers -u db_user -pdb_password db > export.sql
Webmaster COVS's user avatar
3 votes

Drush sql-sync and civicrm issue

Civicrm utilises sql triggers for a number of purposes - including but not limited to populating values into the log_civicrm_% tables - if you have logging turned on under Admin -> System Settings -> ...
Luke Stewart's user avatar
  • 1,855
3 votes
Accepted

Drush cannot disable civicrm debug

The civicrm-disable-debug command isn't defined in civicrm_drush_command(). See line 155: $items['civicrm-enable-debug'] = array( 'description' => "Enable CiviCRM Debugging.", ); To solve this ...
Jon G - Megaphone Tech's user avatar
3 votes
Accepted

Funky errors in 'drush cvup' / 'drush cvupdb'

I ran into a similar problem when manually updating. Depending on how your database is configured the update will fail when trying to change the image_URL from VARCHAR(256) to VARCHAR(512). I wasn't ...
Sleewok's user avatar
  • 1,146
3 votes
Accepted

Install CiviCRM without installing the database. And install the database without installing CiviCRM

From the excellent interactive documentation here -- https://buildkit.civicrm.org/#/tutorials (which is almost impossible to find unless you know where to look): ## Download application (with ...
DMCoding's user avatar
  • 361
3 votes
Accepted

How do I access drush commands specific to CiviCRM?

The readme for cv needs updating. It's now tested pretty well with drupal 8. I would use cv instead. See also https://lab.civicrm.org/dev/drupal/-/issues/76
Demerit's user avatar
  • 22.8k
2 votes

Is it easy to upgrade CiviCRM using drush?

I use the following for Drupal 7 which I find a straightforward process: (I do this on a development copy of the site first to check for issues) cd public_html/sites/all/modules // go to modules ...
Ben's user avatar
  • 946
2 votes

Is it easy to upgrade CiviCRM using drush?

another helpful thing that I do when using drush for civi upgrades: since drush does not give you any information about where in the process the upgrade is (the GUI has the progress bar that says what ...
ericG's user avatar
  • 600
2 votes

DB Error: unknown error

Sorry for the late post here, but this tip might help someone going forward with this error. I too was receiving this error on a fresh install of CiviCRM with WordPress. It was noted there were ajax ...
406CODE's user avatar
  • 301
2 votes

Drush failing to build database during new installation

This error can happen if you attempt to load a CiviCRM DB over the top of an existing DB. It's possible that's what you're running into here. Looks like there are two files in the CiviCRM ...
Chris Burgess's user avatar
2 votes
Accepted

What's the optimal way to install and track CiviCRM with Drupal and git?

Drush can support VCS deployments and you can tell drush make to keep the .git directory with "drush make --working-copy your-platform.make". However, unless it's changed recently, drush doesn't have ...
bgm's user avatar
  • 3,421
2 votes
Accepted

Error Backing Up Database using drush: Call to undefined function drush_sql_dump_execute()

I would bet almost 100% that you're using drush 7 or higher. The function drush_sql_dump_execute doesn't exist in drush 7. Support for drush 7 was added as of CiviCRM 4.5.5 - see CRM-15567. That ...
Jon G - Megaphone Tech's user avatar
2 votes
Accepted

Why do I get fatal error, memcached set failed?

The fact that the error appears suddenly suggests that a memcached server was used by your system, but is not available anymore. The purpose of this server is to make the PHP execution faster (it ...
Kainuk - CiviCooP's user avatar
2 votes

Is it possible to set the list of CiviCRM components from the command line using drush

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

Is it possible to set the list of CiviCRM components from the command line using drush

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=...
Kainuk - CiviCooP's user avatar
2 votes

Error: Cron Not Running

I may have solved this with the following steps. create a drush alias for the site configure crontab using the drush alias Drush alias (~/.drush/example.aliases.drushrc.php) <?php $aliases['...
Brylie Christopher Oxley's user avatar
2 votes

How do I use cv to run database upgrades from the command line?

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 ...
Kainuk - CiviCooP's user avatar
2 votes
Accepted

How can I download CiviCRM tar file with Drush?

Mathieu a.k.a @bgm (who runs much of the CiviCRM project's infrastructure) wrote this: https://forum.civicrm.org/index.php?topic=30003.msg128559#msg128559 To summarize: [I checked the link to that ...
KarinG - Semper IT's user avatar
2 votes
Accepted

Disabling Scheduled Jobs, Transactions, etc (from command line)?

Setting the environment to Staging/Development will turn off all schedule job from running unless you explicitly specify runInNonProductionEnvironment=TRUE in job parameter and also no emails will be ...
Pradeep Nayak's user avatar
1 vote

Need help with export.php (CiviCRM 4.6 & Drupal 7)

There are a few things that can help you out: Most importantly, the API Explorer (Support menu » Developer » API Explorer). It will build your drush command for you through a GUI. You can see there ...
Jon G - Megaphone Tech's user avatar
1 vote
Accepted

Define CIVICRM_LOGGING_DSN in PHP?

It's not a setting you can set with Civi::settings. You can set it with a define() anywhere outside of civicrm.settings.php, but it would need to run that section in your file before running the code ...
Demerit's user avatar
  • 22.8k
1 vote

What's the best way to fix this Drush clear cache bug?

I'm going to add an answer (don't want to bury this in the comments) that for a 4.7.17 - with two separate databases - drupal and civicrm; this is NOT an issue; My view with custom data before and ...
KarinG - Semper IT's user avatar
1 vote
Accepted

passing JSON objects to drush cvapi

the drush api command needs to be made "json aware" it seems indeed. It shouldn't be too complicated, want to give it a go and patch it?
Xavier's user avatar
  • 10.2k

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