Warning when using Domain Views Access Plugin

anrikun - July 3, 2009 - 09:12
Project:Domain Access
Version:6.x-2.0-rc8
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

It's written in Domain Views's README.txt:

5. Access Plugin

Domain Views offers an access plugin to all Views that allow you to select
on which domains a View may be accessed.

This setting is valuable for cases where certain Views are not appropriate
on all domains.

But I can't find it when I edit a view.
I want a view's display A to be viewable from domain A and the same view's display B to be viewable from domain B.
Thanks for your help.

#1

agentrickard - July 3, 2009 - 14:22
Status:active» closed

Under 'access' in the View settings. See attached.

It appears, however, that access settings are applied to all displays in a View, so you would need to create two separate Views.

AttachmentSize
Picture 1.png 48.04 KB
Picture 2.png 52.77 KB

#2

anrikun - July 3, 2009 - 15:00
Category:support request» feature request

Thank you very much for your help.
It would be great if access settings could be applied per display.

#3

agentrickard - July 3, 2009 - 16:03

That is a Views feature request.

#4

anrikun - July 3, 2009 - 16:25
Title:Where is the Domain Views Access Plugin?» Warning when using Domain Views Access Plugin
Component:Documentation» Miscellaneous
Category:feature request» support request
Status:closed» active

Actually, it seems that it's possible to set domain access settings only for a display and not the others.
But now I have another error:
Access is denied with a warning

warning: Invalid argument supplied for foreach() in /xxx/sites/all/modules/domain/domain_views/domain_views.module on line 75.

Might be related to another module I'm using. Will check that.

#5

agentrickard - July 3, 2009 - 16:33
Category:support request» bug report

Testing... Which is odd, because the plugin is in a different file, so that error means domain_views_get_grants() is returning nothing.

Are you using Domain Strict and hitting the View as an anonymous user? Do you have domains configured?

#6

agentrickard - July 3, 2009 - 16:42
Status:active» needs review

I got it, I was doing some dumb variable handling in the function. Here's a patch.

Nice catch!

AttachmentSize
509170-grants.patch 1.31 KB

#7

agentrickard - July 3, 2009 - 17:12
Status:needs review» fixed

Committed to HEAD.

#8

anrikun - July 4, 2009 - 15:09
Status:fixed» active

Still got the same error after applying patch.
For instance, when accessing /user page as an anonymous user, the same warning is displayed on top of the logging form:

warning: Invalid argument supplied for foreach() in /xxx/sites/all/modules/domain/domain_views/domain_views.module on line 75.

Will try HEAD version.

#9

agentrickard - July 4, 2009 - 15:54
Status:active» needs review

You may also need #509536: Clean up error handling, documentation. which is in HEAD and cleans up some other array handling.

#10

anrikun - July 4, 2009 - 22:27
Status:needs review» fixed

You're right. Warning is gone. Thanks! :-)

#11

agentrickard - July 5, 2009 - 15:43

Yeah. I split the patches for clarity, which caused the confusion.

#12

System Message - July 19, 2009 - 15:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.