WordPress.org

Ready to get started?Download WordPress

Forums

Menus completely broken in 13805 revision (23 posts)

  1. Ed Gray
    Member
    Posted 4 years ago #

    Just prior to the 13805 revision, the new menus function pretty much worked with the exception of the child-menu hierarchy. Sub-menus would become the child menu of the sub-menu above it after you saved the menu layout. For example, if you had a category with a list of sub-categories indented once underneath it, when the layout was saved, the subcategories would displayed in a step pattern with each sub-category a child menu of the sub-category that preceded it.

    However, after revision 13805, I cannot create or edit any new menus. I cannot display any pages or categories. The following javascript error occurs when the page loads in Safari, Chrome and Firefox on a Mac:

    Error: a(".menu li").draggable is not a function
    Source File: http://mywebsite.com/wp-admin/load-scripts.php?c=1&load=jquery,jquery-ui-core,jquery-ui-tabs,jquery-ui-sortable,utils,nav-menu&ver=6b258d5b7154e050607e22b1cd5f0ec2
    Line: 193

    BTW, I'm running code from trunk via SVN with a variety or popular plugins on a 1&1 shared hosting account. Everything else appears to be working normally.

  2. pbassham
    Member
    Posted 4 years ago #

    Same thing with me.

    Seems to make it half-way through the code and get hung up because after the "Add custom Links" box, nothing shows up.

    Not even the footer of the admin area.

  3. Ed Gray
    Member
    Posted 4 years ago #

    I did not even notice the footer missing on the Menus page, but you are correct, it's not there on my site either. However, I do have the "Add an Existing Page" and "Add an Existing Category" boxes on my page, as well as, the "Add Custom Links" box which is displayed above the other two. Neither of the boxes is operable. I cannot perform a search or display existing items.

  4. Tiago Duarte
    Member
    Posted 4 years ago #

    I updated my WordPress a few mins ago, and now, i can't add any menu :O
    Before it appeared that my theme didn't support menus yet now i can't create a new one.

    It just redirects me to the same page....

  5. Ptah Dunbar
    Member
    Posted 4 years ago #

    Could you guys post a screenshot of your problems as I'm not able to reproduce the bugs.

    Also, make sure your theme supports menus:
    add_theme_support( 'nav-menus' );

  6. pbassham
    Member
    Posted 4 years ago #

    I am using the default theme twentyten.

    Menu settings and create menu seem to work normally.
    http://philipbassham.net/private/qyCdHymjvj

  7. Ptah Dunbar
    Member
    Posted 4 years ago #

    @pbassham Check the screen options tab to see if the menu items (post, pages, cats, tags) are hidden as that might be the case.

  8. Dickie
    Member
    Posted 4 years ago #

    I had some odd issues after I updated... but after I deleted ALL the menus and started again, it all worked perfectly.

  9. pbassham
    Member
    Posted 4 years ago #

    I have deleted the menus many times trying to starting from scratch and it didn’t do anything for me.

    As far as the screen options - That tab is one of the things that is broken, presumably because of the same thing that is breaking the footer from showing.

    The only things that do work, like I said, are the 'menu settings' and the 'create menu'. The 'create custom link' doesn’t do anything when I try to use it.

    Also, I thought the automatic update might not have done a thorough job of updating everything, so I tried reinstalling manually, but that doesn’t seem to have worked either.

  10. Ed Gray
    Member
    Posted 4 years ago #

    I have to second pbassham. There still appears to be a problem.

    If I delete the menu, the page loads correctly and the screen options display correctly,too. However, as soon as I create a menu the page does not fully load - the footer is not displayed and the screen options cannot be viewed.

    I am using the new twentyten theme.

    I do not have the problem on a local version of WP 3.0 that I am running. Everything is working correctly. Could there be a conflict with another plug-in? However, since the page loads correctly if I delete the menu and only the Create Menu box is displayed, I am think it has something to do with one of the other options. I do have sub-categories and numerous tags. The local version of wp 3.0 I have running has very few tags and categories.

  11. pbassham
    Member
    Posted 4 years ago #

    I'll list my plugins I have active

    <li>askimet
    all in one seo pack
    autoblogged
    bulk move
    feedburner feedsmith
    folding category list
    front end editor
    google analyticator
    google xml sitemaps
    login with ajax
    reftagger
    tinymce advanced
    vipers video quicktags
    wordpress.com stats
    wordpress database backup
    wordpress loop widget
    wordpress mu domain mapping
    wptouch iphone theme
    yet another related posts plugin	</li>
    <li></li>

    if you have any of the same maybe that is the problem. (don't really want to lose settings on things I don't have to)

  12. Ed Gray
    Member
    Posted 4 years ago #

    I think I found the culprit. Too many tags. I had over a thousand tags. Once narrowed the number below 1,000 (983 to be precise) the page loaded correctly and I was able to edit the menu. However it took a long time to save the menu and when it was done it had shifted my sub-pages based on categories underneath a page sub-menu.

    Menu entries based on categories with sub-menus based on sub-categories does not appear to work. The sub-menus based on categories get shifted up underneath the sub-page sub-menus after I save the menu.

  13. pbassham
    Member
    Posted 4 years ago #

    I only have about 150, so I'm not so sure about that

  14. Ed Gray
    Member
    Posted 4 years ago #

    Some of my tags had single quotes, double quotes or slashes (//\) in them - the problem with pragmatically tagging posts. Is it possible that certain characters were not being escaped properly and causing an error in the tag list?

  15. pbassham
    Member
    Posted 4 years ago #

    I didn’t have any odd characters in my tags besides a dash.

    Like-this

  16. Just found a problem with this on rev 13845.

    On a test site with a small number of posts, the menu editing page loads fully and appears to work as expected.

    On a site with over 4,000 posts, the page stops loading after the "Add custom links" box - no box for selecting pages, no page footer.

    Looking at the source of the displayed pages suggests a possible cause: there are hidden DIVS which would (if not hidden) allow menu options to "Insert a post" or "Insert media". The "insert a post" one seems to be trying to include if not the whole text, then certainly a large part of it, for each post. On the small test site, saving the source code to a text file shows it to be over 300kb. I imagine that if the MAMP installation running the site with 4,000 posts managed to render the page, it would be enormous.

    Theme is twnetyten for both sites, both at same SVN revision. Small site is remotely hosted (Dreamhost), large one is local (MAMP).

  17. And, replying to myself - in the case of the broken site, the "Page Options" button does not work.

    In any case, if it's trying to load as much data as it appears to be, the menu page is likely to crash and burn on a lot of sites.

  18. Ptah Dunbar
    Member
    Posted 4 years ago #

    Thanks all for providing detailed feedback. We're working on addressing these issues to make menu management more scalable.

  19. Ed Gray
    Member
    Posted 4 years ago #

    I looked at the source of my current page. It not only includes the title of each page and post, but the full text of the article. I only have 120 posts on my site, but when I copied the source and saved it to a text file it was 1.1 MB is size. I do not think you want the full text of every article in the source of the menu page.

    The sub-menus also do not stay in the order I arranged them when I save the menu.

  20. pbassham
    Member
    Posted 4 years ago #

    Im not doing lots of testing and searching, but it seems like that is a possibility. I have 4300 posts on mine.

  21. michel.jansen
    Member
    Posted 4 years ago #

    I just ran into this bug with WordPress 3.0a from trunk (r14008). I have not yet looked very deep, but my situation might help diagnose the problem for others:

    • I am running a custom theme based on twentyten.
    • I have only 337 posts and less than 40 tags.
    • I have only two active plugins: jlanguage-2.2 and sociable
    • The nav-menus screen works when there are no menus
    • If there is a menu, the screen breaks on the same error mentioned earlier (TypeError: Result of expression 'a(".menu li").draggable' [undefined] is not a function.) -- after which all interactive JS-driven elements are broken.
    • The footer doesn't load on the page either.
    • The offending script is located at http://mydomain/wordpress/wp-admin/load-scripts.php?c=0&load=jquery,utils,nav-menu&ver=0d17d2e2cfe267059361dddab4601bc5
    • Somehow the screen does work on my local installation, although I don't yet understand why.

    The load-scripts.php output makes this issue quite hard to debug, but it looks like jquery-ui-draggable is not properly loaded (even though it is requested with a wp_enqueue_script( 'jquery-ui-draggable' ) line).

    I hope this is somehow helpful :)

  22. michel.jansen
    Member
    Posted 4 years ago #

    Looking more deeply at the problem, I think you guys are already way ahead of me. The page source is huge because it includes the whole body of all posts and simply gets cut off somewhere along the way with an error: <b>Fatal error</b>: Allowed memory size of 33554432 bytes exhausted (tried to allocate 209850 bytes) in <b>/srv/www/micheljansen.org-wordpress-staging/releases/20100405183138/wp-admin/includes/nav-menu.php</b> on line <b>217</b>. Because the script dependencies are not loaded until the footer (isn't that a bad idea to begin with?), which gets truncated in this case, the page breaks.

    A temporary workaround is increasing PHP's memory_limit so it fits, but obviously this will only work for small scale blogs like my own.

    Here is a really quick and dirty hack that reduces the output a little (but more can be removed safely presently):


    ---
    wp-includes/nav-menu-template.php | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)</p>
    <p>diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php
    index ff1cccf..8b9372a 100644
    --- a/wp-includes/nav-menu-template.php
    +++ b/wp-includes/nav-menu-template.php
    @@ -188,7 +188,7 @@ function wp_get_nav_menu_item( $menu_item, $context = 'frontend', $args = array(
    $output .= '<input type="hidden" name="menu-item-type[]" value="'. esc_attr( $menu_item->type ) .'" />';
    $output .= '<input type="hidden" name="menu-item-title[]" value="'. esc_attr( $menu_item->title ) .'" />';
    $output .= '<input type="hidden" name="menu-item-url[]" value="'. esc_attr( $menu_item->url ) .'" />';
    - $output .= '<input type="hidden" name="menu-item-description[]" value="'. esc_attr( $menu_item->description ) .'" />';
    + $output .= '<input type="hidden" name="menu-item-description[]" value="" />';
    $output .= '<input type="hidden" name="menu-item-classes[]" value="'. esc_attr( $menu_item->classes ) .'" />';
    $output .= '<input type="hidden" name="menu-item-xfn[]" value="'. esc_attr( $menu_item->xfn ) .'" />';
    $output .= '<input type="hidden" name="menu-item-attr-title[]" value="'.esc_attr( $menu_item->post_excerpt ) .'" />';
    @@ -212,7 +212,7 @@ function wp_get_nav_menu_item( $menu_item, $context = 'frontend', $args = array(
    $output .= '<input type="hidden" class="menu-item-append" value="'. esc_attr( $menu_item->append ) .'" />';
    $output .= '<input type="hidden" class="menu-item-target" value="'. esc_attr( $menu_item->target ) .'" />';
    $output .= '<input type="hidden" class="menu-item-attr_title" value="'. esc_attr( $menu_item->attr_title ) .'" />';
    - $output .= '<input type="hidden" class="menu-item-description" value="'. esc_attr( $menu_item->description ) .'" />';
    + $output .= '<input type="hidden" class="menu-item-description" value="" />';
    $output .= '<input type="hidden" class="menu-item-classes" value="'. esc_attr( $menu_item->classes ) .'" />';
    $output .= '<input type="hidden" class="menu-item-xfn" value="'. esc_attr( $menu_item->xfn ) .'" />';
    break;
    --
    1.7.0.2

  23. manicolaus
    Member
    Posted 4 years ago #

    My menu only has about 45 items, and the site is new and still quite small (<50 pages, <50 posts, <30 tags, <12 categories). The menu contains pages exclusively, or external links, no tags or categories. Yet when I try to save a menu change, my site crashes with a "500" error about 8 times out of 10. I am running the twenty-ten theme with WP 3.0, with a child theme. This menu problem has been ongoing before the child theme and before any plugins were activated. I've tried increasing the time-outs in php.ini without effect. This is quite frustrating. I see in the bug-tracker forum that this issue was discussed, and closed as resolved, but it isn't resolved on my site and I would like to see it reopened. The site is http://lifering.org

Topic Closed

This topic has been closed to new replies.

About this Topic