First off, this module has worked excellently until very recently, so thanks for continuing to work on it.

That said, I upgraded to Views 7.x-3.3 and now all of my 'Profiles' Views are breaking. If I create a new 'Profiles' View and set it to show Fields, I get this message as the only Field:

Broken/missing handler (Broken handler profile.table)

Previously, I believe, that would have been the Profile:ID. If I try to add the Profile:ID as a Relationship, it isn't listed as one of my options. Similarly, it has disappeared as an option from all of my Views that *had* been using it.

When I go to Export the View, I see sections like this:

/* Relationship: Broken/missing handler */
$handler->display->display_options['relationships']['profile']['id'] = 'profile';
$handler->display->display_options['relationships']['profile']['table'] = 'users';
$handler->display->display_options['relationships']['profile']['field'] = 'profile';
$handler->display->display_options['relationships']['profile']['label'] = 'Profile';
$handler->display->display_options['relationships']['profile']['required'] = 1;

That makes me think that everything *should* be working but somehow the handler in the current version of Profile2 is no longer compatible with Views.

Any suggestions?

Comments

kyleoliveira’s picture

Priority: Normal » Major

I've tried changing to the most current dev releases of Views and CTools and rolling back to RC2 of Entity API (and a few combinations with those) and I'm still not having luck. Since this seems to make Profile2 unusable via Views, I'd like to up the priority to at least major.

One thing I've been wondering: where is the Views handler defined for the Profile2 Entity? If someone could point me in the right direction as to how that's set up, maybe I could poke around with it on my own time, too.

seanbfuller’s picture

I'm also seeing this with a fresh install using profile2 7.x-1.2 and views 7.x-3.3. I have a view of users with two profile fields that are coming through a"User: Profile" relationship. Looking at the preview sql, the profile fields in the select clause are all coming up at 'profile2' instead of a table.field combo. I'm guessing that's the entity type in the field table.

Unlike #1 above, I do not have any missing handler comments when I go to export the view. Here's a quick test view that I created:

$view = new view;
$view->name = 'profile_test';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'users';
$view->human_name = 'profile test';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'profile test';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['access']['perm'] = 'access user profiles';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'full';
$handler->display->display_options['pager']['options']['items_per_page'] = '10';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['row_options']['hide_empty'] = 0;
$handler->display->display_options['row_options']['default_field_elements'] = 1;
/* Relationship: User: Profile */
$handler->display->display_options['relationships']['profile']['id'] = 'profile';
$handler->display->display_options['relationships']['profile']['table'] = 'users';
$handler->display->display_options['relationships']['profile']['field'] = 'profile';
$handler->display->display_options['relationships']['profile']['required'] = 0;
/* Field: User: Name */
$handler->display->display_options['fields']['name']['id'] = 'name';
$handler->display->display_options['fields']['name']['table'] = 'users';
$handler->display->display_options['fields']['name']['field'] = 'name';
$handler->display->display_options['fields']['name']['label'] = '';
$handler->display->display_options['fields']['name']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['name']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['name']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['name']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['name']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['name']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['name']['alter']['trim'] = 0;
$handler->display->display_options['fields']['name']['alter']['html'] = 0;
$handler->display->display_options['fields']['name']['hide_empty'] = 0;
$handler->display->display_options['fields']['name']['empty_zero'] = 0;
$handler->display->display_options['fields']['name']['link_to_user'] = 1;
$handler->display->display_options['fields']['name']['overwrite_anonymous'] = 0;
/* Field: Profile: First name */
$handler->display->display_options['fields']['field_first_name']['id'] = 'field_first_name';
$handler->display->display_options['fields']['field_first_name']['table'] = 'field_data_field_first_name';
$handler->display->display_options['fields']['field_first_name']['field'] = 'field_first_name';
$handler->display->display_options['fields']['field_first_name']['relationship'] = 'profile';
$handler->display->display_options['fields']['field_first_name']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_first_name']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_first_name']['alter']['more_link'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_first_name']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_first_name']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_first_name']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_first_name']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_first_name']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_first_name']['hide_alter_empty'] = 1;
$handler->display->display_options['fields']['field_first_name']['field_api_classes'] = 0;
/* Sort criterion: User: Created date */
$handler->display->display_options['sorts']['created']['id'] = 'created';
$handler->display->display_options['sorts']['created']['table'] = 'users';
$handler->display->display_options['sorts']['created']['field'] = 'created';
$handler->display->display_options['sorts']['created']['order'] = 'DESC';
/* Filter criterion: User: Active */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'users';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = 1;
$handler->display->display_options['filters']['status']['expose']['operator'] = FALSE;

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'profile-test';

seanbfuller’s picture

