We have developed an extension of sorts and I noticed a strange issue with it. Our extension takes the users current view's items and does something to all of them. However, when the item count becomes larger (a few thousand), the item count doesn't seem to match the source view's count. Investigating further, I found out that random(!) amount of the itemid's returned are duplicates of each other.
I've tried to narrow the problem, but can't place it anywhere else than for this app, the returned itemids from the API include the duplicates. This happens in two apps - both our production version and my test environment which are clones of each other. Then I made another test environment with simpler item structure (only two fields, id and a category to filter on).. and ta-dah, the same PHP code here works correctly, no duplicate itemids!
Has anyone seen this kind of behavior? What could cause this?
Here is output from my testcode, when I repeatedly run this for the same "last view":
Count of items:4881 count of unique: 3932
Count of items:4881 count of unique: 4806
Count of items:4881 count of unique: 4762
I could consider pastebinning my code, but since the same code works towards another app, it seems unlikely.
Please sign in to leave a comment.