Problem/Motivation

When navigating to an interger field's administration settings, users are presented with a Views Natural Sort Enable option. Once enabled, a notice is shown because there are no items to run through "rebuild".

Proposed resolution

Remove the Views Natural Sort Enable option from Integer fields as Natural Sorting is not necessary for the Integer field type.

Original Report

I'm getting this error enabling VNS to an integer field:

Notice: Undefined index: entries in views_natural_sort_rebuild_index_finished() (line 186 of /sites/all/modules/views_natural_sort/views_natural_sort.admin.inc).

What could the issue please?

Comments

knalstaaf created an issue. See original summary.

generalredneck’s picture

Issue summary: View changes

Integer fields have no need for Natural Sorting because they already sort naturally... that is to say that they sort 1, 2, 10, instead of 1, 10, 2.

WIth that said, you have found a bug in the administration interface that is showing the option on a field that isn't supported. So when rebuild tries to happen this field is weeded out of the list because it isn't supported.

So your correct course of action would be to use the typical ASC and DESC in views.

  • generalredneck committed d0af9ce on 7.x-2.x
    Issue #2707113 by knalstaaf, generalredneck: Notice: Undefined index:...
generalredneck’s picture

Status: Active » Fixed

  • generalredneck committed d0af9ce on 8.x-2.x
    Issue #2707113 by knalstaaf, generalredneck: Notice: Undefined index:...

Status: Fixed » Closed (fixed)

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