I enabled maxlength so one of my fields could benefit from its use. All of the sudden, all of my features have maxlength settings injected into them when I re-export. IMHO this is a major issue, this module is essentially unusable for major sites where they expect clean settings exports.

Shouldn't it work like this:
1) On edit form, user sees ability to enable the maxlength module for this text area
1a) if that checkbox not checked, no processing is done on that field
2) user checks box, only after that are maxlength hooks added to that field

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joelcollinsdc’s picture

For example, this is the diff of a content type (that i didn't enable maxlength on at all)

Component: field
          'module' => 'text',
          'settings' => array(
>           'maxlength_js_label' => 'Content limited to @limit characters, remaining: <strong>@remaining</strong>',
            'rows' => '3',
          ),
          'module' => 'text',
          'settings' => array(
>           'maxlength_js_label' => 'Content limited to @limit characters, remaining: <strong>@remaining</strong>',
            'rows' => '5',
            'summary_rows' => 5,
          'module' => 'text',
          'settings' => array(
>           'maxlength_js_label' => 'Content limited to @limit characters, remaining: <strong>@remaining</strong>',
            'rows' => '3',
          ),
              'upload' => 'upload',
            ),
>           'maxlength_js_label' => 'Content limited to @limit characters, remaining: <strong>@remaining</strong>',
            'progress_indicator' => 'throbber',
          ),
joelcollinsdc’s picture

Issue summary: View changes

being less of a jerk

slv_’s picture

Issue summary: View changes
Priority: Normal » Major
Status: Active » Needs review
Parent issue: » #1867566: Maxlength settings added to fields where it isn't enabled
FileSize
1.83 KB

Patch attached. That should fix the issue.

joelcollinsdc’s picture

Assigned: Unassigned » joelcollinsdc

Thanks!

lpalgarvio’s picture

how is this coming along?

lpalgarvio’s picture

Status: Needs review » Reviewed & tested by the community

I've tested it and it works fine. May be ready for commit and roll out on new release

lpalgarvio’s picture

still no issues so far. please commit

B-Prod’s picture

Patch in #2 fixes the issue, commit would be welcome.

  • frjo committed 23aadc8 on 7.x-3.x authored by slv_
    Issue #1867566 by slv_ | joelcollinsdc: Fixed Maxlength settings added...
frjo’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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