I have a test server with 130+ sites installed across half a dozen platforms. The page displaying the sites runs to 6 continuations as only 25 sites are displayed on each viewing. Only one of my platforms has more than 25 sites so if I select any of the the other platforms, all its sites display on a single page.

If I select all the sites on one of these platforms, and chose the "verify" task and click the "Add to queue" button, then the response is an error message:

An illegal choice has been detected. Please contact the site administrator.



This error mesaage is generated by Drupal field validation when it detects that a returned value is not one of the ones that was originally present in the select field.

It would appear that the reason this is happening is that when the data is posted back to Drupal, and Drupal regenerates the original form internally so it can perform validation and submission processing, it is regenerating the form without passing the original filter criteria to the form build function for the "hosting_site_list_form". Consequently this version of the form is being built to list just the first 25 sites in the full site listing, and any sites in list positions 26 to 130+ are not "valid choices" when the validation functions run.

This is confirmed by the fact that I can choose all 25 sites in the first page with the result ath 25 verify tasks are added to the queue, but any site on subsequent pages generates and "illegal choice" error. Additionally, If I select the sites on a particular platform, then I can add verify tasks for all sites on that platform that fall within the first 25, but if any that fall in positions 26 onwards are selected, then the "illegal choice" error is given.

Note: I have just upgraded to Hostmaster v1.9 and the problem still exists.

Comments

steven jones’s picture

Status: Active » Fixed

We needed to pass more of the filters along, I've done so in 6.x-2.x.

Status: Fixed » Closed (fixed)

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

anarcat’s picture

Version: 6.x-1.9 » 6.x-2.x-dev
maciej lukianski’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev
Status: Closed (fixed) » Active

This is stil an actual bug for 1.x. Could you point me to the solution/commit/code in 2.x which solves the issue?

maciej lukianski’s picture

Status: Active » Closed (fixed)

Ok, nevermind. I increased sites per page on line 517 of /profiles/hostmaster/modules/hosting/site/hosting_site.module to include all of my sites on one page which is much more convinient than pager anyway (unless you really have hundreds)

Turning it back to fixed.

  • Commit 5d28ac7 on 6.x-2.x, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x by Steven Jones:
    Issue #1591720 by Steven Jones: Fixed Illegal choice when selecting...

  • Commit 5d28ac7 on 6.x-2.x, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-588728-views-integration, dev-1403208-new_roles, dev-helmo-3.x by Steven Jones:
    Issue #1591720 by Steven Jones: Fixed Illegal choice when selecting...