Postponed (maintainer needs more info)
Project:
Profile 2
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2012 at 06:13 UTC
Updated:
28 May 2015 at 05:48 UTC
Jump to comment: Most recent
Comments
Comment #1
bachbach commentedi'm working on a migration with migrate and migrate extra, and i have many rollback, that give me the same message
Comment #2
kaizerking commentedIf you have custom modules, check the modules, for custom field/fields for incorrect creation and updates. I have found that in one of my custom modules, though the code and arguments are correct, one of the fields was not correctly defined.So while creating the functions run correctly but while deleting . the fields are not recognised to be deleted and since entity controller cannot find all the fields and it will not be able to delete the fields and since fields still exists for the entity, you get the error and will not be able to delete the profile. check your contrib modules for this
Comment #3
Anonymous (not verified) commentedI think it has something to do with the deleted profile continues on some cache? I've cleared my cache and now the notice has gone!
Comment #4
matt.rad commentedSame issue. Clearing the cache in admin/config/development/performance solved it for me too!
Comment #5
ssoulless commentedWell actually this is a bug, it should not be happening, this is a bug and needs work, ill see if i can make a commit to the actual version, and begin with my developer contributions in drupal =D
Comment #6
cord1 commentedThis is a bug.
I solved it by enclosing an if around return like this
if ($type_name != "(deleted typename)") {
return ($account->uid > 0 && $profile->type()->userCategory && profile2_access('edit', $profile));
}
Comment #7
spleshkaGuys, can't reproduce this bug. Can someone write down steps to reproduce it?
Comment #8
vintorg commentedConfirmed clearing cache fixes problem.
@Spleshka - Create a new profile type. Add some fields, then use it in some way. Then delete it.
Comment #9
DrCord commentedYeah, I can confirm this bug as well, exactly as vintorg says.
Comment #10
spleshkaI am using the latest dev release. I tried:
1. Create a new profile type
2. Add two fields to the profile type
3. Add data for those two fields
4. Delete profile type
And I see no php warning.
A also tried:
1. Create a new profile type
2. Add two fields to the profile type
3. Add data for those two fields
4. Delete field from the profile type
Still no warnings.
So please, if you want me to fix this issue, provide a detailed information about the issue. Give me a clear steps to reproduce the issue, and the number of release you are using.
Leave this issue in the "Postponed" state, because I still need additional information.
Comment #11
kopeboyThis is happening to me since ages.
Everytime I just view a View which has enabled some bulk operations with a rule component doing anything with a user account field I get this (repeated more than once)
Notice: Trying to get property of non-object in profile2_access() (line 694 of /srv/bindings/bde2e1dc85df4b15b052058e9e181d97/code/sites/all/modules/profile2/profile2.module).
Just updated to Profile2 and VBO latest dev, and latest stable releases of: entity api, panels, ctools, views
flushed and rechecked. Still the same notices.
It is not causing any actual error (at least that I can notice) but is very annoying..
Steps to reproduce:
UPDATE: steps to fix this:
But:
Comment #12
abhinya commentedThis happened after i removed the main profile from the profile 2 config page.
Clearing the Cache removes the notification.