When I go to the translate page of a node I get the following error
Notice: Undefined index: #node in maxlength_form_alter() (line 188 of /home/vrijlab/domains/fablabamersfoort.nl/public_html/beta/sites/all/modules/maxlength/maxlength.module).
Notice: Trying to get property of non-object in maxlength_form_alter() (line 188 of /home/vrijlab/domains/fablabamersfoort.nl/public_html/beta/sites/all/modules/maxlength/maxlength.module).
Line 188 contains:
if (strpos($form_id, '_node_form') !== FALSE && variable_get('maxlength_js_' . $form['#node']->type, FALSE)) {
It doesn't seem to actually break something. But it does scare people a bit.
Comments
Comment #1
Schnitzel CreditAttribution: Schnitzel commentedfixed, commit e345fed added to the 3.x-dev branch, will be in the next DEV version in a couple of hours.
thanks to vasi1186 for fixing this
Comment #2
radoo CreditAttribution: radoo commentedNotice: Undefined index: #value in maxlength_validate_input() (line 174 of /home/rado/www/first_lady/sites/all/modules/maxlength/maxlength.module).
Line 174 contains:
$value = filter_xss(str_replace(array("\r\n", ' '), array(' ', ' '), $element['#value']), array());
temporarly i add "&& isset($element['#value'])" at line 171
so line 171 became:
if (isset($element['#attributes']['maxlength']) && isset($element['#value'])) { ....
instead of :
if (isset($element['#attributes']['maxlength'])) { ....
I think the source of error is that field type image doesn't have value for maxlength
Wish you bring better solution to fix this
Comment #3
Schnitzel CreditAttribution: Schnitzel commentedComment #4
vasi1186 CreditAttribution: vasi1186 commentedThe patch in this issue: http://drupal.org/node/1416608#comment-5710640 should fix this. It was applied to the 7.x-3.x branch.