I'm getting the following error when editing the "article" content type :
Notice : Undefined property: stdClass::$simple_access dans simple_access_form() (ligne 450 dans /var/www/ccqm/sites/all/modules/simple_access/simple_access.module).
Editing "basic page" doesn't display this error message however.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

clauded’s picture

Just one precision : I'm getting the error for all content types. I've ran the rebuild acces rights but no change.

clauded’s picture

This seem related to multi-language : switching to english and removing other languages then saving the content type and the warning goes away. It's also possible to switch to the other language and the error won't come back. This is only a workaround of course.

kennyacock’s picture

I get this with no multi-language use at all. (I'm only using English on my site.) Also, I get this when adding just about any content type.

mesr01’s picture

Following @kennyacock observation: «Editing "basic page" doesn't display this error message however.», I checked all my content type to find out that only 3 of them experience this problem. And these 3 type are not random: they are precisely the ones that I created this morning, while the other types had been created a while ago, probably before installing Simple Access. So I completely uninstalled and reinstalled the module, but it didn't change anything. That's still one clue closer to solving the issue.

rainerdansseg’s picture

also facing this problem.
is there a solution yet?

mesr01’s picture

Yep. These two patches solved all problems I had with this module. (Incidentally, this issue may be a duplicate of either #991956 or #1150112.)

rainerdansseg’s picture

hm, I'm using version 7.x-2.0-beta1 and both patches are already included...
the errors on my page are:

  • Notice: Undefined property: stdClass::$simple_access in simple_access_form() (Zeile 430 von /var/www/XXX/html/XXX/sites/all/modules/simple_access/simple_access.module).
  • Notice: Undefined property: stdClass::$simple_access_owner in simple_access_form() (Zeile 431 von /var/www/XXX/html/XXX/sites/all/modules/simple_access/simple_access.module).
  • Notice: Undefined property: stdClass::$simple_access_owner in simple_access_form() (Zeile 474 von /var/www/XXX/html/XXX/sites/all/modules/simple_access/simple_access.module).
  • Notice: Undefined property: stdClass::$simple_access in simple_access_form() (Zeile 483 von /var/www/XXX/html/XXX/sites/all/modules/simple_access/simple_access.module).

They pop up, when I'm creating new content (of only few content types). If I edit them, no error is displayed...

Changing the sites' language to english, doesn't change anything...

drupal_simply_amazing’s picture

Same thing here. I got same error when adding new content

wOOge’s picture

Any progress on this? The errors are still around.

piemanji’s picture

The error messages can be suppressed by preceding the offending statements with an '@' sign.

So line 430 becomes: $user_groups = @is_array($node->simple_access) ? array_filter($node->simple_access, '_simple_access_filter_access') : array();
431: $owner_priv = @is_array($node->simple_access_owner) ? array_filter($node->simple_access_owner) : array();
474: $access = array('owner' => @$node->simple_access_owner);
483: $form['simple_access']['simple_access'][$gid] = simple_access_form_row($gid, $group, @$node->simple_access, $admin);

Hope that helps. Certainly worked for me.

laroccadahouse’s picture

subscribing

Anonymous’s picture

#10 worked for me too! Thank you very much.

dianacastillo’s picture

Yes I had this problem but was solved by #10 as well

dianacastillo’s picture

Status: Active » Reviewed & tested by the community
gordon’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
taggartj’s picture

Version: 7.x-2.0-alpha1 » 7.x-2.x-dev

Yep # 10 worked for me was getting the line 456 error now I am not (latest div )
except ... the line numbers are different , just ctrl+f you will find them

stanb’s picture

Issue summary: View changes

Duplicate here I think:

https://drupal.org/node/1950118

#10 worked for me as well for Simple Access 7.x-2.0-rc4.

This workaround appears to only suppress the error as explained here: http://www.php.net/manual/en/language.operators.errorcontrol.php

Is there a way to prevent the error from occurring on newer releases?

stanb’s picture

This is very strange. I deleted the nodes for the content type (in my case, it was only one) that was producing the error, changed the Title field label back to "Title", reset the file directory for the image fields for that content type to nothing and magically, the error disappeared.

To try to narrow down the cause I added a new Title field label and added a file directory for the image fields but could not reproduce the error. It appears to be gone. Can't think of what else I might have changed to stop the error from occurring.

I created another "test" content type with similar field types and the error did not appear.

stanb’s picture

Assigning then reassigning Simple Access permissions for the content type seems to have eradicated the errors.

suffering drupal’s picture

I tried #10 on rc4, only got more errors. Maybe my fault, but I was so sick and tired of loosing time trying and the lack of interest of the maintainers as usual, that I felt a great relieve uninstalling this module and opting for the Private module.