Support » Plugin: Theme Check » Theme Check Fails in I18N.php check

  • Resolved wpweaver

    (@wpweaver)


    My new theme is crashing Theme Check.

    I’m trying to get it ready to submit to the repository, and it is generating an uninitialized index error on line 27.

    I will likely have to send you a .zip of the theme.

    This themes has over 2000 translation calls, with many of them multiline strings.

    Poedit has no issue extracting all the strings, and all strings display properly in the theme admin and visitor side.

    https://wordpress.org/plugins/theme-check/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Follow up:

    I think it is a memory issue. I can remove translations from the bottom of the file, and and after I remove enough of them, it works again.

    This was on my local 64MB MAMP server – kept to 64MB to better match real world hosting sites.

    The file it failed on has the most translation strings, and after I split it in two, it works okay.

    This issue may occur more often with the new requirement to have all strings wrapped in translation functions.

    Don’t know if you want to call this solved or not -but it is an issue.

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Theme Check definitely is a bit of a memory hog. As it’s a developers tool, I don’t necessarily see this as a problem, but it might be worth adding an ini_set in there to try to force the memory limit up to 256 or so.

    Plugin Author Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    I added a change to the next version to attempt to bump the memory limit to 256M for the theme-check process only. This should mitigate the issue on most dev setups, I think.

    https://github.com/Otto42/theme-check/commit/6271df721967508769eaef9c2769d86bc082fcdb

    Let me know your thoughts as well, see if that change would work to solve your problem without changing your environment.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Theme Check Fails in I18N.php check’ is closed to new replies.