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

Fixed Template Modifications system can't access style properties.

Discussion in 'Resolved Bug Reports' started by CyberAP, Jun 20, 2013.

  1. CyberAP

    CyberAP Well-Known Member

    If I try to call custom style property in TM it causes an error. It doesn't depend on a variable type.
     
  2. Mike

    Mike XenForo Developer Staff Member

    Can you be more specific? What error? What settings? Etc...
     
  3. CyberAP

    CyberAP Well-Known Member

    I created an addon, created new style property group for it. Then I made a TM:

    Template 'editor_contents.css'

    Find:

    Code:
    }
    
    body
    {
    Replace:

    Code:
    <xen:if is="@readactor_enabled">
    <xen:include template="readactor_editor_contents.css" />
    </xen:if>
    }
    
    body
    {
    @readactor_enabled and readactor_editor_contents.css are both part of the addon.

    I get this error: Compiler error (may be from another template modification)
     
  4. CyberAP

    CyberAP Well-Known Member

    I solved this by using extra template that contained my conditional. But I think we shouldn't be restricted only to templates.
     
  5. Mike

    Mike XenForo Developer Staff Member

    You don't. It's sort of just the opposite of the other bug report: right now, you can't use @property short cuts - you need to use the {xen:property} version.
     
    Dylan V likes this.
  6. CyberAP

    CyberAP Well-Known Member

    It can be used inside <xen:if is="">, right?
     
  7. Mike

    Mike XenForo Developer Staff Member

    Yeah, @property is mostly just done to expose CSS inside the templates. If you look at what's in the database (or compare templates, for example), it's not actually there.
     
    CyberAP likes this.
  8. Mike

    Mike XenForo Developer Staff Member

    You can now use the @property short cut in the replace value.
     
    SneakyDave and CyberAP like this.
  9. CyberAP

    CyberAP Well-Known Member

    Fixing shortcuts in TM caused their breakage in templates :LOL:
    Just try to create a template that contains something like this:

    Code:
    <xen:if is="@customProp">
    Hello world!
    </xen:if>
    That should throw an error. Using {xen:property} however works fine, but anyway it transforms to a shortcut after a template saving.

    So this is not completely fixed. @Brogan if you could help me out a bit please move this thread again to Open Bugs.
     
  10. Mike

    Mike XenForo Developer Staff Member

    Wait, so what you're reporting has nothing to do with the template modifications system? It really should be reported separately then - if I'm understanding correctly, this can be reproduced in 1.1 as well.
     
  11. CyberAP

    CyberAP Well-Known Member

    It's only bugged in beta 3. After you fixed it for TM it broke in templates.
     
  12. Mike

    Mike XenForo Developer Staff Member

    I'm still 99% sure what you're explaining happens in 1.1 as well, but it's fixed now - only known, valid properties will be translated to the @propertyName syntax.
     
    CyberAP and account8226 like this.
  13. account8226

    account8226 Guest

    Any ideas when you will release that fix ?
     
  14. Mike

    Mike XenForo Developer Staff Member

    The next beta.
     
  15. account8226

    account8226 Guest

    And when ? :love:
     
  16. Martok

    Martok Well-Known Member

    When it's ready to be released.
     
  17. account8226

    account8226 Guest

    I know ^^
     

Share This Page