A quick update to my comment above: entity module is 7.x-1.0-rc3.

kyleoliveira’s picture

@seanbfuller: Yeah, my User: Profile relationship is completely missing - I can't add it for Views based on Profiles or on Users (and existing Views based on either are broken). The fields are all still there. It's like the user id relationship in Profile2 isn't being interpreted correctly by Views or something.

seanbfuller’s picture

OK, I did a bit more digging and was able to solve my issue. After reading through #1376632: How can I combine two profile types into one row of a Views table?, looks like the problem is that you have to create a relationship for each profile type by ensuring that the profile types are checked. Leaving all unchecked seems to not give you any fields.

@kyleoliveira, can you check that relationship to see if you have the correct types checked?

I think there's still a follow-up issue when you have multiple profile types checked (I keep getting multiple results and errors when I try to aggregate), but this may at least solve the problem of the relationship to fields being broken.

kyleoliveira’s picture

StatusFileSize
new30.7 KB
new25.13 KB
new77.79 KB
new27.12 KB

I don't even get the option of adding the relationship.

I try to create a View of Profiles:
Trying to create a View of Profile fields, seems to work ok...

I get this message:
These warnings seem to indicate I the handler is broken somehow...

This is what the View looks like by default:
No relationships by default...

And this is what I have available to me when I try to add a relationship:
I can't even add the a relationship to get the User ID of a Profile...

As you can see, I can't even add the relationship I want. It used to be there and I set up many Views based on that available relationship.

seanbfuller’s picture

@kyleoliveira Ah, OK. My view is users-based with a relationship to profiles. When I created a profile-based view I definitely was able to set up a new view that didn't have the broken handler. Following those steps, mine starts with the profile id field in place. Based on that, there could be something wrong with your install? I'm no expert, but maybe disabling and uninstalling profile2, views and entity, then starting over might help fix it.

I'm going to keep digging into the issues that I'm seeing and I'll open a new ticket if I can dial in on what exactly is going on. It might just be the settings I'm using. Looks like what your seeing is something else so I'm guessing our issues are unrelated. Sorry for the extra noise and good luck!

kyleoliveira’s picture

