I've downloaded the dev version of efq_views and enabled it with drush. After that, running drush cc all gives (numerous times) the warning mentioned above.
line 188:
foreach ($field['columns'] as $column => $attributes) {
I also get similar warning regarding line 16, once.
line 16:
foreach (field_info_instances($entity_type) as $bundle => $field_data) {
Finally, when browsing interactively, I also get:
"Notice: Undefined offset: 1 in _efq_views_get_field_handlers() (line 181 of /home/joe/new_full_planetary/drupal_planetary/sites/all/modules/efq_views/efq_views.views.inc)."
if (isset($views_data['real field'])) {
list($field_name, $column) = explode(':', $views_data['real field']);
}
and
"Notice: Undefined variable: return in _efq_views_copy_data() (line 55 of /home/joe/new_full_planetary/drupal_planetary/sites/all/modules/efq_views/efq_views.views.inc)."
function _efq_views_copy_data(&$data, &$entity_type, $key, $entity_data) {
if (substr($key, 0, 7) == 'entity_') {
$return = TRUE;
$entity_type = substr($key, 7);
}
elseif (substr($key, 0, 13) == 'views_entity_') {
$return = FALSE;
$entity_type = substr($key, 13);
}
if (!isset($data['efq_' . $entity_type])) {
$data['efq_' . $entity_type] = array();
}
$data['efq_' . $entity_type] += $entity_data;
return $return;
}
I'm using the latest OG and efq_views. Let me know if I can provide any further useful info!
Comment | File | Size | Author |
---|---|---|---|
#11 | efq_views-undefined_vars-1732942-11.patch | 1.02 KB | joekrukosky |
#1 | efq_views-undefined_vars-1732942.patch | 1.02 KB | attekilpela |
Comments
Comment #0.0
holtzermann17 CreditAttribution: holtzermann17 commentednot a comment line after all
Comment #0.1
holtzermann17 CreditAttribution: holtzermann17 commentedadditional notice
Comment #0.2
holtzermann17 CreditAttribution: holtzermann17 commentedcontext
Comment #1
attekilpela CreditAttribution: attekilpela commentedThis patch should suppress the errors.
It's tested with 7.x-1.x-dev from 2012-Aug-14.
Comment #2
jaydub CreditAttribution: jaydub commentedComment #3
marcingy CreditAttribution: marcingy commentedThe patch returning false in the first line of the function is simply masking issues not fixing the bug.
Comment #4
holtzermann17 CreditAttribution: holtzermann17 commentedPrinting out the $key and the $entity_type reveals that the only two keys on my installation that don't have a suitable $entity_type defined after this...
...are og_membership_type and og_membership. That suggests a bug with the OG code. Regarding the patch in #1, it does work to suppress the warnings, and, given the above result, I don't think it merely masks issues. However, I would suggest removing the
from the original code (above), since when you've put that at the beginning of the function, you don't need to do it again.
Comment #5
attekilpela CreditAttribution: attekilpela commented$return = FALSE at top of the function is there just to make sure that $return isn't returned as undefined variable in any possible case.
I have used this patch for the last week and had zero problems.
Comment #6
majorrobot CreditAttribution: majorrobot commentedI can confirm that this seems to have fixed the issue.
Comment #7
Jorrit CreditAttribution: Jorrit commentedThis part of the patch is wrong:
strpos()
never returns boolean TRUE. It returns boolean FALSE or an integer. The change should be:Comment #8
Jorrit CreditAttribution: Jorrit commentedBy the way, I think these bugs no longer exist in 7.x-1.x.
Comment #9
chx CreditAttribution: chx commentedReopen if it reoccurs then. Thanks.
Comment #11
joekrukoskyUpdated attekilpela's patch with Jorrit's change for simplicity.
Comment #12
chx CreditAttribution: chx commented#11, #8 says these bugs are gone. Why do you need a patch?
Comment #13
joekrukoskyI was still having the issue until I applied the patch to the dev version (7.x-1.0-alpha3+13-dev). Since I modified the patch with #7, I thought I'd post it.
Comment #14
chx CreditAttribution: chx commentedOh. OK, I will reinvestigate then.
Comment #15
Andre-BBackup and Migrate 7.x-2.7 and Entity API 7.x-1.1 is probably causing this for me (from a look at debug_backtrace())
Comment #15.0
Andre-Banother notice
Comment #16
mihai_brb CreditAttribution: mihai_brb commentedI'm still getting this error, using 7.x-1.0-alpha5
Notice: Undefined offset: 1 in _efq_views_get_field_handlers() (line 194 ...
Not sure what is the status of this ...
Thanks,
Mihai
Comment #17
Stephen Rockwell CreditAttribution: Stephen Rockwell commentedI've got the same issue and curious about status as well.
Comment #18
chx CreditAttribution: chx commentedEveryone: file a new issue with the exact error message you are getting. This issue became the dreaded "hey I have an error message let's post it here" issue. Stop doing this. #16 for example posted half an error message which says "Notice: Undefined offset: 1" in an issue titled "Invalid argument supplied". So #17 is now can't be evaluated as to what "same issue" it tries to report. So I am closing this down in hope of better bug reports.