-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class-copyright-notice-check.php failing for child theme #420
Comments
You would be correct here - nearly all the checks are geared up to test the parent theme and child theme is barely (if at all) checked with the current code. We would have to refactor it pretty significantly to account for child themes in a good way. Sorry for the confusion! If the theme allows you to upload it to the wordpress.org directory you should be ok. |
Thanks @pattonwebz I appreciate the speedy response |
* Update dependencies * Update * --allow-releaseinfo-change * Use node 12 * Use node 12 * Use node 12 * Update * Remove grunt install on theme-check * Remove unsplash, add funtion * Remove function * Remove text-domain check from theme-check plugin * Update * Remove empty space * Remove copyright check see: WordPress/theme-check#420 * Updates * Update theme name in circleci config * Update mins strings to ascension * Remove Ascension from top of file * Bump tested up to 5.9 * Reinstall proper grunt postcss. Fix gruntfile. Re-run grunt. Update dependencies to remove high and critical warnings. * Regenerate package-lock.json
Parent Theme: https://wordpress.org/themes/primer/
Child Theme: https://wordpress.org/themes/ascension/
When running the theme check we're seeing errors saying a copyright notice could not be found for the theme.

I'm not sure why it's returning an error, as we do have a copyright notice inside of the readme.txt file and the style.css file.
https://github.com/godaddy-wordpress/primer-child-ascension/blob/develop/readme.txt#L62-L82
https://github.com/godaddy-wordpress/primer-child-ascension/blob/develop/style.css#L19
There are also copyright notices in the parent Primer theme readme.txt, and that passes the theme check without issue.
https://github.com/godaddy-wordpress/primer/blob/develop/readme.txt#L41-L64
When digging through the code it looks like the $paths var doesn't contain any paths to the child theme, but only paths to the parent theme.

Inside of the copyright-notice-check class file it looks like it's searching for a path to the child theme file, which isn't found and in turn returns a false error.
https://github.com/WordPress/theme-check/blob/master/checks/class-copyright-notice-check.php#L39-L46
The text was updated successfully, but these errors were encountered: