I only have one Project defined. When I create a new Case it assigns the correct pid to the case. If I edit that Case, the edit completes, but the pid is now messed up in the database. Thus when I try to edit the Case again it fails with "An illegal choice has been detected. Please contact the site administrator.". The problem is that pid is now set to something weird. My projects table has:

mysql> select * from casetracker_project;
+----------------+-----+-----+
| project_number | nid | vid |
+----------------+-----+-----+
| 300 | 10 | 13 |
+----------------+-----+-----+

and after an edit my cases table has:

mysql> select * from casetracker_case;
+-----+-----+-----+-------------+-----------+------------------+--------------+----------------+
| nid | vid | pid | case_number | assign_to | case_priority_id | case_type_id | case_status_id |
+-----+-----+-----+-------------+-----------+------------------+--------------+----------------+
| 48 | 71 | 10 | 6 | 2 | 1 | 12 | 6 |
| 72 | 102 | 10 | 15 | 2 | 2 | 11 | 6 |
| 71 | 101 | 10 | 14 | 3 | 3 | 11 | 6 |
| 56 | 83 | 10 | 13 | 3 | 2 | 11 | 6 |
| 56 | 82 | 10 | 13 | 2 | 2 | 11 | 6 |
| 53 | 79 | 10 | 10 | 3 | 1 | 12 | 6 |
| 48 | 78 | 101 | 6 | 3 | 1 | 12 | 6 |
| 49 | 77 | 10 | 7 | 3 | 1 | 12 | 6 |

Where did 101 come from???

Is pid being used in some other form element and the form processing getting screwed up?
I note that Menu elements refer to pid:

Parent item: Navigation-- Content (disabled)..........

and one of the menus in that pulldown does have the value 101 (although it is not the default value so I don't know why it would be selected).

I need a fix ASAP as casetracker is unuseable at my site! Can someone help?

Thanks,

-Bob

Comments

hsfdrupal’s picture

Status: Active » Closed (duplicate)

Oops, this seems to be a duplicate of http://drupal.org/node/108850, so I'm closing it.
My problem does appear to be an interaction between url aliases, pathauto, and the pid
field.

Can I suggest the Drupal project come up with field/form namming policies to avoid this
kind of silly error?