I have a plugin that starts a task and subtasks from a CP widget AJAX call. The tasks are running without a hitch, but for some reason on production, the icon does not appear when the tasks start running unless I refresh the page.

On my local dev site (MAMP), the task icon appears as soon as the code below is called.

I am using this code to start the pending tasks I created:


Any ideas? Is there a different JS command I should be using?

  • I've seen that on some setups with gzip compression enabled (either at the Apache level or at the PHP level). Might be worth checking.
    – Brad Bell
    Mar 11, 2015 at 22:17
  • Yup, it looks like that is the case. Any thoughts on getting around it? It isn't imperative that the circle displays, but the visual feedback is nice. Mar 12, 2015 at 20:53
  • We've spent a ton of time looking into it and it comes down to the fact that PHP sucks. Workaround is to set buildwithcraft.com/docs/config-settings#runTasksAutomatically to false and setup an external cron job to trigger tasks.
    – Brad Bell
    Mar 12, 2015 at 20:55

1 Answer 1


I use this to force the task icon to show up immediately:

    "id": "task ID",
    "level": "0",
    "description": "description",
    "status": "running",
    "progress": 0

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.