Support » Fixing WordPress » Admin search of subcategories not working in 2.7.1

  • trex33

    (@trex33)


    In 2.7.1, admin panel search of subcategories is not returning any matches. Search of parent categories is working fine. Anyone else having this problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Yes, we are having exactly the same problem. Have you found a solution??

    nellyy, I have not found a solution yet. Are we the only ones having this problem?

    I have also run into this situation. It appears to be a feature, rather than a defect; however, it is unexplained in documentation. I would like to find either some explanation -or- configuration options to change this behavior. It seems to be part of a search routine because main site search behaves that way.

    For example, I have four categories – but – hundreds of subcategories. If I search for “sports”, the main category “/sports/” shows up in search listings; however, if I search for “baseball”, the subcategory “/sports/baseball/” does not. This behavior is identical in the CMS.

    I don’t think this is all that unusual – however – we appear to be the rare users of subcategories. Would appreciate anyone shedding light on this.

    On second thought, this does seem to be a bug, if you ignore the public-facing search and focus on the CMS side. To reproduce it: create many subcategories, enough to force pagination. Here is my basic example:

    College
    – Arundel Community College
    – Salisbury University
    – .. 30 more colleges
    – .. 40 more universities

    If you search for a term that would show BOTH parent and subcategories (college), everything shows up fine.

    However, if you search for a term that would only force a list of subcategories to show without the parent (such as “university“), the display doesn’t work and shows up with blanks.

    I looked through the code and found lines 64-65 in wp-admin/includes/template.php:

    if ( $category->parent != $parent )
    			continue;

    Disabling that snippet makes all of the results appear (albeit in very disorganized fashion). Pagination appears to always be wrong, showing 23 pages regardless of search granularity.

    I’ve tested this with:

    WordPress 2.7.1.
    PHP 5.2.5 / MySQL 5.0.45-community-nt
    PHP 5.2.8 / MySQL 5.0.67-community

    And with further annoyance from me, this appears to be a recognized bug:

    ticket # 8632

    A fix is scheduled for version 2.8.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Admin search of subcategories not working in 2.7.1’ is closed to new replies.