As designed Graphic in Notice not showing in some areas

Bionic Rooster

Well-known member
Affected version
xf 2.0.0. RC3
On the forum page the graphic shows in the notice however it shows as a broken link on What's new, Media, Resources, and Members page.
Screenshot_1.webp
Screenshot_2.webp
Am I missing something? Or is this a bug?
 
Could you post the code you've entered for the notice? We should be able to tell you what's going wrong once we see that.
 
Here you go
Code:
<div align="center"><img src="styles/default/xenforo/icons/lestweforget.jpg" width="480" height="253" /></div>
It's strange to me that it works on the forum page but not the others.
Thanks,
 
Try changing that <img src> to use an absolute URL.

If your styles directory lives at http://yourforum.com/path/to/your/forum/styles, you would use /path/to/your/forum/styles/default/xenforo/icons/lestweforget.jpg as the image source.
 
Try changing that <img src> to use an absolute URL.

If your styles directory lives at http://yourforum.com/path/to/your/forum/styles, you would use /path/to/your/forum/styles/default/xenforo/icons/lestweforget.jpg as the image source.
Yup that worked, thanks.
Any idea why the other method worked on forum page and not the others?
I guess I'll have to include the full URL in the future for XF2? "styles/default/xenforo/icons/lestweforget.jpg" works fine in XF1.5.xx
 
Yup that worked, thanks.
Any idea why the other method worked on forum page and not the others?
I guess I'll have to include the full URL in the future for XF2? "styles/default/xenforo/icons/lestweforget.jpg" works fine in XF1.5.xx

it would probbaly work with a slash in front of styles ( /styles/default/xenforo/icons/lestweforget.jpg ) so that the path starts at the root.
 
Yup that worked, thanks.
Any idea why the other method worked on forum page and not the others?
I guess I'll have to include the full URL in the future for XF2? "styles/default/xenforo/icons/lestweforget.jpg" works fine in XF1.5.xx
We no longer hard code the base URL into the page, therefore URLs are always relative to the page you're on, rather than some base URL that we detect. This has been a big improvement behind the scenes as the base URL approach effectively screws up a lot of stuff (or at least makes it more difficult).

If your forum URL is https://example.com/ then styles/blah.jpg would be relative to that, e.g. https//example.com/styles.blah.jpg. If you navigate to https://example.com/members/ (for example) then styles/blah.jpg would be relative to that, e.g. https://example.com/members/styles/blah.jpg which is not going to work.

If your site is at the root like this, then it's just as simple as adding a / at the beginning e.g. /styles/blah.jpg. If your site is like ours, e.g. in the community directory then you would need to use /community/styles/blah.jpg.

So, this is as designed.
 
Back
Top Bottom