Download & Extend

Warning when using Domain Views Access Plugin

Project:Domain Access
Version:6.x-2.0-rc8
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Status:active» closed (fixed)

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

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

That is a Views feature request.

#4

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 (fixed)» 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

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

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

Status:needs review» fixed

Committed to HEAD.

#8

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

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

Status:needs review» fixed

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

#11

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

#12

Status:fixed» closed (fixed)

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

nobody click here