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
CRC is an Administrator role.
wp-clihas 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:showreturns 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_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