Causing the pager to silently fail when the parent form doesn't validate.

Attached patch fixes this.

Comments

bojanz’s picture

Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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

leksat’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new595 bytes

If node form has several Entity Reference View Widget fields, pager does not work. This happens only if "#limit_validation_errors" is set.

The reason is that "#value" of a button form element is not set, and Drupal automatically sets it to empty string. Then, as we have several buttons on the form, Drupal does not know which handler should be executed. See http://stackoverflow.com/a/13025563/580371 for details.

Attached patch solves the problem.

m42’s picture

I just encoutered the pager issue, and I confirm entityreference_view_widget-pager_validation.patch fixed it.

+1 for a commit !

bojanz’s picture

Issue summary: View changes
Status: Needs review » Fixed

Committed, thanks!

Also, checkout the 2.x branch, the 1.x one is dead ;)

Status: Fixed » Closed (fixed)

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