The metadata field is the bound to the UI. When I start a preview of the gallery I see the trace statement with the correct value in the log file from the UI. But Lightroom gets stuck displaying a progress bar top left. The action is named "Update Web Gallery". If I then generate the gallery the grid page gets generated correctly aswell. But no images are exported.
If I replace the function with a fixed string like "test" it all works perfectly. Is there a solution to this? I really really don't understand what is going wrong.