There's a lot of small cleanups that can be made in both the patterns and settings pages.

1. Make the 'validate tokens in the patterns field' an element validation callback and also check when the page is loaded, not just when submitted.
2. As per the Drupal UX standards, on the settings page we should put all the 'General settings' into the root of the form and get rid of that fieldset. The Punctuation can stay its own collapsed fieldset.
3. Cleaned up handling missing path_redirect or transliteration modules with regards to their respective options.
4. Added a 'numeric field' element validator for fields like maximum component and maximum alias length. Currently users can enter in non-numeric values and we should be erroring on that.
5. Take advantage of system_settings_form and not needing to call variable_get() on every #default_value. Also change _pathauto_include() to module_load_include('inc', 'pathauto') wherever possible when we don't need to load all the node/taxonomy/user code.

CommentFileSizeAuthor
#1 743652-pathauto-form-cleanup-D7.patch20.96 KBdave reid

Comments

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new20.96 KB

Patch for quick review with some tests for the validation.

dave reid’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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