Background image issue - I'm baffled

adgsteve

Member
I've done this several times before but this time I'm baffled. I want to use an image for the body background but the one I want to use won't take. I can only get one image to work and it's not the one I want.

So, can anyone tell me why this code works....

body
{
@property "body";
font-family: 'Trebuchet MS', Helvetica, Arial, sans-serif;
color: @contentText;
background: @dimmedTextColor url('images/Dark_Castle_Background.jpg') repeat;
word-wrap: break-word;
line-height: 1.27;
@property "/body";
}

But this code does not work... (the only difference between the two is the image name)

body
{
@property "body";
font-family: 'Trebuchet MS', Helvetica, Arial, sans-serif;
color: @contentText;
background: @dimmedTextColor url('images/gra5.jpg') repeat;
word-wrap: break-word;
line-height: 1.27;
@property "/body";
}

Yes, both images are in that same folder, both file extensions are good, and both images can be viewed just fine in a web browser, picture viewer, ect.

I'm doing this on WAMP so I don't know if it's a server/php configuration issue or what, but I've tried changing that image to several different images in that folder. No other image works at all except for "Dark_Castle_Background.jpg"

I did a template search and searched though all the style properties and there are no other references to body background or Dark_Castle_Background.jpg anywhere... I'm stumped.


So what simple, stupid thing am I overlooking?
 
I'm doing this on WAMP right now Brogan. I suppose I could upload the style to our production site, but it's not something I ever intended to use there. I came up with this style idea simply to practice my styling skills.(thought if it came out decent I would release it here free)
 
Yeah, Firebug says "Failed to load the given url" using gra5.jpg.... but it loads just fine using Dark_Castle_Background.jpg... the only difference is I changed is the file name, and I made sure both are there in the same folder. Very strange.

I just uploaded it to our live site... timemonkradio.com with the same results, but it also breaks the Portal page, so I may have some other issue going on.(However when I first ran into this problem I created a completely new style(no parent) and started modifying it from there but only got as far as changing the background images, so the one on our live site isn't near finished but there shouldn't be anything breaking the portal)

I've played around with styling quite a bit but never run into a problem like this. So weird. :shrug:


ETA: On WAMP if I try to navigate directly to the image(127.0.0.1/tmrn/images/gra5.jpg) I get the following XF error message -

"A controller for the route path images/gra5.jpg was not found."

-however navigating to (127.0.0.1/tmrn/images/Dark_Castle_Background.jpg) works just fine.

On our live site(timemonkradio.com/images/gra5.jpg AND timemonkradio.com/images/Dark_Castle_Background.jpg) both work fine, I can navigate directly to either image no problem.(but the style breaks the portal....sheesh!)
 
Nope, and nope. ;)I've double(probably quadrupled) checked the file extension. I put that image into Photoshop and exported it as a .jpg and again as a .png and tried both, neither one works. Pretty sure it's not the file extension.

I always seem to come up with the really strange errors that no one has ever seen before.... must be a gift. :LOL:
 
Nope, and nope. ;)I've double(probably quadrupled) checked the file extension. I put that image into Photoshop and exported it as a .jpg and again as a .png and tried both, neither one works. Pretty sure it's not the file extension.

I always seem to come up with the really strange errors that no one has ever seen before.... must be a gift. :LOL:

Could you possibly upload the image here you are having a problem with?
 
Sure, this is it.
gra5.webp

But I've tried other images too. None of them work except for Dark_Castle_Background.jpg.... that is the ONLY image that will work... and it was just a placeholder until I get the original artwork done....doh!
 
Sure, this is it.
View attachment 41763

But I've tried other images too. None of them work except for Dark_Castle_Background.jpg.... that is the ONLY image that will work... and it was just a placeholder until I get the original artwork done....doh!

Nothing wrong with the image nor code. It must be something else conflicting and is the issue causing it not to display.

If you visit http://www.bbsmiley.com/ and select style titled "default" (the default xenforo style) you can view yourself that it works.
 
Yeah, I was sure the image was good. I'm thinking I have a conflict somewhere/somwhow. When I installed it on our live site it broke XenPorta so something is amiss.

Thanks Russ, now that I believe it's a conflict somewhere I'm gonna try troubleshooting a little more myself first. But if you get a message from me......{HELP} :)

At least I have a different perspective to troubleshooting it now. If I hadn't installed it on our live site I wouldn't have known it breaks the portal so I've gotten a new lead to follow. ;) Strange it doesn't break the portal on WAMP, but we've modified the Portal on our live site and those modifications aren't on my WAMP install(I had a HD failure and re-installed on the new drive but without all the code edits on our live site) so who knows.
 
Yeah, I was sure the image was good. I'm thinking I have a conflict somewhere/somwhow. When I installed it on our live site it broke XenPorta so something is amiss.

Thanks Russ, now that I believe it's a conflict somewhere I'm gonna try troubleshooting a little more myself first. But if you get a message from me......{HELP} :)

At least I have a different perspective to troubleshooting it now. If I hadn't installed it on our live site I wouldn't have known it breaks the portal so I've gotten a new lead to follow. ;) Strange it doesn't break the portal on WAMP, but we've modified the Portal on our live site and those modifications aren't on my WAMP install(I had a HD failure and re-installed on the new drive but without all the code edits on our live site) so who knows.

keep us update on how you go with this and let us know what the issue was if you find it. Yeah, i'm curious. :p goodluck with it. :)
 
Will do Shelley. ;)

I guess I really should duplicate our live site on WAMP exactly so I can test local with those same code edits. I can see now that any work I do on WAMP may not translate well to our live site the way I'm set up currently.(what I get for being lazy....lol)
 
Will do Shelley. ;)

I guess I really should duplicate our live site on WAMP exactly so I can test local with those same code edits. I can see now that any work I do on WAMP may not translate well to our live site the way I'm set up currently.(what I get for being lazy....lol)

I think you should. You would know then that it's a conflict on local. That said if the adjustments are fine after you import on the live site then it's all good. ;)
 
So I got that background image working on our live site..... don't ask, I don't know. I left for a few hours, came back and cleared all the image values from html and body in the style properties, checked the templates public.css and xenforo.css to make sure no background images were left in there, then simply entered the image into the style properties for body again.... poof, there it is.(was pretty sure I did that yesterday... but I guess not)

Unfortunately that didn't fix the issue on WAMP.... :(

As for breaking XenPorta, I tracked that down to one of our custom sidebar blocks that was missing a closing tag. Fixed that and viola, portal no longer broken. Another instance of my WAMP install not being an exact copy of our live site I guess since I just copied that block from default style on WAMP...
 
Also try to avoid doing edits in the default templates, especially in the .css ones.

Stick to Style Properties and then extra.css, just a heads up in case you're not doing it already (y)
 
Yeah, I know that now Russ.... back when we first put the site together I made many template edits.(was still an xf noob) Mostly in XenPorta but a few in other places.(Jaxel's sub-grid, User Ribbons, ect.) Both css and php templates, so it's going to be a pita to upgrade.

I guess the best thing to do is to copy our live site to localhost exactly and see if I can get things in order there first. Oh my....(I had no joy copying Gallery 2 from one of my other sites to local.... been banging my head against the wall trying to get that one to work on localhost for a couple weeks)

Appreciate all the help here, looks like all my problems are self inflicted wounds.... doh!
 
Back
Top Bottom