XF 2.0 Error: Unexpected contents

Donske

Active member
I wanted to replace the xenforo-logo.png with my own. All I did was make my own logo saved as a .png file. I saved the default xenforo logo as something like
xenforo-logo_OLD.png. Then I uploaded my own logo (same file name and same file path location).
For some reason, I am getting this error when I log in as ADMIN:
styles/default/xenforo/xenforo-logo.png Unexpected contents

the only thing I can think of is that there must be some CSS that has width and height parameters that match the default logo. If that is the case, then I would need to find that CSS file and adjust the height and width as this is the only thing I can think of.

then the last thing I can think of while I am writing this is wondering if this image has to be "responsive"

My new logo has a partial transparent background and is 933 x 175

Thanks
 
This is working as intended, what you are seeing is the file health check results. Its job is to determine whether any files have been modified since being uploaded to your site, which could indicate someone attempting to exploit your site.

Please consider re-uploading the default xenforo-logo.png and instead upload your file as new-xenforo-logo.png and change the relevant style property to use your new logo file name instead.


Fillip
 
change the relevant style property to use your new logo file name instead.

I assume that you are referring that I navigate to:
Appearance > Styles > Default Style-Style Properties > Group: Header and Navigation >
Header / Logo Row

and once there, I need to insert "xenforo-logo.png" into the "image" field ? If I so, then the path needs to be like this ?
/xenforo/styles/default/xenforo/xenforo-logo.png
 
ok, so I performed the action I was going to try and what it did was repeated my logo horizontally many times. Then I thought that perhaps the
Extra:Freeform CSS/LESS code needs to be edited.
I understand about the error, but there must be some other css code that is linked to the original foro logo.
 
Mike,
thanks for the reply. Well, I checked that and the search did take me to the page "group basic options" and the link seems to be correct
styles/default/xenforo/xenforo-logo.png This link as far as I know never changed. The file path on FTP is the same. All I did was replace the given xenforo logo with mine. The difference is major size difference.
 
So, now, I installed version 2.0.1 - nice fresh install and was able to import my modified style. While I was at it, I took the xenforo-logo.png and changed only one thing.
1) Original size is 100 x 36
2) Did *not* change the graphic
3) I just resized it just about 150 x 54 pixels
4) Saved as same .png
5) Ran file health check and same error of "contents is not what was expected"

So, this is just again a theory I have. There has to be somewhere a Template or CSS attributes that is tied to the 100 x 36 values and if anything changes - just a tad, then some Template or CSS file reports a conflict with the new file size and then reports the error.

The only thing left is that my Graphics program (Corel Paint Shop Pro) is doing something "else" with the file.
 
Ok, now this IS crazy. I took the original logo and opened it in the Graphic editor and just saved as - no changes to the file at all.
Had error.
So, this does away with my theory. So, now I have to investigate my Graphic settings or something. Sorry for keep bringing this up, but I always think that in case someone else might be experiencing this problem, they can do a search and find this page.
 
You are making much ado over nothing as it is not a "problem" that is occurring but expected behavior. There is a built in process that checks the default files against size (and probably more) that they should be and when outside those a parameters a warning is issued.
There is no CSS/template edit that does this.. it is built into the code.
The solution has been given to you - don't replace the default logo file, simply use the ACP option to change the path to point to your new image. You would get the same issue if you logged into your system and made an edit to any of the associated PHP files.

The way you are doing it (replacing the default file) will result in your logo being overwritten upon each upgrade that is performed.
 
The expectation is that you change the URL to point to your own logo file. (This is actually why we renamed the file to "xenforo-logo.png", to try to reduce the chance of people overwriting it instead of pointing to a different file.) If the file with that name differs by a single byte from the default version, you'll get an unexpected contents error. This is true of every single file in the download. This is to help check that the files have been uploaded properly and to notify you if one of them is changed unexpectedly.

Beyond that, it does prevent your logo from being overwritten on upgrade (which is something that we have had happen in the past).

Thus, you should give your logo a different file name and change the mentioned style property to point to the URL that corresponds.
 
Oh...I think the light is now going off in my head now. This makes sense. Thank you much guys !
That worked. Don't know why I did not think of that before. I just renamed my banner to another name and ACP to URL Logo and entered new file name. No contents check !!! Yea !!!!

Donnie
 
Back
Top Bottom