Page 1 of 1

<!-- cms_stylesheet error: No stylesheets matched the criter

Posted: Thu Sep 15, 2016 7:30 am
by naturelab
I have set up a new site, but my stylesheets are not rendering at all.
I get this error.

Code: Select all

<!-- cms_stylesheet error: No stylesheets matched the criteria specified -->
Template extract...

Code: Select all

{cms_stylesheet}

{cms_selflink dir='start' rellink=1}
{cms_selflink dir='prev' rellink=1}
{cms_selflink dir='next' rellink=1}
</head>
All stylesheets are included in the named design.

Interestingly. If I use :-

Code: Select all

{cms_stylesheet name="blah"}
Then this will render the named style.

Anyone else encountered this ?

If it is relevant, the theme I am using is a renamed theme.

Code: Select all

----------------------------------------------

Cms Version: 2.1.5

Installed Modules:

    AdminSearch: 1.0.2
    CGBlog: 1.14.1
    CGContentUtils: 2.1.5
    CGExtensions: 1.53.13
    CGHeadMaster: 1.0.9.2
    CGSimpleSmarty: 2.1.4
    CMSContentManager: 1.1.1
    DesignManager: 1.1.1
    FileManager: 1.5.2
    Gallery: 2.1.6
    JQueryTools: 1.3.9
    MenuManager: 1.50.2
    MicroTiny: 2.0.3
    ModuleManager: 2.0.4
    Navigator: 1.0.3
    News: 2.50.5
    Search: 1.50.2
    SimpleSiteInfo: 3.1


Config Information:

    php_memory_limit:
    max_upload_size: 2000000
    url_rewriting: mod_rewrite
    page_extension: /
    query_var: page
    auto_alias_content: true
    locale:
    set_names: true
    timezone: Europe/London
    permissive_smarty: false


Php Information:

    phpversion: 5.5.37
    md5_function: On (True)
    json_function: On (True)
    gd_version: 2
    tempnam_function: On (True)
    magic_quotes_runtime: Off (False)
    E_ALL: 32767
    E_STRICT: 2048
    E_DEPRECATED: 8192
    test_file_timedifference: No time difference found
    test_db_timedifference: No time difference found
    create_dir_and_file: 1
    memory_limit: 128M
    max_execution_time: 30
    register_globals: Off (False)
    output_buffering: 4096
    disable_functions:
    open_basedir:
    test_remote_url: Success
    file_uploads: On (True)
    post_max_size: 8M
    upload_max_filesize: 2M
    session_save_path: /tmp (0700)
    session_use_cookies: On (True)
    xml_function: On (True)
    xmlreader_class: On (True)
    check_ini_set: On (True)
    curl: On

Re: <!-- cms_stylesheet error: No stylesheets matched the cr

Posted: Mon Sep 19, 2016 6:17 pm
by naturelab
Does anyone have any idea what could be causing this ?

Re: <!-- cms_stylesheet error: No stylesheets matched the cr

Posted: Mon Sep 19, 2016 7:48 pm
by Rolf
To be honest, no...
But the first thing I would double check is if the page, the template, the stylesheets and the design really are attached to each other.

Re: <!-- cms_stylesheet error: No stylesheets matched the cr

Posted: Mon Sep 19, 2016 7:51 pm
by naturelab
Cheers Rolf. I feel like I have done this over and over.

I have even re-created a new design, then re-attached each template and stylesheet to it. I feel like I am missing something simple.

I have done this many times before BTW.

Re: <!-- cms_stylesheet error: No stylesheets matched the cr

Posted: Tue Oct 11, 2016 9:12 am
by protempore
It happens to me the same thing

I solved by passing the parameter "designid = XX"

Code: Select all

{cms_stylesheet designid=10}
in the absence of the parameter is the call to the wrong table "layout_stylesheets":

Code: Select all

Debug: (0,356809) - (usage: 9071264) - (peak: 9894232)
(mysqli): SELECT SQL_CALC_FOUND_ROWS S.id FROM ecat_layout_stylesheets S LEFT JOIN ecat_layout_design_cssassoc D ON S.id = D.css_id WHERE D.design_id = 3 ORDER BY D.item_order ASC LIMIT 0, 1000
"design_id = 3" instead of "design_id = 10"
with "{stylesheet designid=10}" instead works

Code: Select all

Debug: (0,559746) - (usage: 9156016) - (peak: 9997416)
(mysqli): SELECT SQL_CALC_FOUND_ROWS S.id FROM ecat_layout_stylesheets S LEFT JOIN ecat_layout_design_cssassoc D ON S.id = D.css_id WHERE D.design_id = 10 ORDER BY D.item_order ASC LIMIT 0, 1000
I do not know if it is an orthodox solution, but it works
:)

Re: <!-- cms_stylesheet error: No stylesheets matched the cr

Posted: Tue Oct 11, 2016 10:37 am
by naturelab
Thankyou.

I solved the problem by selecting ALL the pages in the content manager and BATCH applying the design to them. ( even though ) it had ALREADY been applied.
I suspect that the problem arose because I renamed an exisiting template, then changed the name of the template and asscociated design. This changed seemed ( superficially ) to be applied to all pages, but actually, it was not.

The BATCH apply seemed to do the trick for me