WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] WP3's Appearance/Nav Menu search function broken (3 posts)

  1. alxndr
    Member
    Posted 3 years ago #

    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 input.menu-item-description elements) -- and those with multpile lines of content appear to break whatever handles the post
    <li> elements.

  2. alxndr
    Member
    Posted 3 years ago #

    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.

  3. alxndr
    Member
    Posted 3 years ago #

    I opened a ticket (http://core.trac.wordpress.org/ticket/16113) and was informed that this was noticed and should be fixed in 3.1.

Topic Closed

This topic has been closed to new replies.

About this Topic