Forum OpenACS Development: Response to sort_key is supposed to be a natural number... but it is getting passed a 1.00000...

Look at the tcl code again to see how the sort key is generated.  In the case of the ecommerce packge, the sort keys are "numeric".  When inserting something between two existing keys, the midpoint of the two adjacent keys is used to calculate the new sort key.  If your package uses the same calculation, you need to keep the column as numeric.  The error looks like it came from ad_page_contract and it's most likely because the page contract specifies that sort_key is an integer.  Just change that to float and it should work.

FYI, slides.sort_key is probably from a multirow datasource.  "slides" is the datasource setup by db_multirow and "sort_key" is the column.  Check for db_multirow.