1

I have a content type with an image field. When I send a test mail with the simplenews module I get an image with an absolute path in email and see the image, but when I send it with cron I get a broken image because image url is relative. How can I solve this problem?

I am using simple news 6.x-1.3.

2

How are you calling cron?

You need to make sure that the base_url is set.

E.g., when calling cron with drush, you need to provide the --uri http://example.org parameter.

  • thank u.i call it with cron jobs in cpanel and it run cron.php. where i set base_url? – user780 Jan 7 '12 at 15:06
  • 1
    Make sure you're accessing cron.php with the right domain instead executing directly with php or localhost or something like that. If you do that, then I'm not sure. Try invoking cron on Drupal's status page, does it work then? – Berdir Jan 7 '12 at 15:34
  • yes.you r right. when i run cron with url it works! but when cron run with cron jobs it have a problem. command in cron jobs is php/home/"username"/public_html/cron.php. what should command-in cron jobs- be to work with cron jobs? – user780 Jan 7 '12 at 16:24
  • 1
    You can call cron with curl or wget (this is recommended over php anyhow), for example: curl --silent --compressed http://example.com/cron.php. (Or for D7 use the cron path with key appended that you find on admin/reports/status). – arjan Jan 7 '12 at 18:32
  • thank u arjan but it seems this command doesn't work in my host. – user780 Jan 8 '12 at 8:07

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.