Support » Fixing WordPress » WP3's Appearance/Nav Menu search function broken

  • Resolved alxndr


    In the Appearance/Nav Menu feature introduced in WP 3, there are modules (Posts, Pages, Categories, Custom Links). Some of them have a Search function, where typing in a word or phrase results in a list of items that match the word or phrase.

    On my installation, it appears that any post with more than one line of content in it is not handled correctly by the Posts or Pages modules’ search function. I can see the search results coming back from admin-ajax.php with a correct looking response (a bunch of <li> elements, one for each post, with <input>s for each piece of data about the post), but it includes each post’s full content (in the elements) — and those with multpile lines of content appear to break whatever handles the post
    <li> elements.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Found a quick and dirty fix: take the hidden input with full post content out of the for each post/page the Search feature finds. /wp-admin/includes/nav-menu.php line 252 (WP 3.0.4):
    $output .= '<input type="hidden" class="menu-item-description" name="menu-item[' . $possible_object_id . '][menu-item-description]" value="'. esc_attr( $item->description ) .'" />';
    comment it out.

    I opened a ticket ( and was informed that this was noticed and should be fixed in 3.1.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP3's Appearance/Nav Menu search function broken’ is closed to new replies.