Asset builder prefixing spurious PHP code in created bodycopy


(Anthony) #1

Has anyone experienced any odd behaviour with the asset builder recently? We upgraded a couple of weeks ago from 4.16 to 5.1 and on investigating a problem with one of our image upload features I've found the confirmation page returned by the asset builder includes some junk characters and a huge chunk of PHP code prefixing the actual html specified in the "created" bodycopy. I have some JS code that parses the return, which should just include a simple DIV with the asset ID of the created asset, and its failing because of all the junk prefixed on the front. I can work around it, but seems like a bug to me. There is a blank design specified and no paint layout, so should literally be seeing the couple of lines of HTML. Worked fine for years up until we upgraded.

 

Any thoughts appreciated

Tony

 


(Bart Banda) #2

Sounds similar to a recent bug report we got for asset builders in Squizmap (https://squizmap.squiz.net/matrix/6306):

 

 

When creating an asset builder, edit the "Created" body copy and you get the following:<a href="%%created_asset_url%%">here</a>

The issue is the double %% around the created_asset_url keyword which means the link doesn't go anywhere meaningful. In most cases this screen would be customised and probably picked up, but it's an issue if you just want a quick and easy default asset builder.

This was checked on 5.1.4.4 but I could not replicate on 5.0.3.1

 

If you are a Squiz client, I suggest you lodge a support ticket to get it looked at further so that the development team can review if its a bug or not and fix if needed.


(Anthony) #3

A quick update for anyone else reading this thread in the future... we logged the bug with Squiz (UK) and they implemented a fix within a few days. Nothing needed to change on our side and my code that parses the return from the asset builder started working again. I dont know what patch exactly was applied or whether this will be in a future 5.1.x update release. But if you have a similar issue, certainly get on to squiz support.