Make sure object field is properly set, since the rest of the function uses it
Improve robustness of index autcreation
Fix invalid toolbar urls
Make sure we're actually testing a tree
Fix logic error
Avoid db queries on invalid IDs
Avoid some unecessary db queries
Make sure we have the right campaign type
Make sure we have the necessary privileges
Small robustness improvement
Add missing config key