Generate slugs task: generate for physical object

Similar to the issue in #5263.