I currently use the pmc_gallery_menu_order_fix for setting the menu order for image attachments in galleries as seen here: Wordpress 3.5 Gallery Menu Order not set?
With Wordpress 4.0, I am now getting an endless loop on the wp_update_post part of the code. Breaking it down, there appears the post IDs, arrays etc all seem to work properly but when it hits that update post seems to get wacky. Running into a out of memory error due to the endless loop it appears.
Does anyone have another solution to update the menu_order for attachments from gallery shortcode?
EDIT: the answer I used from the original question referenced above is - https://wordpress.stackexchange.com/a/89370/57313