Hello Guys,

I am having an error message with Domain Access 7.x-2.9 in conjunction with Organic Groups 7.1 Dev.

I decided to use both of these module because Domain access can create a separate table and create a sub domain or use other domain, in other hand OG helps me to maintain group for a domain.

I am running Drupal 7 in Windows with XAMPP.

Note: I am not sure whether this is an issue with OG or Domain access, however since the error is from domain.module then I decided to post it here.

Background: I did installed Domain Access first, then OG and other required modules.
Created a content type: Group for OG
Now, when I created a new OG group node, I received this error message:

Warning: Invalid argument supplied for foreach() in domain_node_load() (line 1466 of E:\xampp\htdocs\test7\sites\all\modules\drupal\domain\domain.module).

But when I refresh the page I no longer see the error message.

I tried to create another group again and same error show up.

For other content types (not a group) is fine.

Anyone else experienced this error message? From what I can see this error does not affect OG, DA and other modules functionality.

If any fix for this much appreciated! :)

Thank you.

CommentFileSizeAuthor
#2 1065470-node-load.patch1.32 KBagentrickard

Comments

agentrickard’s picture

Category: support » bug

That would suggest that some of your nodes are not assigned to a domain. Is the OG node assigned to a domain? (It may also be that OG is calling a node_load() before all data is saved.)

It's an E_ALL notice that needs to be checked for. It's not fatal, but still an error.

agentrickard’s picture

Status: Active » Needs review
StatusFileSize
new1.32 KB

And a patch.

HippoOnDiet’s picture

Status: Needs review » Fixed

Hi Agent Rickard 007,

The OG node is assigned to a specific domain.

And your patch has fixed this issue... thank you again for developing this module.

kclarkson’s picture

Agent Rickard 007.

Sorry to ask this. But how do you apply your patch? What file and where do you place your patch?

Thanks,

agentrickard’s picture

Status: Fixed » Reviewed & tested by the community

Two notes:

@LTW Dhaniel
Please don't mark issues as 'fixed' if a patch is involved. If you need the patch, then so does everyone else, and it needs to be committed. The proper status is 'reviewed & tested by the community'

And thanks for the test!

@kclarkson

http://drupal.org/patch/apply

My patches are all formatted from the /domain modules folder.

agentrickard’s picture

Status: Reviewed & tested by the community » Fixed

Patch tested and committed to 7.x.2 and HEAD.

HippoOnDiet’s picture

@Rickard

Ooops sorry I didn't know, I'll remember this next time.

Thanks again.

@kclarkson
I did manual patching by removing some code with - and adding code with + into the module file.

tebb’s picture

Title: Domain Access + Organic Group » Domain Access: Warning: Invalid argument supplied for foreach() in domain_node_load() line 1466 of domain.module

Thanks Agent Rickard.

I had the same error on the same line, but I don't have organic groups installed.

The supplied patch fixed the issue, so I have changed the issue title. OK?

agentrickard’s picture

Fine. This will, in fact, happen for any node that has no domain assignments.

Of course, every node should have a domain assignment, so you likely need to rebuild access permissions.

Status: Fixed » Closed (fixed)

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

Anticosti’s picture

Subscribing