• When I press FIX CATEGORY COUNT, I am getting the following error:
    “Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\wordpress\wp-content\plugins\fix-category-count\inc\fix_category_count_admin_view.php on line 68”.
    Nothing else appears.
    Please advise. Thanks.
    WP 4.5.3, Twenty Sixteen theme, no other plugins active.

    https://ww.wp.xz.cn/plugins/fix-category-count/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Having the same problem, WP4.6

    I got the same problem, and here is the solution:

    In the file fix-category-count/inc/fix_category_count_engine.php replace all
    <?= with <?php echo
    <? (should be just one) with <?php.

    This is because the author was using the short versions of the <?php tag (<? ... ?> for code and <?= ... ?> for outputs) that are usually disabled by default (and, if enabled, they can cause some collisions).

    I’d also suggest adding ?> to the end of the other two PHP files, even though it’s not strictly necessary.

    • This reply was modified 9 years, 6 months ago by vsego.

    Thanks @vsego! This solves the problem.

    KZeni

    (@kzeni)

    Correction for the fix above, you need to edit the inc/fix_category_count_admin_view.php file for this.

    Here’s a link to a GitHub Gist I created with the patched files: https://gist.github.com/KZeni/5f7c14e4ea988e09d3daa8507daac1bf#file-inc-fix_category_count_admin_view-php

    My gist above also modified the main fix_category_count.php file to not force a text color on the admin navigation item and modified the inc/fix_category_count_engine.php file to be more compatible with different WP database table prefixes per https://ww.wp.xz.cn/support/topic/issue-in-update_category_correct_count/

    It would be great to see this plugin updated to incorporate these patches.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Getting Parse Error – Unexpected EOF’ is closed to new replies.