Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Simon Hewitt 65 posts 126 karma points
    Mar 20, 2013 @ 13:42
    Simon Hewitt
    0

    Error: Index was out of range.

    Hi,

    I deleted all conditions on a field but left the enable conditions box ticked and saved the form. The form now falls over when I hit the step I made that amendment in, with the error

    Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

    So I added the conditions back into the field but that hasn't fixed the issue, Iv'e tried deleting the field but the sql is blocked due to a foreign key constraints on UFFieldConditionRules to UFFields.

    I can't seem to get any stack trace from this error so I'm a bit stumped as to what to do next (nothing in umbracoLog table or /App_Data/Logs/UmbracoTraceLog.txt and nothing shown with umbDebugShowTrace=true on the page).

    Before I start unpicking my form and removing conditions so I can delete what I assume is the offending field does anyone have any ideas?

     

    Thanks

    Simon

  • Comment author was deleted

    Mar 20, 2013 @ 13:43

    And what happens if you disable the conditions on that field?

  • Simon Hewitt 65 posts 126 karma points
    Mar 20, 2013 @ 13:58
    Simon Hewitt
    0

    Exactly the same error.

    In the DB I seem to have three conditions still against the field but I'm not sure I'm running the right query to find out.

    select * from uffieldconditionrules where fieldcondition = (SELECT id FROM UFFieldConditions where field like 'c207af05%')

    That SQL return three entries which were the original conditions before I deleted them and at the point of running that query there are no conditions and conditions are disabled on the field.

    Thanks for your help

    Simon

  • Comment author was deleted

    Mar 20, 2013 @ 14:23

    Ok will add this to our issue tracker, thanks for reporting

  • Simon Hewitt 65 posts 126 karma points
    Mar 20, 2013 @ 14:30
    Simon Hewitt
    0

    Can you confirm that given a field Id the above SQL will show you associated conditions, I don't want to start deleting things directly out of the database unless I'm sure.

    Many thanks

    Simon

    :edited for spelling

  • Comment author was deleted

    Mar 20, 2013 @ 14:31

    Yup I can confirm that :)

  • Simon Hewitt 65 posts 126 karma points
    Mar 21, 2013 @ 10:10
    Simon Hewitt
    0

    Hi Tim,

    Just to let you know, I've tidied up the DB and its not fixed the issue and I've been unable to replicate the problem on a test form so I think the conditions thing may be a red herring. I'll try and get to the bottom of the issue and let you know anything I find but you can probably remove the issue tracker item for now.

    Thanks

    Simon

  • Comment author was deleted

    Mar 21, 2013 @ 10:38

    Ok thanks Simon, I'll also see if I can reproduce it

Please Sign in or register to post replies

Write your reply to:

Draft