When attempting to clone a default view from the Node Relationships module, I received a form API error after clicking the first 'Next' button of the clone workflow. The error is:

View description cannot be longer than 128 characters but is currently 225 characters long.

This is due to the fact that the form API field definition for the view description when using the Views UI does not specify a maxlength parameter which means that the default of 128 will be used. However the max length of the description field in the views_view table is varchar(255). Since the view that I was trying to clone from Node Relationships comes from a views default view in code and not via the UI, the description of this view with length of 225 characters populates the description form field during the clone attempt but since maxlength is using a default value, the form submit for the clone step trips the form API validation error.

This looks to be a simple fix of just adding a maxlength of 255 to the relevant form field. This was discovered in Views 6.x-2.11 but it's the case in views 3 as well. Hope this patch resolves the issue.

CommentFileSizeAuthor
admin.inc_.patch695 bytesjaydub
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed to all branches.

Status: Fixed » Closed (fixed)

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