Globals asset attribute redirect url returns nothing


(gja) #1

Hi,

We are using edit+ to create a link to a redirect asset. In the manuals it says

When linking a Redirect Page asset within the Edit+ for Squiz Matrix interface, using the Edit+ Editor, an additional Use Redirect Link Destination field will be displayed.

This inserts into the source<a href="%globals_asset_attribute_redirect_url:<asset ID>%" data-linktype="page_redirect">link text</a>

However, this keyword replacement doesn’t seem to be working rendered html is
<a href="" data-linktype="page_redirect">link text</a>

Is there a bug? or is there something extra we need to do to make this work as described in the manuals?

Matrix Version: 5.3.2.1


(Bart Banda) #2

That’s weird, should just work. You definitely have read access to that asset? And is the Redirect Asset live and publicly accessible?


(gja) #3

I’ve checked the various assets

  • standard page: it is live and has public read,
  • redirect asset live and public read
  • asset it is linking to (within the same instance of matrix) is also live and has public read.

Interestingly if the redirect asset has a url and not an assetID - then the keyword works as expected.


(Bart Banda) #4

Hmm, does the asset you are pointing to have a URL on it?

What happens if you just print %globals_asset_url:% where asset ID is the asset your redirect page is pointing to?


(gja) #5

Ok,

my redirect asset is (Id: #25684) %globals_asset_attribute_redirect_url:25684% produces nothing.

The location it is using is #22494 - %globals_asset_url:22494% produces the correct url.

Certainly seems odd.


(Bart Banda) #6

Damn, I can replicate as well in latest 5.3. I’ve loged a bug report here https://squizmap.squiz.net/matrix/9914 and we’ll aim to get it fixed asap.

The following keyword alternative seems to work though: %globals_asset_assetid:9594^as_asset:redirect_url%


(Trine Paerata) #7

I found when linking to a redirect link in edit+, once you select the link tool you then have to go into “find asset” and add ID this way, to get the extra option “Use Link Destination”. I find this impractical when you have a large site with redirect links sitting throughout and an asset listing to identify their asset id. I would prefer to type in the “redirect link asset id” and that option be available.


(Bart Banda) #8

We’re changing that in 5.4 so that when you enter the ID in manually and if that ID is a link or redirect asset, it will automatically turn that option on. https://squizmap.squiz.net/matrix/9565