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

Fixed The requested template could not be found - extra css

Discussion in 'Resolved Bug Reports' started by Adam Howard, Sep 18, 2013.

  1. Adam Howard

    Adam Howard Well-Known Member

    AdminCP > Appearance > Template Modifications > Create Template Modifications > Template:

    Type in Extra.css

    Before you even finish typing it, it will show up as an option to impute.
    But you will get this notice with either selecting it.

    Template Contents:
    The requested template could not be found.


    And thus it will not let you save anything. The TMS (Template Modification System) should work with any template.
     
    Last edited: Sep 18, 2013
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    This occurs when the template HTML is empty, not just EXTRA.css. Should be easy enough to change the JavaScript that handles the response.
     
  3. Adam Howard

    Adam Howard Well-Known Member

    Template html ? I see no such template.

    Or do you mean to say when extra.css is empty, because if so, mine is filled with stuff.
     
  4. Jeremy

    Jeremy XenForo Moderator Staff Member

    Template modifications function on a global scope, and EXTRA.css has no content in the global scope. But yes, I mean the content.
     
    Adam Howard likes this.
  5. Chris D

    Chris D XenForo Developer Staff Member

    It's still possible but it requires a regular expression because otherwise it's not possible to find a simple string:

    upload_2013-9-18_10-30-19.png

    That works.

    I'd probably say, though, that it's pretty pointless applying template modifications to EXTRA.css.

    If you are going to apply template modifications to CSS then you should do so to the individual CSS templates. There's many good reasons for that.

    And, of course, it's still recommended just to edit the templates directly where possible.
     
  6. Adam Howard

    Adam Howard Well-Known Member

    If you have 8 or more styles & you always add the same code to extra.css

    Having the TMS do it for you, so you do not have to update every style individually is good thing.
     
  7. Chris D

    Chris D XenForo Developer Staff Member

    Probably still worth modifying the several CSS templates via the TM system rather than using EXTRA.css.

    But certainly with my solution above you can do it to EXTRA.css so that's there if you need it.
     
  8. Adam Howard

    Adam Howard Well-Known Member

    www.sociallyuncensored.eu 2013-9-18 9 29 28.png


    Does not matter which box I check. I am told that Extra.css can not be found
    :(
     
  9. Mike

    Mike XenForo Developer Staff Member

    @Chris Deeming is pointing out that it's just a bug that it says that. It doesn't prevent you from saving or using a modification to that template.
     
    SneakyDave and Chris D like this.
  10. Adam Howard

    Adam Howard Well-Known Member


    The following error occurred:

    Please enter a valid regular expression.

    ^ I also get this error when using $1 which XenForo claims is a valid expression


    " You may use $0 to insert the found text. For regular expressions, you may use $1 and so on to insert sub-matches. You may use XenForo template syntax. "
     
  11. Jeremy

    Jeremy XenForo Moderator Staff Member

    Deeming's Regular Expression only has 1 match.
     
    Chris D likes this.
  12. Adam Howard

    Adam Howard Well-Known Member

    I noticed this.

    I need it to apply no matter if it finds an empty extra.css or finds something & simply adds it after.
     
  13. Jeremy

    Jeremy XenForo Moderator Staff Member

    And, as Chris showed you, it will work.
     
    Adam Howard and Chris D like this.
  14. Chris D

    Chris D XenForo Developer Staff Member

    I understood exactly what you were trying to achieve, so I gave you the exact solution for that. It works.
     
    SneakyDave and Adam Howard like this.
  15. Adam Howard

    Adam Howard Well-Known Member

    When I try to save that I get this.....



    An exception occurred: Mysqli prepare error: MySQL server has gone away in /home/www/public_html/forums/library/Zend/Db/Statement/Mysqli.php on line 77

    Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
    Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
    Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
    Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
    Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 55
    XenForo_Error::unexpectedException() in XenForo/Application.php at line 363
    XenForo_Application::handleException()


    hhhmmm...... I'm going to guess hosting issue on this.....
     
  16. Jeremy

    Jeremy XenForo Moderator Staff Member

    That has nothing to do with Chris's RegEx and is entirely a server error.
     
    Adam Howard likes this.
  17. Adam Howard

    Adam Howard Well-Known Member

    figured.

    OK.
     
  18. Adam Howard

    Adam Howard Well-Known Member


    Not that this has anything to do with the bug report, but simply to offer a possible solution to anyone who may find this via a google search....

    I was able to resolve this without changing any sever settings. The fault was my own. I had not reverted extra.css and so was trying to add everything twice (same code twice).... X was in extra.css and I was telling TMS to add X again.
     
  19. Mike

    Mike XenForo Developer Staff Member

    This is fixed now. (Just to reiterate, it was simply a display issue with a template that is empty.)
     
    Adam Howard and Chris D like this.
  20. Adam Howard

    Adam Howard Well-Known Member

    Thank you Mike :)
     

Share This Page