Timeline for wp_delete_auto_drafts() deletes links in menus
Current License: CC BY-SA 3.0
26 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 30, 2014 at 15:48 | history | edited | Gellweiler | CC BY-SA 3.0 |
deleted 159 characters in body
|
May 30, 2014 at 15:23 | history | edited | Gellweiler | CC BY-SA 3.0 |
deleted 79 characters in body
|
May 30, 2014 at 15:18 | history | edited | Gellweiler | CC BY-SA 3.0 |
deleted 79 characters in body
|
May 30, 2014 at 15:12 | history | edited | Gellweiler | CC BY-SA 3.0 |
added 675 characters in body
|
May 30, 2014 at 12:04 | vote | accept | Gellweiler | ||
May 30, 2014 at 11:58 | comment | added | Gellweiler | Without stealth publish everything seems to run fine. Thanks a lot for your help. | |
May 30, 2014 at 11:56 | answer | added | Rarst | timeline score: 5 | |
May 30, 2014 at 11:34 | comment | added | Gellweiler | I've rerun wp_get_associated_nav_menu_items(3244) and changed the link. Stealth publish is a plugin our designer installed, I'm going to deactivate it and see if the bug still occurs. | |
May 30, 2014 at 11:33 | history | edited | Gellweiler | CC BY-SA 3.0 |
added 4 characters in body
|
May 30, 2014 at 11:29 | comment | added | Gellweiler | Im sorry my fault I've forgot to call wp_get_associated_nav_menu_items with the id.I'm going to correct that. | |
May 30, 2014 at 11:28 | comment | added | Rarst |
Is this still for 3244 ? I don't see that ID in queries. Any idea what is _stealth-publish thing is? It's not WP core.
|
|
May 30, 2014 at 11:24 | history | edited | Gellweiler | CC BY-SA 3.0 |
added 118 characters in body
|
May 30, 2014 at 11:07 | comment | added | Rarst |
Ok, it seems like wp_get_associated_nav_menu_items() is seriously misfiring there. Do you have any code at all running that adjusts WP_Query behavior? Can you dump/log MySQL queries running when this function executes?
|
|
May 30, 2014 at 10:58 | history | edited | Gellweiler | CC BY-SA 3.0 |
deleted 807 characters in body
|
May 30, 2014 at 10:48 | history | edited | Gellweiler | CC BY-SA 3.0 |
added 866 characters in body
|
May 30, 2014 at 10:43 | comment | added | Rarst |
Here is quick snippet for a dump of all related stuff: $post_id = 3244; var_dump( get_post( $post_id ) ); foreach ( wp_get_associated_nav_menu_items( $post_id ) as $id ) { var_dump( get_post( $id ), get_post_custom( $id ) ); }
|
|
May 30, 2014 at 10:42 | history | tweeted | twitter.com/#!/StackWordPress/status/472327158325456896 | ||
May 30, 2014 at 10:36 | comment | added | Rarst | If you have DB state could you please dump and add to the question post item 3244 and all menu items with meta _menu_item_object_id=3244 ? | |
May 30, 2014 at 10:35 | comment | added | Rarst | Yes, but (1) you cannot add auto-draft to menu, (2) as soon as you save it — it's no longer auto-draft. So logically these conditions cannot coincide. Question is why do they coincide in practice. | |
May 30, 2014 at 10:33 | comment | added | Gellweiler |
I guess it only occurs when there are actually some drafts older than 7 days (we have a lot of drafts). Because the bug would not occur when running wp_scheduled_auto_draft_delete twice in a short time frame. For debugging purpose I always reset the DB to the problematic state to reproduce the conditions. I believe that may also explain why others are experiencing this bug in larger time frames, assuming they have not that many drafts as we have.
|
|
May 30, 2014 at 10:15 | comment | added | Rarst | This is very strange. Auto draft only exists in that brief time when you open editor to start on a new post, but hadn't saved it even once. Why would item like that have menu items associated with it? Puzzling. | |
May 30, 2014 at 9:43 | history | edited | Gellweiler | CC BY-SA 3.0 |
deleted 46 characters in body
|
May 30, 2014 at 8:56 | history | edited | Gellweiler | CC BY-SA 3.0 |
added 633 characters in body
|
May 29, 2014 at 17:57 | review | First posts | |||
May 29, 2014 at 18:02 | |||||
May 29, 2014 at 17:56 | history | edited | Gellweiler | CC BY-SA 3.0 |
deleted 98 characters in body
|
May 29, 2014 at 17:42 | history | asked | Gellweiler | CC BY-SA 3.0 |