• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 A simple style edit (changing color) destroys my style (db problem?)

#1
I was changing a color in the elements, and my style was destroyed. Is this a database problem? How do I diagnose this problem? Thanks for any help.
 
#3
Can you give a more specific example about what you changed and what the end result was?
Ok I was just trying to change the navTabLinkHover color in ACP and after I hit update my board went from this:
oldscreen.jpeg


to this (I closed it afterwards):

xfdbproblem.jpg
 

Tracy Perry

Well-known member
#4
Have you made sure you are working on the correct style, and you have the customized one shown as your default?
Did you revert any changes?
 

Tracy Perry

Well-known member
#8
Well, you didn't provide the link as I asked - but a little detective work led me to it I think.. and this is why I wanted your link ...
This is what I see when I go to the site. Looks nothing like your example
Screen Shot 2016-04-01 at 6.15.31 PM.png
 
#9
Well, you didn't provide the link as I asked - but a little detective work led me to it I think.. and this is why I wanted your link ...
This is what I see when I go to the site. Looks nothing like your example
that's why I didn't provide the link, I already restored from database backup. The last two times I have edited a style has killed my database. So I don't know what I could be doing that kills the database..

Im afraid to change anything now. :(
 

Mike

XenForo developer
Staff member
#10
Probably best to work on a copy of your database for testing purposes.

But I would check: go to <url>/install/ and rebuild the master database. Does the same thing happen? If so, what's in your database represents the final ("after") display and is totally inconsistent with the cached ("before") display you have. There isn't really much that can be done to totally resolve that; the data is somehow missing and the cache has become out of date. The customizations would likely need to be done again. You might be able to find them from an older backup (where you can export the style or at least refer to it).
 
#11
Probably best to work on a copy of your database for testing purposes.

But I would check: go to <url>/install/ and rebuild the master database. Does the same thing happen? If so, what's in your database represents the final ("after") display and is totally inconsistent with the cached ("before") display you have. There isn't really much that can be done to totally resolve that; the data is somehow missing and the cache has become out of date. The customizations would likely need to be done again. You might be able to find them from an older backup (where you can export the style or at least refer to it).
how does this happen?!? I am looking at the the correct style, I export it, and the values are different than what I am looking at on screen.

Where is the cache that the browsers are seeing? Is there a way to extract from the cache?

Will I need to re-edit templates that I changed or is this strictly a color settings issue?

I can't even wrap my head around whats going on here. thanks for any help.
 
Last edited:

Mike

XenForo developer
Staff member
#12
I have no idea how that'd happen as it's not something I've ever seen reported before. It would be caused by cached values not being updated when the underlying data is changed or sort of the other way. For example, manual manipulations to the database such as via a DB restore may not change these caches. Other than that, the only thing I could suggest is an add-on.

Unfortunately, root cause analysis isn't necessarily helpful here as it won't allow you to undo the state as the raw data isn't there.
 
#13
I have no idea how that'd happen as it's not something I've ever seen reported before. It would be caused by cached values not being updated when the underlying data is changed or sort of the other way. For example, manual manipulations to the database such as via a DB restore may not change these caches. Other than that, the only thing I could suggest is an add-on.

Unfortunately, root cause analysis isn't necessarily helpful here as it won't allow you to undo the state as the raw data isn't there.
Will the templates that I edited be ok? This is just a style/color issue right?
 

Mike

XenForo developer
Staff member
#14
Given that I haven't seen this before and I don't know how it could have happened, it's difficult to say with any confidence. An ideal thing may be to look for your style in a backup and then try to compare the differences (such as from the exported XML).
 
#15
Given that I haven't seen this before and I don't know how it could have happened, it's difficult to say with any confidence. An ideal thing may be to look for your style in a backup and then try to compare the differences (such as from the exported XML).
I restored the database from backup and it appears fine BUT but when I export the style, it does not match what I am looking at on the screen.. How is this even possible. Where is the cache that it is displaying to me and my users. Is the cache being restored too? Everything looks fine but the style data is wrong.. for example, the logo in the Elements, is the original XF logo, but when I bring up my website, my logo (with a different name) is showing fine..
 

Mike

XenForo developer
Staff member
#16
When individual style properties are changed, a cached value is updated which has all the compiled style property CSS, values, etc. Templates are similar, though stored in a separate location. If the style property tables were edited directly or a partial restore was done (or an add-on interfered), it's possible for these to get out of sync. This isn't something we've seen before so it's just guessing.

If you don't have a backup that has the data in question, unfortunately you're going to need to recreate the changes. You may be able to make reference to the cache values, though it won't really be simple. If you send me an export of your xf_style table, I can at least give you the cached data as a reference.