0

When I run /usr/local/bin/cv api --quiet --user=CRC --cwd=/var/www/html job.execute, my mailings have URLs where the site name is replaced by civicrm, e.g.: https://civicrm/mailing/url/?u=81&qid=7915. CRC is an Administrator role.

  • wp-cli has the same problem.
  • Running via Scheduled Jobs in the UI doesn't have a problem.
  • cv ev --user=CRC '$t = Civi::paths()->getUrl("foo.txt"); echo $t;' renders the URL correctly.
  • cv vars:show returns the correct URL.
  • PHP version is the same on CLI and mod_php.
  • I've visited and resaved the "permalinks" page.
  • Mosaico isn't in use.
  • Problem existed on 5.43.2, and persisted after an update to 5.50.3.
  • It exists both with and without the following in civicrm.settings.php:
civicrm_paths['wp.frontend.base']['url'] = 'https://mysite.org/';
$civicrm_paths['wp.backend.base']['url'] = 'https://mysite.org/wp-admin/';
$civicrm_setting['domain']['userFrameworkResourceURL'] = 'https://mysite.org/wp-content/plugins/civicrm/civicrm';

It seems like a problem with the base URL, but the base URL looks fine - and that would screw up Civi::paths()->getUrl(), right?

1
  • Does it require $civicrm_paths['civicrm.root']['url'] = CIVICRM_UF_BASEURL . 'wp-content/plugins/civicrm/civicrm'; at the end of the civicrm.settings.php file? Jun 22 at 10:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.