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

Cannot Reproduce Error if you don't set a padding on User Text Block

Discussion in 'Resolved Bug Reports' started by Jake B., Nov 20, 2015.

  1. Jake B.

    Jake B. Well-Known Member

    If you don't set a padding (or leave it blank) on User Text Block you'll get an error (assuming you have debug mode on) because of the following CSS:

    .messageUserBlock .userBanner
                display: block;
                margin-bottom: 5px;
                margin-left: -{xen:calc '@messageUserText.padding-left + 6'}px;
                margin-right: -{xen:calc '@messageUserText.padding-right + 6'}px;
  2. Lawrence

    Lawrence Well-Known Member

    I came across this too, but never reported it as a bug because it is related to the style and your preference. I just replaced the xen:calc with the margin I wanted, TMS handles it with no issues on updates. I chose editing the template directly instead of setting the
    @messageUserText.padding-left and the right to 0 because I don't use it in my current style.
  3. Mike

    Mike XenForo Developer Staff Member

    What error are you getting specifically? I don't receive an error with that blank. It resolves to an empty string, which leads to ("" + 6) which doesn't error (in PHP 5.4 or 7 at least).
  4. Jake B.

    Jake B. Well-Known Member

    Don't remember exactly, but I'm pretty sure it was saying that it expects a float. It only shows the error in debug mode of course. I'll try to replicate it later and get the exact error
  5. Lawrence

    Lawrence Well-Known Member

    I tried to reproduce it and couldn't either. At the time I didn't pay much attention to it because I figured it was just me and the way I chose to set some of the style properties. I just removed the xen:calc from the CSS, and replaced it with a fixed value.

    Sorry, I couldn't be more helpful, but I do recall that the xen:calc did cause an error... maybe because I put another style property in the padding field instead of an actual value?

Share This Page