How to set a dynamic title in plugin on entry save?
To get more code into the template field that generates the title I tried importing a macro, but this didn't work. So squeezing it into the 255 chars is probably our only chance here. So it would be in fact better to do it with plugin.

To get your plugin code working you should use entries.onBeforeSaveEntry instead of entries.onSaveEntry.

Because when this event is triggered, it's already too late to update $event-&gt;params['entry'] properties for your save.

Another thing to change is setContentFromPost(). Change the ContentModel directly
$entry-&gt;getContent()-&gt;title = $fullTitle;