Opened 15 years ago
Closed 14 years ago
#14576 closed defect (bug) (invalid)
Nav Menu Item Description Duplicates Content
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Menus | Keywords: | |
Focuses: | Cc: |
Description
I noticed when playing around with WP3.0 Navigation on a clean install that when you add a page to the menu the page content gets duplicated in the nav_menu_item custom-post-type row for the navigation...
This caused issues with wp-e-commerce but was resolved through better query structuring. Just thought I should report it incase it was a genuine bug (does a menu item really need the content duplicated?
Attached was my attempt at a fix in nav-menu.php
best
Jeff
Attachments (1)
Change History (4)
#2
@
15 years ago
Hi @filosofo
essentially the SQL statement was badly written and is not restructured to suit, simply speaking WPEC was doing a (sudo code)
SELECT
post_id
FROMwp_posts
WHEREcontent
= '[shortcode]' LIMIT 1;
this was old code used for pulling out the ID for the products page to render the permalinks etc. however when 3.0 came out and people started to use the navigation and menu system and added the products-page to the menu, WP was adding a new row into wp_posts for the custom post type of nav_menu_item
and duplicating the content... which was returning the wrong ID and failing to render permalinks...
As I said, WPEC has resolved the issue with better SQL statement, but thought I should report the issue incase it relates to other Plugins, Themes performance issues ..
Could you please provide some more information about the issue?
What is the problem with WP E-Commerce? Do you have links to relevant discussions?
Also, see #14415 which is related at least in the solution of not including the page content automatically.