When using a Metadata template or NTP Job template, the following scenarios can occur:
Validation warnings:
Unable to resolve the remaining syntax
{% if entity.attributes['en_US']['APPCHA Licensing Window Start']|| entity.attributes['en_US']['APPCHA Licensing Window End'] %}{% endif %}
Solution
{% if entity.attributes['en_US']['APPCHA Licensing Window Start']or entity.attributes['en_US']['APPCHA Licensing Window End'] %}{% endif %}
Cause
|| is not a supported LiquidJS logic operator.
There are 2 types of LiquidJS operators Operators | LiquidJS supported:
Comparison operators: ==, !=, >, <, >=, <=
Logic operators: or, and
Pop-up error
unexpected token at "OR entity.att...", line:2, col:1
{% if entity.attributes['en_US']['Role'] OR entity.attributes['en_US']['Cast'] %}{% endif %}
Solution
{% if entity.attributes['en_US']['Role'] or entity.attributes['en_US']['Cast'] %}{% endif %}
Cause
OR is not a supported LiquidJS logic operator.
There are 2 types of LiquidJS operators Operators | LiquidJS supported:
Comparison operators: ==, !=, >, <, >=, <=
Logic operators: or, and
Validation warnings:
The following attribute(s) have not been defined
{% for category in entity.attributes['en_US']['Category' | escape ] %}<App_Data App="MOD" Name="Category" Value="{{category}}"/>{% endfor %}
Solution
{% for category in entity.attributes['en_US']['Category'] | escape %}<App_Data App="MOD" Name="Category" Value="{{category}}"/>{% endfor %}
Cause
Wrong LiquidJS syntax. escape
is a filter that needs entity.attributes['en_US']['Category']
as input string.
Pop-up error
illegal tag: {% for IMDB ID in entity.attributes['en_US']['PRIME IMDB ID'] %}, line:5, col:1
{% for IMDB ID in entity.attributes['en_US']['PRIME IMDB ID'] %}<IMDB>{{IMDB ID}}</IMDB>{% endfor %}
Solution
{% for IMDBID in entity.attributes['en_US']['PRIME IMDB ID'] %}<IMDB>{{IMDBID}}</IMDB>{% endfor %}
Cause
Wrong LiquidJS syntax. The for
variable name must be a valid one.
Validation warnings:
Unable to resolve the remaining syntax
{% if entity.attributes['en_US']['Actors'].size > 0 %}<credit role="actor">{% for actor in entity.attributes['en_US']['Actors'] %}<name>{{actor}}</name>{% endfor %}</credit>{% endif %}
Solution
{% assign actorsArraySize = entity.attributes['en_US']['Actors'] | size %}{% if actorsArraySize > 0 %}<credit role="actor">{% for actor in entity.attributes['en_US']['Actors'] %}<name>{{actor}}</name>{% endfor %}</credit>{% endif %}
Cause
You can not use filters with dot notation. Use the pipe notation instead.
For example: collection.size
is not supported. Use collection | size
instead.
Pop-up error
unexpected token at "> 0", line:1, col:1
{% if entity.attributes['en_US']['Actors'] | size > 0 %}<credit role="actor">{% for actor in entity.attributes['en_US']['Actors'] %}<name>{{actor}}</name>{% endfor %}</credit>{% endif %}
Solution
{% assign actorsArraySize = entity.attributes['en_US']['Actors'] | size %}{% if actorsArraySize > 0 %}<credit role="actor">{% for actor in entity.attributes['en_US']['Actors'] %}<name>{{actor}}</name>{% endfor %}</credit>{% endif %}
Cause
You can not use filters with pipe notation inside a LiquidJS tag (operation). Save the collection size separately, in a variable and then use it.
{% assign size = collection | size %}
(1) value not populated for
entity.attributes['en_US']['MovieRatingADI']
entity.attributes['en_US']['Movie_HD']['properties']['format']['duration']
entity.attributes['en_US']['RatingMPAA-TV']
entity.attributes['en_US']['Episode_HD']['properties']['format']['duration']
when occurred in Metadata template
OR
(2) Validation error at Job validation when occurred in NTP Job template
Validation errors:
undefined variable: MovieRatingADI, line:0, col:2, line:5, col:3
{% if entity.attributes['en_US']['EpisodeNumber'] != "" %}{% assign parentalValue = entity.attributes['en_US']['MovieRatingADI'] %}{% assign assetLengthValue = entity.attributes['en_US']['Movie_HD']['properties']['format']['duration'] | round %}{% assign fileNameValue = "Movie_HD" %}{% else %}{% assign parentalValue = entity.attributes['en_US']['RatingMPAA-TV'] %}{% assign assetLengthValue = entity.attributes['en_US']['Episode_HD']['properties']['format']['duration'] | round %}{% assign fileNameValue = "Episode_HD" %}{% endif %}
Solution
{% assign parentalValueMovie = entity.attributes['en_US']['MovieRatingADI'] %}{% assign assetLengthValueMovie = entity.attributes['en_US']['Movie_HD']['properties']['format']['duration'] | round %}{% assign parentalValueEpisode = entity.attributes['en_US']['RatingMPAA-TV'] %}{% assign assetLengthValueEpisode = entity.attributes['en_US']['Episode_HD']['properties']['format']['duration'] | round %}{% if entity.attributes['en_US']['EpisodeNumber'] != "" %}{% assign parentalValue = parentalValueMovie %}{% assign assetLengthValue = assetLengthValueMovie %}{% assign fileNameValue = "Movie_HD" %}{% else %}{% assign parentalValue = parentalValueEpisode %}{% assign assetLengthValue = assetLengthValueEpisode %}{% assign fileNameValue = "Episode_HD" %}{% endif %}
Cause
If inside the for/if/elsif/else body there are reference paths (found as LiquidJS output values, or in any operations e.g. assign/for/if/elsif/else etc.), that have not been used outside it (this is their first appearance), these reference paths will not be solved with data fetched from our application.
In order to be populated with data from our application, the syntax reference must:
for
operation{% for adBreak in entity.tags['MOV_Feature_HD'].userProperties.adBreaks %}{{adBreak.timecode}}{% endfor %}
if
{% if entity.attributes['en_US']['Trailer_TimedText']['filename']%}{{entity.attributes['en_US']['Trailer_TimedText']['filename']}}{% endif %}
{% if entity.attributes['en_US']['Role'] and entity.attributes['en_US']['Cast'] %}{{entity.attributes['en_US']['Role']}}{{entity.attributes['en_US']['Cast']}}{% endif %}
(1) value not populated for entity.attributes['en_US']['Trailer HD']['md5']
when occurred in Metadata template
OR
(2) Validation error at Job validation when occurred in NTP Job template
Validation errors:
undefined variable: md5, line:0, col:2, line:4, col:7
{% if entity.attributes['en_US']['Trailer HD']['filename'] %}<Content type="trailer "><Filename>{{entity.attributes['en_US']['Trailer HD']['filename']}}</Filename><Checksum>{{entity.attributes['en_US']['Trailer HD']['md5']}}</Checksum></Content>{% endif %}
Solution
<Content type="trailer ">{% if entity.attributes['en_US']['Trailer HD']['filename'] %}<Filename>{{entity.attributes['en_US']['Trailer HD']['filename']}}</Filename>{% endif %}{% if entity.attributes['en_US']['Trailer HD']['md5'] %}<Checksum>{{entity.attributes['en_US']['Trailer HD']['md5']}}</Checksum>{% endif %}</Content>OR{% if entity.attributes['en_US']['Trailer HD']['filename']and entity.attributes['en_US']['Trailer HD']['md5'] %}<Content type="trailer "><Filename>{{entity.attributes['en_US']['Trailer HD']['filename']}}</Filename><Checksum>{{entity.attributes['en_US']['Trailer HD']['md5']}}</Checksum></Content>{% endif %}
Cause
If inside the for/if/elsif/else body there are reference paths (found as LiquidJS output values, or in any operations e.g. assign/for/if/elsif/else etc.), that have not been used outside it (this is their first appearance), these reference paths will not be solved with data fetched from our application.
In order to be populated with data from our application, the syntax reference must:
for
operationif
(1) value not populated for entity.attributes['en_US']['Trailer_TimedText']['filename']
when occurred in Metadata template
OR
(2) Validation error at Job validation when occurred in NTP Job template
Validation errors:
undefined variable: filename, line:0, col:2, line:3, col:3
{% if entity.attributes['en_US']['Trailer_TimedText'] %}{{entity.attributes['en_US']['Trailer_TimedText']['filename']}}{% endif %}
Solution
{% if entity.attributes['en_US']['Trailer_TimedText']['filename'] %}{{entity.attributes['en_US']['Trailer_TimedText']['filename']}}{% endif %}OR{% if entity.attributes['en_US']['Trailer_TimedText']and entity.attributes['en_US']['Trailer_TimedText']['filename'] %}{{entity.attributes['en_US']['Trailer_TimedText']['filename']}}{% endif %}
Cause
If inside the for/if/elsif/else body there are reference paths (found as LiquidJS output values, or in any operations e.g. assign/for/if/elsif/else etc.), that have not been used outside it (this is their first appearance), these reference paths will not be solved with data fetched from our application.
In order to be populated with data from our application, the syntax reference must:
for
operationif
(1) value not populated for entity.attributes['en_US']['MEC-LanguageForeingActors']
when occurred in Metadata template
OR
(2) Validation error at Job validation when occurred in NTP Job template
Validation errors:
undefined variable: MEC-LanguageForeingActors, line:0, col:2, line:6, col:29
{% for actor in entity.attributes['en_US']['ForeingActorNames'] %}<md:DisplayName language="{{entity.attributes['en_US']['MEC-LanguageForeingActors']}}">{{actor | escape }}</md:DisplayName>{% endfor %}
Solution
{% assign languageActors = entity.attributes['en_US']['MEC-LanguageForeingActors'] %}{% for actor in entity.attributes['en_US']['ForeingActorNames'] %}<md:DisplayName language="{{languageActors}}">{{actor | escape }}</md:DisplayName>{% endfor %}
Cause
If inside the for/if/elsif/else body there are reference paths (found as LiquidJS output values, or in any operations e.g. assign/for/if/elsif/else etc.), that have not been used outside it (this is their first appearance), these reference paths will not be solved with data fetched from our application.
In order to be populated with data from our application, the syntax reference must:
for
operationif
(1) value not populated for
entity.attributes['en_US']['MEC-RatingSystem']
entity.attributes['en_US']['MEC-RatingValue']
entity.attributes['en_US']['MEC-RatingReason']
when occurred in Metadata template
OR
(2) Validation error at Job validation when occurred in NTP Job template
Validation errors:
undefined variable: MEC-RatingSystem, line:0, col:2, line:6, col:29
{% for ratingsCountry in entity.attributes['en_US']['MEC-CountryCodeRating'] %}{{ratingsCountry}}{{entity.attributes['en_US']['MEC-RatingSystem']}}{{entity.attributes['en_US']['MEC-RatingValue']}}{% if entity.attributes['en_US']['MEC-RatingReason'] %}{{entity.attributes['en_US']['MEC-RatingReason']}}{% endif %}{% endfor %}
Solution
{% assign attributeMECRatingSystem = entity.attributes['en_US']['MEC-RatingSystem'] %}{% assign attributeMECRatingValue = entity.attributes['en_US']['MEC-RatingValue'] %}{% if entity.attributes['en_US']['MEC-RatingReason'] %}{% assign attributeMECRatingReason = entity.attributes['en_US']['MEC-RatingReason'] %}{% endif %}{% for ratingsCountry in entity.attributes['en_US']['MEC-CountryCodeRating'] %}{{ratingsCountry}}{{attributeMECRatingSystem}}{{attributeMECRatingValue}}{% if entity.attributes['en_US']['MEC-RatingReason'] %}{{attributeMECRatingReason}}{% endif %}{% endfor %}
Validation error at Job validation when occurred in NTP Job template, because the file.properties.streams
value is not populated.
Validation errors:
undefined variable: properties, line:1, col:11, line:3, col:3
Validation warnings:
Unable to resolve the remaining syntax
{% assign trackIndex = 1 %}{% capture audioSelectors %}{% for stream in file.properties.streams %}{% if stream.codecType == "audio" %}{"AudioTypeControl": "FOLLOW_INPUT","AudioSourceName": "Audio Selector {# trackIndex #}","CodecSettings": {"Codec": "WAV","WavSettings": {"BitDepth": 16,"Channels": {# stream.channels #},"SampleRate": 48000,"Format": "RIFF"}},"LanguageCodeControl": "FOLLOW_INPUT"},{% assign trackIndex = trackIndex | plus: 1 %}{% endif %}{% endfor %}{% endcapture %}{# audioSelectors | slice: 0, -1 #}
Solution
{% assign streams = file.properties.streams %}{% assign trackIndex = 1 %}{% capture audioSelectors %}{% for stream in streams %}{% if stream.codecType == "audio" %}{"AudioTypeControl": "FOLLOW_INPUT","AudioSourceName": "Audio Selector {# trackIndex #}","CodecSettings": {"Codec": "WAV","WavSettings": {"BitDepth": 16,"Channels": {# stream.channels #},"SampleRate": 48000,"Format": "RIFF"}},"LanguageCodeControl": "FOLLOW_INPUT"},{% assign trackIndex = trackIndex | plus: 1 %}{% endif %}{% endfor %}{% endcapture %}{# audioSelectors | slice: 0, -1 #}
Cause
If inside the for/if/elsif/else body there are reference paths (found as LiquidJS output values, or in any operations e.g. assign/for/if/elsif/else etc.), that have not been used outside it (this is their first appearance), these reference paths will not be solved with data fetched from our application.
In order to be populated with data from our application, the syntax reference must:
for
operationif