(--------)
You can use:
caption %filename()
This is not working on online server
But
footer%filename()endfooter
footer
%filename()
endfooter
Does work - it has no filename defined online so shows blank, but this way doesn't crash.
Yes, there is no filename defined on online server as I write in my answer: