Is there any way to fetch the base url of the project from an hmvc context without setting the base_url config option? I moved a view creation to hmvc context and now the links are broken.
My bad. Misread the cause. No wonder it was so frustrating. Followup question: is there any way to get the base_url of the server from inside of a task?
In the "frontend", you can use Uri::base() to get the generated base url, either from what you have defined, or by using an auto-detection mechanism.
That mechanism doesn't work in anything that runs from the commandline (including tasks), because there is no webserver and no web host context, so no way to auto detect your base url. The only way around that is to hard code it, or to have your frontend cache it somewhere so that your tasks can pick up the base url stored at runtime...