Hi,

I just installed the "Views Bulk Operations" Module and as soon as I try to load the VBO view on my page I get the following notice:

Notice: Trying to get property of non-object in paragraphs_bundle_permissions_paragraphs_item_access() (line 36 of /home/xxx/sites/all/modules/paragraphs/modules/paragraphs_bundle_permissions/paragraphs_bundle_permissions.module).

I do not know, if this is an issue coming from Paragraphs or VBO. When I delete the VBO Field from the view, the notice disappears.

Best regards,

Tobi

Comments

DerTobi75 created an issue. See original summary.

DerTobi75’s picture

Status: Active » Closed (works as designed)

Looks like the notice was not a problem from paragraphs!

drupupp’s picture

I'd like to re-open this, because I am also getting error message. While I"m using VBO on the site, it's appearing on the node page of a content type that has a paragraph field. I have set permissions for all roles, and the site is functioning correctly (including creating and editing the paragraph bundle that I have created), but the error message continues to appear (twice, in fact) whenever the page renders.

jlockhart’s picture

Title: Notice, when using a VBO view » Non Object notice when there is no bundle to check
Version: 7.x-1.0-rc4 » 7.x-1.0-rc5
Status: Closed (works as designed) » Needs review
StatusFileSize
new47.86 KB
new928 bytes

I ran into this as well with VBO. After doing a little investigation I believe this is a bug with Paragraphs. Reading the comments for paragraphs_bundle_permissions_paragraphs_item_access the IF statement at line 30 says, "If there was no bundle to check against, or the $op was not one of the supported ones, we return access denied". That seems to indicate that it should have been doing a check on the entity, which it wasn't. My patch adds that check and also updates the comment to indicate that it returns access ignore not access denied.

My main concern at this point is whether or not this should be returning access ignore if we don't have an entity. Was it originally doing that but then changed later because of access issues? Or was the check intended and the comment written but the check not actually done?

I've tested visibility of our paragraphs for anon users and don't see any issues or errors.

nicolas bouteille’s picture

had the same notice and error is gone with patch. thanks !

  • jstoller committed 6f73f4d on 7.x-1.x authored by jlockhart
    Issue #2707217 by jlockhart, jstoller, Nicolas Bouteille: Non Object...
jstoller’s picture

Status: Needs review » Fixed

Patch committed to dev with minor code cleanup.

Status: Fixed » Closed (fixed)

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