Unpredictable template loading when multiple post types are involved
|Reported by:||scribu||Owned by:|
|Component:||Posts, Post Types||Keywords:||has-patch commit fixed-major|
Description (last modified by scribu)
 sought to improve the template loading behaviour when multiple post types are involved, but I don't think it was the right approach.
1. It creates backward-incompatible behaviour.
Take a query of 'post_type' => array( 'serie', 'post' )
In 3.4, archive.php always ended up being loaded, since it was unlikely for archive-Array.php to exist.
In 3.5, it unexpectedly loads archive-serie.php.
2. The order of the post types becomes important.
For example, 'post_type' => array( 'serie', 'post' ) can potentially load a different template from 'post_type' => array( 'post', 'serie' ).
a) always load archive.php if 'post_type' is an array.
b) choose the template based on get_queried_object().