ThemeCheck checks old deleted files(which does not exist on server)
-
I spent so long(about 4 days), because it’s questionable thing that I cannot understand. I didn’t know why this error message was shown:
WARNING: Found a translation function that is missing a text-domain. Function __, with the arguments ‘mytheme’
and
INFO: More than one text-domain is being used in this theme. This means the theme will not be compatible with www.remarpro.com language packs.
The domains found are bbpress,mythemeBecause there’s no ‘bbpress’ domain any more as I had replaced them(from bbPress template which is integrated into my theme) to ‘mytheme’ already. Also, there’s no translation function that is missing a text-domain with the arguments ‘mytheme’ as well, because I have checked and re-checked all theme files again and again more than 100 times by Windows Grep tool(I usually use this tool and it’s so great).
But !!
Finally I found a mysterious phenomenon why this happens to me. It all made possible to correct the file ‘themecheck/checks/textdomain.php’. I added the following:
} } $token = $text; <strong>if ('bbpress' == $text ) { echo $id . ' - ' . $phpfile .' - '. $text . ' , '; }</strong> } elseif ('(' == $token){ if ($parens_balance == 0) {
Then I re-execute ThemeCheck on my theme, and it shows ‘token id’, ‘text-domain string’ and this on the result view:
315 - <strong><?php echo esc_attr( bbp_get_search_terms() ); ?></strong> - bbpress , 315 -
Yes, it prints ‘id’ – ‘file(which is displayed as a search form element)‘ – ‘text(domain)’.
I use Chrome browser and I inspected the form with Chrome Developer Tool, then I could have found that it differs from my new file ‘mytheme/bbpress/form-search.php’ and it is just the old version of that file which I had deleted from my server a few days ago:
Old original(deleted) version:
<form <strong>role="search" </strong>method="get" id="bbp-search-form" action="<?php bbp_search_url(); ?>"> <div class="bbp_search_wrap"> <label class="screen-reader-text hidden" for="bbp_search"><!--?php _e( 'Search for:',<strong> 'bbpress'</strong> ); ?--></label> <input type="hidden" name="action" value="bbp-search-request"> <input tabindex="<?php bbp_tab_index(); ?>" class="button bbp_search_submit fa" type="submit" value="?"> <div><input tabindex="<?php bbp_tab_index(); ?>" type="text" placeholder="<?php _e( 'Search Forum:', <strong>'bbpress' </strong>); ?>s" value="<?php echo esc_attr( bbp_get_search_terms() ); ?>" name="bbp_search" class="bbp_search"></div> </div> </form>
And real file which is now existent:
<form method="get" id="bbp-search-form" action="<?php bbp_search_url(); ?>"> <div class="bbp_search_wrap search-wrap"> <label class="screen-reader-text hidden_out" for="bbp_search"><?php _e( 'Search for:', 'mytheme' ); ?></label> <input type="hidden" name="action" value="bbp-search-request" /> <button tabindex="<?php bbp_tab_index(); ?>" class="button bbp_search_submit search_submit fa fa-search" type="submit"></button> <div><input tabindex="<?php bbp_tab_index(); ?>" type="text" placeholder="<?php _e( 'Search Forums', 'mytheme' ); ?>" value="<?php echo esc_attr( sanitize_text_field(bbp_get_search_terms()) ); ?>" name="bbp_search" id="bbp_search" class="bbp_search search" /></div> </div> </form>
—
Why and how ThemeCheck checks the old removed file(not existent)?
Very interesting, and I was frustrated and feeling desperate for this problem.How can I make ThemeCheck check the real and live files only?
I’m not using any cache plugin and I think that has no relation with cache, as ThemeCheck do checks for PHP files, and not HTML.
- The topic ‘ThemeCheck checks old deleted files(which does not exist on server)’ is closed to new replies.