Notice: Undefined index: field_multiple_limit em field_multiple_limit_field_attach_view_alter() (linha 67 de /www/mysite/sites/all/modules/field_multiple_limit/field_multiple_limit.module).

Just to let you know.

Comments

wroxbox’s picture

I think it's fairly easy fix

/**
 * Implements hook_field_attach_view_alter().
 */
function field_multiple_limit_field_attach_view_alter(&$output, $context) {

//line: 67:
if (isset($info['field_multiple_limit'])) {
  $limit = $info['field_multiple_limit'];
} else {
  $limit = FIELD_MULTIPLE_LIMIT_ALL;
}
Fidelix’s picture

Status: Active » Patch (to be ported)

Thanks, wroxbox.
This seems to fix the problem...

Anonymous’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

I changed line 67 in the new 4 lines, the error is gone

recidive’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Status: Reviewed & tested by the community » Active

Could someone submit a patch for this? I'd love to commit it. Thanks!

scottrouse’s picture

Status: Active » Needs review
StatusFileSize
new908 bytes

Patch attached from notes in #1.

recidive’s picture

Hi, thanks for the patch. This could be written as this:

$limit = empty($info['field_multiple_limit']) ? FIELD_MULTIPLE_LIMIT_ALL : $info['field_multiple_limit'];

@scottrouse: could you update the patch and test this for us?

scottrouse’s picture

StatusFileSize
new864 bytes

You're welcome. Here is an updated version of the patch reflecting your requested change. I tested it and am no longer seeing the PHP notice.

Fidelix’s picture

Status: Needs review » Reviewed & tested by the community

Worked here too...

Marc-Antoine’s picture

Status: Reviewed & tested by the community » Patch (to be ported)

The patch worked also for me, it would be nice to commit it, thanks alot ppl!

scottrouse’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

I believe the status needs to stay RTBC until it gets committed.

TimelessDomain’s picture

patch works for me as well. thanks

Chaulky’s picture

Worked for me as well.

Noticing there haven't been any commits in quite some time (though there hasn't been much need). I'd be willing to be a co-maintainer if recidive is looking for one.

r2integrated’s picture

Patch works +1

Also, thanks for this highly useful module =)

sw3b’s picture

Thanks and good work !

Chaulky’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-1.x

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

correcting

  • Commit 7faa05f on 7.x-1.x, 8.x-1.x, 8.x-1.x-reimplement-extra-settings by Chaulky:
    Issue #1316476 by scottrouse: Fixed Undefined index on view