Hllo after upgrading to the 7.x.3.0-rc1 i found a message appearing on the top of my views list. It wont go even after cleaning the cache :

Notice: Undefined index: profile2 in field_views_field_default_views_data() (line 222 of /home/webimmo/public_html/sites/all/modules/views/modules/field.views.inc).

How can i solve that ?

Thanks

Comments

merlinofchaos’s picture

profile2 is a module. I suggest you start with the profile2 module.

janicak’s picture

Hello. I received the same error message, along with another:

Notice: Undefined index: user in field_views_field_default_views_data() (line 222 of /home/darkener/public_html/ad7/sites/all/modules/views/modules/field.views.inc).

Disabling profile2 got rid of the profile2 error, but had no effect on the above. This error appears on the top of the module list and on a views edit page with user fields.

yazzou’s picture

I need profile2 for my site, i was thinking of reverting back to th previous version of profile2 make my site working again, or hide notices...altering php.ini file, until a olution is found.

yazzou’s picture

I have reverted back to old profile2 version and cleaned the cache nothing changed

yazzou’s picture

I have commented the line 222 and the notice is gone...i would be very greateful if somebody finds a real solution for that.

 if ($group_name != $groups[$entity_name] && $label != $label_name) {
            $aliases[] = array(
              //'base' => $revision_tables[$entity_name], 

dawehner’s picture

Project: Views (for Drupal 7) » Profile 2
Version: 7.x-3.0-rc1 » 7.x-1.x-dev
Component: Views Data » Code

Let's move this issue to profile2, because this could be a bug of profile2.

If views assumes something here please move it back.

seaneffel’s picture

Project: Profile 2 » Views (for Drupal 7)
Version: 7.x-1.x-dev » 7.x-3.0-rc1

Strongly disagree. I have the same error but have never used Profile2. In fact, the only contrib modules running on my test site is Views 7.x-3.0-RC1.

Notice: Undefined index: user in field_views_field_default_views_data() (line 222 of /home/cedncsu/public_html/drupal2/sites/all/modules/views/modules/field.views.inc).

jastraat’s picture

This is the same issue as #1194062 - which is completely unrelated to profile2

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new761 bytes

I think i understand the problem, but sadly noone explained how to reproduce the problem.

Some entity types don't have revisions, so check it.

Stolinski’s picture

I am also getting this error after upgrading to 7.x-3.0-rc1 and I am not using profile2

neoglez’s picture

@Scott_Tski Would you try the patch #9 ??

seaneffel’s picture

I can upload a copy of my db so you can see the error. There is nothing sensitive in there, just a vanilla D7.2 and Views RC1 and some test content. Let me know if that is helpful.

jastraat’s picture

I tried the patch, and I'm no longer getting the error.

00trav’s picture

Tried patch in #9 and it seems to work. error gone and not negative consequences (that i have noticed).

neoglez’s picture

Status: Needs review » Reviewed & tested by the community

This deserve RTBC.

JGO’s picture

Patch #9 seems to work for me too

smk-ka’s picture

+1, patch is working fine.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

One problem is that i never was able to reproduce this bug, and people don't tell how to do so.

Fortunately many people tryed out the patch so commited to 7.x-3.x

rickdrup’s picture

Status: Fixed » Reviewed & tested by the community

Had a slightly different error 'Notice: Undefined index: comment in field_views_field_default_views_data() (line 222 of ...' Applied patch, error gone, no problems so far.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

Update status

Status: Fixed » Closed (fixed)

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

yousername’s picture

+1
Patch #9 works for me too.
Thank you!

Any idea whether it's going to be committed to the next release of the module?

abeger’s picture

Thanks! This has been bugging the heck out of me!

celiakyle’s picture

Um, not to sound like an idiot, but where do I past this within field.view.inc?

I know the issue surrounds line 222, but I have no idea what to overwrite or if I should just drop it at the end of the file.

Help?

00trav’s picture

You have to apply the patch to the module code.
The process will vary depending on what operating system you are using and whether you are using Git.

for instance on most Linux system you can use the 'patch' command from the command line. So you would download the patch to the module base directory, then navigate there via command line and execute "patch -p1 < 1192666-field-entity_type-no-revision.patch "

See here for more info: http://drupal.org/patch
The comments have links to some documentation specific to Windows.

MatthijsG’s picture

Patch #9 worked for me, tnx

Problem appeared with module Date 7.x-2.x-dev

MatthijsG’s picture

@ 24
This patch has only 1 line. Look for the line where - stands before and replace it with the + line. Very basic, but in this case it's only one line ;-)

shaneonabike’s picture

Status: Closed (fixed) » Active

Has this issue been resolved I'm also receiving this problem

Undefined index: user in field_views_field_default_views_data() (line 222 of /snipped/all/modules/views/modules/field.views.inc
dawehner’s picture

Status: Active » Closed (fixed)

Update status as this is already fixed in the dev version since quite some time.

ygerasimov’s picture

In my case similar error

Notice: Undefined index: user in field_views_field_default_views_data() (line 225 of /srv/www/project/sites/all/modules/contrib/views/modules/field.views.inc).

appeared after I added organic group reference field to the node. But of course patch #9 solves the issue. Thanks!

jdlind38’s picture

Thanks for the patch. #9 worked for me