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

XF 1.5 Template Search Problems

Discussion in 'Troubleshooting and Problems' started by danovsteel, Mar 13, 2016.

  1. danovsteel

    danovsteel Member

    Are there certain types of search strings the template search function is unable to perform?

    I purchased a theme I thought had color palette-defined colors throughout, but it actually has a ton of hard-coded colors in the CSS (dohtheme I'm looking at you), but when I run a template search for an RGB value like "48, 101, 152", it returns no results. When I paste the CSS into a text editor and search, or look manually, I can find it.

    Thank you.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    It's likely not present in the template in that exact string from.

    As it relates to a third party style, you should post in the style thread so the author can help.
     
  3. danovsteel

    danovsteel Member

    Ah - that's an excellent idea. Thank you.
     
  4. danovsteel

    danovsteel Member

    I do think there may still be an issue with the search function, however. I found a template I suspected had the following color in it: rgb(44, 93, 140)

    Copying and pasting the code from that template into a text editor (EditPlus), I found the color by searching on the term "background" in the text editor and looking through all the color callouts it returned.

    I then copied that exact color definition I found (the one listed above) and went back to the XenForo search templates function and searched on that string, expecting to have that template returned, but it returned no results.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    I just pasted that exact code into a template and it was returned as a search result.
     
  6. danovsteel

    danovsteel Member

    lol - I swear I'm not trying to pull your leg, Brogan. And I'm sometimes a moron, but I don't think it's the case this time.

    Ok, attached are screen caps of me about to make the search using that exact string in both the default theme and the one I purchased, called Minty. The other screen cap is the results - same for each search, no results.

    So if this is working for you and not for me, could this be an issue with corrupted files on my install, or possibly my server not running a current version of something? If so, what do you recommend as a next step for me?

    Thanks,

    Jeff
     

    Attached Files:

    Last edited: Mar 13, 2016
  7. Chris D

    Chris D XenForo Developer Staff Member

    If it's in the templates, it should turn up.

    It does a very simple MySQL query based search.

    How can you be sure that value is in the style's templates and actually not referenced via a Style Property?
     
  8. danovsteel

    danovsteel Member

    That's a great question and I'm not exactly sure how to answer.
    On this page: http://groundtradesxchange.com/xf/index.php?forums/main-forum.2/ - I'm trying to find the source of the blue background and change it to brown.

    The sectionFooter div class is partially defined in the template "xenforo_sections.css" with this code:

    Code:
    .sectionFooter
    {
       overflow: hidden; zoom: 1;
       @property "sectionFooter";
       font-size: 13px;
       color: @textCtrlBackground;
       background-color: rgb(48, 101, 152);
       padding: 4px 10px;
       line-height: 16px;
       @property "/sectionFooter";
    }
    So I found the color definition by first searching for all templates containing ".sectionFooter", then manually looking through each of those CSS templates to find where a background color might be defined as part of .sectionFooter.

    However, now that I have the color definition (having found it manually), if I go back to Search Templates and search for
    Code:
    rgb(48, 101, 152)
    , no results are returned.

    If I'm understanding your question correctly, are you saying that because the rgb(48, 101, 152) falls inside of @property tags, it can't be found in a search?
     
    Last edited: Mar 14, 2016
  9. Tracy Perry

    Tracy Perry Well-Known Member

    Your using a custom style... so, does it use a framework also?
    Check in your ACP for any custom footer settings.

    UI.X (which is a different style with it's own framework) has it's own custom footer settings.

    Screen Shot 2016-03-13 at 7.28.30 PM.png

    and I think (but not sure) that the @ indicates that it's a style property setting typically.
    A search of templates will not normally turn those settings up (since they are done via the ACP style properties).
     
  10. Mike

    Mike XenForo Developer Staff Member

    Correct. That value is not actually present in the template. It is expanded at display time for ease of editing.
     
  11. danovsteel

    danovsteel Member

    It does have a framework, but the "sectionFooter" I believe is different from the actual footer template. Searching through the two Style Property Groups for this custom theme that are named "footer", there's nothing related to this background color.

    So if I assume that anything between @property tags doesn't show in a template search, is there some other way to run a search to find things like this? Or was I already using the most expedient method?
     
  12. danovsteel

    danovsteel Member

    Ah ok. Thank you. Is there a way to conduct a search among those style property groups? Or do those kinds of things have to be found manually?
     
  13. Mike

    Mike XenForo Developer Staff Member

    Unfortunately they would need to be found manually.
     

Share This Page