Status: Active » Closed (won't fix)

For reference, I've ported the information captured by my Profile2 profiles into Fields attached to my Users. I suspect there may have been a database issue to get me to where Profile2 came up with this error, but I can't be certain.

My solution is working fairly well for my use-case where all I need is more information for each of my users and not necessarily the other plugin-provided stuff that Profile2 gives you (OG stuff, etc.).

anybody’s picture

Status: Closed (won't fix) » Active

Sorry but the issue still exists and I don't know why this issue has been closed with a won't fix.
On my site the references on a user view are also "magically" gone and the view is broken now.

Does somebody else have the same issue perhaps? I guess it was not a view update, because my current views Version is 3.5 and I surely used > 3.3 before. Everything was alright at that time.

I think it makes a lot of sense to relate a user view to the profile fields like it was possible before.

Anonymous’s picture

Same here, serious problem I can't access related data in views.

anybody’s picture

Status: Active » Fixed
Issue tags: +#views

I am very happy to tell you that this seems to have been a view issue that has already been fixed.

I've tried to update
- ctools
- profile2
- entities
to the latest dev version without any success.

Lately I updated views 3 to:
7.x-3.x-dev (2012-Nov-20)
and everything works fine again!!

If anyone can find out, which issue this problem was related to (#xxx), please link it here.
I've marked this as fixed for now.

ghyupdc’s picture

I've tried changing to the most current dev releases of Views and CTools and rolling back to RC2 of Entity API (and a few combinations with those) and I'm still not having luck. Since this seems to make Profile2 unusable via Views, I'd like to up the priority to at least major.

anybody’s picture

Status: Fixed » Active

Hi and thanks a lot, so let us mark it as active again. It's major already. Sorry for my too quick acting.

Here's my currently working configuration (which was broken before with stable versions):
- entity 7.x-1.0-rc3+11-dev (2012-Oct-24)
- profile2 7.x-1.2+7-dev (2012-May-24)
- views 7.x-3.5+24-dev (2012-Nov-20)
- Chaos tool suite (ctools) 7.x-1.2+7-dev (2012-Nov-17)

One more information: I've completely deleted the "views" module folder before and re-downloaded it manually. I don't think that there is a connection but perhaps you should try.

Can anyone confirm that exactly this configuration is (after flushing caches) still NOT working? Or can anyone confirm that the problem was already solved?

Furthermore it would be nice to point out that way, which related issue was the real reason.

crifi’s picture

Status: Active » Postponed (maintainer needs more info)

This issue isn't fixed, since there is no patch commited. If this issue is a duplicate of a views issue, we should mark it as duplicate. Currently it isn't reliable, that this bug is already fixed and which issue has fixed it. So it's a better idea to leave it open.

crifi’s picture

Status: Postponed (maintainer needs more info) » Active

Thanks @all. Comment in the same moment. ;-)

Anonymous’s picture

#13 I have tried your suggested combination and a combination off all latest dev's without result.
It seems very serious to me, part of my clients site is unusable, user info can't be shown in relation to the user.

Is there anybody who has the knowledge to find the cause of this problem. I am willing to sponsor your time invested.

kyleoliveira’s picture

As I said in #8, I never found a fix for the actual issue presented here due to business needs. I'm now having a similar issue with EntityForms - it was working fine and then something happened and now all of its' Views handlers are busted. I followed similar steps as before to try to get EntityForms working again to no result.

With all of that in mind, I wonder if the issue lies in a shared component rather than the modules themselves. I'm guessing the issue lies in the Entity module, but I don't really have proof.

serguitus’s picture

Hi kyleoliveira:

Does this could be related to drupal core version? (there is a core entity api) I have a 7.15 install that is working fine but then I made an export to other install that I suspect was upgraded to D7 and there it is having troubles. Have you done some other work? There is a new entity api release (7.x-1.0) Have you tried it?

Hope we could Find a solution together

serguitus

kyleoliveira’s picture

That is a good point. I have updated from 7.17 to 7.18, so that could be an issue as well.

kyleoliveira’s picture

Yet, my Pantheon dev site running all of the stable releases for the pertinent modules and core 7.18 seems to work fine. The site I'm having errors on has been through a few more updates than the Pantheon site, so perhaps the issue is introduced somewhere along the upgrade path in one or more module? It doesn't seem very reproducible, which is why I just abandoned trying to fix it with Profile2 above, but it is really frustrating when it happens.

serguitus’s picture

Well, I think I found the origin of the problem (at least for me Im sure) The module that is causing the problem is UUID who makes some type of generalization of entity api (according to its documentation). This idea is very logic since kyleolivera pointed on an entity related issue. I Still dont know where is the bug but I think this is a good start. I´ll wait for your feedback on this.

Anonymous’s picture

Thanks! Disabling UUID solves the problem for me too.

kyleoliveira’s picture

I think that did it for me too! I'll have to do some more tests tomorrow, but you may have just made my birthday.

Countzero’s picture

Guess this is eveyone's birthday !

I hereby confirm that disabling UUID made the relationship stuff in Views reappear at its normal place.

Thanks a billion serguitis !

serguitus’s picture

I guess we could notify UUID developers on this views related issue. I dont think this is a profile2 issue as this views mal function afects other relationships independent of profile2
what do you think?

Countzero’s picture

I think you're dead right, and would have done it myself if I wasn't so busy.

kyleoliveira’s picture

Confirmed things here as well. Notifying the UUID devs would be a good idea. Does anyone know the best way to do that? Do we just change the Project queue for this issue?

serguitus’s picture

I dont know if changing project queue is correct according to drupal.org forum organization rules. I guess that creating a new issue on uuid with a reference to this its better. does this acomplishes with drupal.org rules? I would love other opinions.

serguitus’s picture

Title: Broken/missing handler (Broken handler profile.table) » Broken/missing handler (Broken handler profile.table) on relationships of views after uuid instalation
Project: Profile 2 » Universally Unique IDentifier
Version: 7.x-1.2 » 7.x-1.0-alpha3

Well, after a day with no activity I will take kyleoliveira´s suggestion of changing project queue and watch for uuid devs response. Also changing title for their information

kyleoliveira’s picture

Title: Broken/missing handler (Broken handler profile.table) on relationships of views after uuid instalation » Broken/missing handler (Broken handler profile.table) on Views relationships after UUID module installation

*Minor title fix*

muka’s picture

I have the same problem. The user relation on a profile2 base table not available anymore, breaking the view.

nhepner1’s picture

I've run into this issue as well. I confirmed that UUID was the culprit, by disabling it, and my views entity handlers were restored.

I updated UUID to 7.x-1.x-dev and am no longer experiencing this issue.

minoroffense’s picture

It is definitely UUID. Just had this problem. Uninstalling UUID fixed everything.

Leeteq’s picture

Version: 7.x-1.0-alpha3 » 7.x-1.x-dev
Issue summary: View changes

Status update, please;
- can anyone confirm if this works or is still a problem if using the currently (2014...) latest -dev version of UUID along with latest versions of Profile2 and Views? (@nhephner1 states that the problem might be gone with the latest -dev?)

raulmuroc’s picture

To me is happening but only in user admin. (with latest -dev)