The solution as described in your own answer seems to be like a workaround for your original question, it doesn't answer the question for those case where you cannot (or do not want to) "turn the pager off to resolve the issue". To actually show blocks on paginated pages (as in your original question), you can use the Rules block visibility module for this. Here is a quote from its project page:
The Rules block visibility module allows Rules components to be used to control block visibility. This provides Drupal administrators and developers extreme flexibility in controlling when blocks should be displayed on their websites, in addition to the default visibility options provided by Drupal.
The general idea is that if you can do it with Rules, you can use it to control block visibility, so the possibilities are limitless.
Need to show a block only for users registered more than a month ago?
Perhaps you have a block that must be shown only between 8am-5pm on weekdays?
What about displaying or hiding a block based on current weather conditions?
All of this can be done by using Rules block visibility.
With that, and as per the "if you can do it with Rules, you can use it to control block visibility" above, you've reduced your question to making Rules "check the path of the current page" (so that the block is only shown on pages with a path either matching "news
" or starting with "news?page=
").
For an illustration of how to use this module, refer to my answer to "How to stop a Views block from displaying to admins, such as user/1?". It includes a Rules Component (in Rules export format), which you should replace by this variation of it to make it match your specific question):
{ "rules_show_block_on_pages_with_url_parms" : {
"LABEL" : "Show block on pages with url parms",
"PLUGIN" : "rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"USES VARIABLES" : {
"module" : { "label" : "Module", "type" : "text" },
"delta" : { "label" : "Delta", "type" : "text" },
"result" : { "label" : "Result", "type" : "boolean", "parameter" : false }
},
"IF" : [
{ "OR" : [
{ "data_is" : { "data" : [ "site:current-page:path" ], "value" : "news" } },
{ "text_matches" : {
"text" : [ "site:current-page:path" ],
"match" : "news?page=",
"operation" : "starts"
}
}
]
}
],
"DO" : [ { "data_set" : { "data" : [ "result" ], "value" : "1" } } ],
"PROVIDES VARIABLES" : [ "result" ]
}
}
To further enhance the above Rules Component (to make it more generic), just replace the 2nd Rules Condition in it with something using an appropriate regular expression (ie to check if the current path contains a number to indicate the page id).
/
afternews
but an url parameter. Trynews*
<?php $url = request_uri(); if (strpos($url, "news")) { return TRUE; } ?>
There are many drupal way to check this.