Error with Theme Check Plugin

Support General Error with Theme Check Plugin

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8167
    tsqueztsquez
    Participant

    Hi there,

    As you know I am building a theme and using your plugin, Meta Box with it.

    As I create the theme, I usually run it through the Themecheck Plugin (https://wordpress.org/plugins/theme-check/). This plugin runs a series of checks to make sure that the theme is following the WordPress Theme Review Standards, https://make.wordpress.org/themes/handbook/review/

    If an error is encountered, you are shown what the error is so you can correct.

    So today I scanned my theme before starting to do some additional work and I got the following:

    RECOMMENDED: Tags: is either empty or missing in style.css header.

    So I checked style.css and yep the tags are there. So I did some digging and came across this GitHub issue: https://github.com/WordPress/theme-check/issues/50

    In it you will see that Otto states:

    The Tags header is not allowed to be empty or missing, and you should not have more than one style.css file, even if it's in subdirectories. This can cause problems in WordPress itself, because it can and will look in subdirectories to find the main stylesheet file.

    So I checked the theme and forgot that I am including two extensions with the theme: MB Conditional Logic and MB Tabs. The extension that has style.css is the MB Conditional Logic extension

    So as a test I changed the name of the style sheet and ran the themecheck test again and the RECOMMENDED: Tags: is either empty or missing in style.css header. disappeared. I thene renamed it back to style.css, ran the check and I got the message.

    Is it possible for you to maybe update all your extensions that use a style.css file and rename the stylesheets to something like meta-box-conditional-logic-style.css or use an abbreviated name of the extension like this mbcl-style.css?

    That would be very helpful to any developer trying to get a theme up on WordPress.org.

    So for now I have renamed the style.css file in the extension to mbcl-style.css

    Thanks guys.

    #8176
    Anh TranAnh Tran
    Keymaster

    Hi Thomas,

    I will change the file name next time when we update the plugins. This is just an recommendation from Theme Check and that's totally fine.

    #8273
    tsqueztsquez
    Participant

    Actually it's because, according to the theme review standards, there can only be one file named style.css and that is the theme style sheet.

    If there is a plugin included in the theme, such as meta box conditionals and meta box tabs, any stylesheet in the plugins cannot be named style.css.

    And even though it is only a recommendation, the theme review team will not approve the theme until that is corrected.

    Thanks for correcting it when you update 😉

    #8285
    Anh TranAnh Tran
    Keymaster

    I see. You actually can "talk" with the reviewer. Not all rules are restricted. We at gretathemes.com also submitted some themes on wordpress.org and there were some issues that can't follow the rules. Here is an example (see how we explain to the reviewers).

    Hope to see your themes soon.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.