query posts and custom post type with meta key

I’m afraid WP_Query is not able to fetch (Posts with custom field) or (ailec_even). You’ll have to query the firs one, than the second one and merge those arrays. Use WP_Query instead of query_posts.

I’ve just tried it on my local installation and this code called from index.php of twentytwelve works (brings post with title “Hello post” and ai1ec_event with title “Event” – both with custom field “teaser” with value “on”

$events_query = new WP_Query( array('post_type' => array('ai1ec_event', 'post'), 'meta_query' => array( array( 'key' => 'teaser', 'value' => 'on' ) )) );
while ( $events_query->have_posts() ) :
    $events_query->the_post();
    echo get_the_title() . '<br/>';
endwhile;

Have to say that both (post end event) were created by admin user – I’ve checked the code and there is an extensive part with custom capabilities.

error code: 523