I use the simpleads module together with domain, and sometimes the 'ad' block is empty, because the queries in the simpleads_simpleads_order() function does not add 'node_access' tag to $query object.
But the _simpleads_load_ads() function check this: if ($node->simpleads_show == 1) {
$node->simpleads_show is filled with correct value, therefore $result will be empty, if the query select a node which is belong to another domain.
Block settings: Order= Random, Limit=1
5 domain.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | simpleads-1494410.patch | 1.7 KB | sweetchuck |
Comments
Comment #1
sweetchuckI think this line solve the problem.
function simpleads_simpleads_order(…)
$query->addTag('node_access');Comment #2
minnur commentedThanks for the patch, i will review this soon
Comment #3
sweetchuckMay be necessary to open an new issue.
I just now see the
$query->orderRandom();is appear in every order method section.Is this a feature or a classic CopyPaste bug?
Comment #4
minnur commentedThanks for finding this. This is definitely not a feature :)
Comment #5
minnur commentedfixed in dev.