FreeMarker syntax is invalid.

Can't compare values of these types. Allowed comparisons are between two numbers, two strings, two dates, or two booleans.
Left hand operand is a string (wrapper: f.t.SimpleScalar).
Right hand operand is a number (wrapper: f.t.SimpleNumber).
The blamed expression:
==> fileEntryId != 0 [in template "template_id" at line 65, column 10]

----
FTL stack trace ("~" means nesting-related):
- Failed at: #if fileEntryId != 0 && (content?has_... [in template "template_id" at line 65, column 5]
----