Comparison method violates it's general conctract error.

ssuh's Avatar

ssuh

03 Mar, 2016 05:09 PM

We're getting a comparison error on an index block page.

Is there a limit on how many items can be sorted with the sortTool?

  1. Support Staff 1 Posted by Tim on 03 Mar, 2016 05:18 PM

    Tim's Avatar

    Hi,

    It's interesting that you posted this as I'm currently working with another client on the exact same error. Initially I thought this might be due to some bad data with one of the items being sorted, but I won't rule out some sort of limit on the number of items at this point. Do you happen to know if the number of items you're attempting to sort is up near or above 250?

  2. 2 Posted by ssuh on 03 Mar, 2016 06:05 PM

    ssuh's Avatar

    In the folder is 129 items. The 130th one seems to trigger it.

  3. Support Staff 3 Posted by Tim on 03 Mar, 2016 06:51 PM

    Tim's Avatar

    Thanks for the info. That seems to go along with my suspicion about it being related to potentially bad data somewhere, but I'm still not certain at the moment. Since I have the other client's database on hand, we'll troubleshoot that locally and I can report back on here once I've had the chance to do so. Since it's the same error, I would hope that the underlying problem might be similar.

  4. Support Staff 4 Posted by Tim on 04 Mar, 2016 06:52 PM

    Tim's Avatar

    When you have a moment, can you temporarily try changing the 3rd line of your Format such that the XPath statement looks like:

    //system-index-block/system-page[start-date]
    
    Then, let me know if you still see this error.

    Thanks

  5. 5 Posted by ssuh on 04 Mar, 2016 06:56 PM

    ssuh's Avatar

    That fixed it! Thanks!

  6. Support Staff 6 Posted by Tim on 04 Mar, 2016 06:59 PM

    Tim's Avatar

    Awesome. So basically the issue here is that some of the assets you're sorting don't have a start-date to sort on. Adding that predicate to your XPath statement ensures that the resulting node set only contains 'valid' assets (ones that do have a start date).

    If you need to figure out which assets are 'bad', you can write a quick Format to list the <link> of any system-pages without a start-date by using this XPath statement:

    //system-index-block/system-page[not(start-date)]
    
    Have a good one!
  7. Tim closed this discussion on 04 Mar, 2016 06:59 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM