Issue with globals_asset_version keyword

(John G) #1

Matrix Version:

Hi Friendos,

I am experimenting with the AUS gov template in the Squiz marketplace,

In the <head> design nester is the following code-

<link href="./?a=1472251?v=%globals_asset_version:1472251%" rel="stylesheet">

However, this causes a 404 error-

Failed to load resource: the server responded with a status of 404 ()

If I remove the globals_asset_version keyword, it works fine e.g.

Is there an issue with the globals_asset_version keyword?

I also noticed a similar problem with images and favicons in the header nester, the code is as follows-

<img class="au-header__brand-image" alt="%globals_site_metadata_site_logo^as_asset:asset_attribute_alt%" src="%globals_site_metadata_site_logo^as_asset:asset_url%">


<link rel="shortcut icon" href="%globals_site_metadata_site_favicon^as_asset:asset_url%">

but on the front end appears without a src,

<img class="au-header__brand-image" alt="Site logo" src="">

<link rel="shortcut icon" href="">

Do these keywords work or am I missing something else?

Thanks for your help!

(John gill) #2

Normal convention is to use a ?v= before the %globals_asset_version% because the question mark in ./?a=12345 will be replaced with /real/url/ leaving you with /real/url?v=0.5

If, however, asset 12345 has no URL, you end up with

/real/url/?a=12345?v=0.5 instead of

Nothing to do with the keyword, but you’ll need to make sure the asset in question has a real URL, or change the ?v to &v and make sure it doesn’t have a real URL.

(John G) #3

Mate Can you believe I had not set URLs to my Resources and Assets folders yet. Some things you have to learn the hard way. Thanks!