This is critical: I have been working all week on creating a "Father's Day gift guide" using the Ad module and Ad Views. I made the View "Unrestricted" today and made sure that all the ads were "active."

However, if I bring up the page created by the View, there is no content on the page ... unless I am logged in as the administrator. Then I can see all the ads.

Please help! This page needs to be "live" by Sunday ... and I have obligations this week, so I can't work Saturday or Sunday. I need a solution to this ASAP!

Comments

modctek’s picture

You need to make sure that Anonymous has permission to view ads.

Katrina B’s picture

Anonymous users can view ads; all of the other ads on the site are visible to anonymous users, except for those in an Ad View page.

summit’s picture

Subscribing, greetings, Martijn

Katrina B’s picture

I would deeply appreciate help with this ASAP. I am on deadline to get a solution working in less than 48 hours.

Katrina B’s picture

I've also tried creating a block, with the same results. By the way, these are Image Ads I'm trying to assemble into a View.

And when I try to view the Ad View (as a page or as a block) as an anonymous user, I get this error:

User warning: Unknown column 'ads.nid' in 'where clause' query: SELECT ads.aid AS aid, RAND() AS _random FROM ads ads LEFT JOIN node node ON ads.aid = node.nid INNER JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN node_access na ON na.nid = ads.nid WHERE ((ads.nid IS NULL OR (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 1 AND na.realm = 'workflow_access') OR (na.gid = 0 AND na.realm = 'workflow_access_owner') OR (na.gid = 0 AND na.realm = 'content_access_author') OR (na.gid = 1 AND na.realm = 'content_access_rid'))))) AND ( term_node.tid = 574 )ORDER BY _random ASC LIMIT 0, 15 in _db_query() (line 141 of /home/ctribn/public_html/includes/database.mysqli.inc).

summit’s picture

Hi,
Is ads.nid a field in the database are may be the brackets missing {} to get the right table?
greetings, Martijn

Katrina B’s picture

Well, I'm a graphic designer, not a developer, programmer, or coder ... so I have no idea.

summit’s picture

ad views needs some love. I am also not a programmer professionaly. I do not use ad views right now, just wanted to give you a clue to look for.
good luck with finding the root course.
greetings, Martijn

Katrina B’s picture

Thanks. We have some techs (who work for the media company that owns the newspaper I work for) looking into how to fix this ... but they're baffled by the problem at the moment.

I would really love to see this module working correctly ... there's so much I could do with it!

Katrina B’s picture

Dev version of module works; beta version does not.

glarsch’s picture

I've got the July 11 dev version installed and I am having the same issue as stated above. Any other ideas? I'd really like to see a fix for this too. I'm using views to rotate through a few image ads in one spot.

milesgillham’s picture

Hello, I'm presently trying to reproduce the bug. Once that is done it should be straight forward to fix. Working from the -dev branch.

@Summit, yes ad_views needs much love

Miles

summit’s picture

Great Miles, looking forward to a working version.
greetings, Martijn

milesgillham’s picture

Status: Active » Postponed (maintainer needs more info)

As Katrina B says in comment #10 I believe this is fixed in dev, probably due to other code fixes that have been performed. However, that doesn't explain @glarsch's problem. Glarsch: are you in a position to grab the dev release and tell me if the problem is still there, and if so provide as much information as you can.

Regards, Miles

3dloco’s picture

Version: 6.x-1.0-beta1 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

Hello,

I am using the latest 6.x-1.x-dev and I am experiencing the same issue for anonymous users. My current view access is set to "Unrestricted" and changing this setting really does not make a difference (like restricting it to roles and checking off the anonymous, or setting it to a permission).

Looks like the SQL query is using ads.nid instead of ads.aid when checking to see whether the anonymous user has access to view the ads.

FROM ads LEFT JOIN node_access na ON na.nid = ads.nid WHERE ((ads.nid IS NULL
...sites/all/modules/views/includes/view.inc on line 771

could this be a join coming from views itself...?

...changing version and status to reflect this :)

Thanks,

KH