To keep BC, the `urlgenerator` argument must be the last one and optional.