Fixed Asset path adding /install/

Russ

Well-known member
Affected version
2.2.2
I've seen this happen on two client sites and maybe it's something I'm doing incorrectly.

On my dev site their styles will be set up with asset locations:
Asset key: stylefolder // Asset path: styles/stylenamehere

Inside Style properties -> Basic options, I set:

Code:
%ASSET:stylefolder%/xenforo/logo.png

Exporting the style onto their 2.2.1 worked just fine. When they went to upgrade the image is missing as it's trying to call:
/install/styles/stylenamehere/xenforo/logo.png

Any thoughts?
 
Last edited:
I've just come across this too after upgrading to 2.2.2.

My asset location (in the theme settings) was assigned to:
Code:
data://styles/36/styles/xenfocus/dimension

This worked on 2.2.1. However after upgrading, the URL on the frontend was adding an /install/ folder to the path which broke the image.

To fix this, I simply had to edit the asset location in the Admin Panel to a new value, such as:
Code:
data://styles/36/styles/xenfocus/dimensionXXX

I pressed save. Then I edited the value again back to it's original value (removing the XXX from the end), pressed save and it worked. This makes me believe it's an issue with the xenforo asset system rather than our code.
 
I experienced a similar problem with asset location paths incorrectly resolving also with 2.2.1 but under a different circumstance. I am using a xenfocus theme and reported the issue to @Ehren on his support forum yesterday and prefaced it that my suspicion was a bug in XF and not his theme.

In my case, I moved the forum from local test server using url http://domain.local/xenforo/ to live server url https://domain.xyz/forums/ , updated the appropriate urls in the acp options, and the asset location paths were removing the sub folder from the url. The fix Ehren describes above of editing the asset location definitions in the style fixed the issue.

Also worth a mention, running 'php cmd.php xf:rebuild-master-data' on my local test server replicated the issue and removed the sub folder from the asset location path.
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.3).

Change log:
Ensure that when building URLs to the external data directory, we always build the URL relative to the root XF directory.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top Bottom