1. 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?)

Discussion in 'Troubleshooting and Problems' started by Rom, Apr 1, 2016.

  1. Rom

    Rom Member

    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.
     
  2. Chris D

    Chris D XenForo Developer Staff Member

    Can you give a more specific example about what you changed and what the end result was?
     
  3. Rom

    Rom Member

    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
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    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?
     
  5. Rom

    Rom Member

    default is untouched. I am working on the only other style I have created.

    it takes a database restore to fix this.
     
  6. Tracy Perry

    Tracy Perry Well-Known Member

    And it's set as default? Is that custom style available as a selection?
    What is the link to the site?
     
  7. Rom

    Rom Member

    yes it's set as the default and non changeable by user.
     
  8. Tracy Perry

    Tracy Perry Well-Known Member

    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. Rom

    Rom Member

    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. :(
     
  10. Mike

    Mike XenForo Developer Staff Member

    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. Rom

    Rom Member

    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: Apr 2, 2016
  12. Mike

    Mike XenForo Developer Staff Member

    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. Rom

    Rom Member

    Will the templates that I edited be ok? This is just a style/color issue right?
     
  14. Mike

    Mike XenForo Developer Staff Member

    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. Rom

    Rom Member

    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..
     
  16. Mike

    Mike XenForo Developer Staff Member

    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.
     
  17. Rom

    Rom Member

    Ok thanks. whats the best way to get that to you?
     
  18. Mike

    Mike XenForo Developer Staff Member

    A conversation should work.
     

Share This Page