no RSS feed
-
Hello Alessandro,
I am using your plugin now for more than 2 years on my wp site and I am very happy with it. I recently wanted to look into how to produce RSS feeds, and discovered that although normally a built-in feature of wordpress, it does not work on mine (probably has never worked). Doing a bit of debugging, I discovered that when sending the feed uri, $wp_query looses its contents after the CML function ‘hide_translations’ is called from do_action_ref_array(‘pre-get-posts’), so the next actions are called with an empty $wp_query and get stuck somehow, so that do_action_ref_array(‘pre-get-posts’) never returns. By adding the return argument $wp_query to the following lines in CML frontend.php, I could solve the problem, although I did not fully understand why.
[line 1978]
if( is_feed() ) {
$wp_query = $this->filter_posts_by_language( $wp_query );
return $wp_query;
}
[line 1811]
if( isset( $this->_looking_id_post ) ||
CMLUtils::_get( ‘_is_sitemap’ ) ) {
return $wp_query;
}
[line 1967 end of function filter_posts_by_language]
return $wp_query;Why in line 1978 you recalculate $wp_query, but don’t return it? As already said before, not sure where the problem is caused, as there seems no function that actually uses the return value from your functions, but probably there is one somewhere out there, otherwise $wp_query would not be lost.
- The topic ‘no RSS feed’ is closed to new replies.