Hello
I'm having the same problem defined by radoo in #1346796: Error inserting image.
However I'm not having imaes in my content type, but I'm working with field collections (Field Collection project) and having the same problem. All my fields executes twice function maxlength_validate_input, and once of those, #value property is not set in the $element.

Then, I provide a simple patch that avoid the error messages displayed by the maxlength module skipping validation when #value property is not set.

Regards

Comments

artis’s picture

I experienced this issue also. I have field collection installed on this site, but not using it on the content type with the error. The field with the maxlength is just a simple textarea. This patch solved the issue for me.

Here is the error that was displaying:

Notice: Undefined index: #value in maxlength_validate_input() (line 174 of /home/www/public_html/sites/all/modules/maxlength/maxlength.module).

adshill’s picture

Status: Active » Needs review

Same error - same problem. Fix worked perfectly. Changing to needs review till it has some more confirmations.

willvincent’s picture

The patch in the original issue does correct this issue, however its format isn't right. (path is wrong)

Here's a rerolled patch with the proper format.

askildolsen’s picture

I can confirm that the fix works

schnitzel’s picture

Assigned: Unassigned » vasi1186

thanks for the issues and patches, assigning to Vasi for checking

vasi1186’s picture

Status: Needs review » Fixed

Looks good, I applied the patch to the dev 7.x-3.x branch.

Status: Fixed » Closed (fixed)

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

daanemanz’s picture

Applied the patch to maxlength.module, but still get the error. Running drupal 7.16 and maxlength 7.x-3.0-beta1.

mvlabat’s picture

Assigned: vasi1186 » Unassigned
Status: Closed (fixed) » Active

I receive this error too, but have also "Subsriptions" module installed. The patch doesn't work for me.

SilviaT’s picture

Same here, running D7.18 with maxlength 7.x-3.0-beta1.
I am not using Field collection though, but I have fieldgroups installed.

jzornig’s picture

Upgrading from the 3.0-beta1 to the current 3.x-dev fixed the issue for me. Perhaps time to roll a beta2?

rudiedirkx’s picture

How about a new release? This bug has been in stable forever and patch from #3 fixes it.

knowledges33ker’s picture

I'm having the same problem. I applied the patch in #3 on a local copy of our project and it fixes the problem. I agree with rudiedirkx in #12. Can we get a new release with the fix implemented?

willvincent’s picture

Status: Active » Reviewed & tested by the community

Updating status to RTBC

  • Commit c6abf87 on 7.x-3.x, 8.x-1.x by vasi1186:
    Applied patch http://drupal.org/node/1416608#comment-5710640 from issue...
frjo’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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