What are you using for barcodes? Are you using the auto generated barcodes?
I’m making my own barcodes, but I also tried letting it do an auto-generated barcode too. Neither is working.
I just did another test. I can add the book “Beekeeping For Dummies” (we’re a beekeeping club) but I can’t add the book “Swarm Traps and Bait Hives” by McCartney Taylor. I did both books the same way. Even added and deleted the “For Dummies” book 3 times testing various barcodes and all 3 worked. The “Swarm Traps” book won’t stick. Same problem with a few other books and DVDs.
The only thing I can think of that cause this is that somehow there are duplicate barcodes, and a new item is overwriting an old one, thus making the old one ‘disappear’. There was an old bug with the bar code incrementer that was recycling barcodes that was causing problems, but that bug has long been fixed.
Is there any sort of pattern to the ‘disappearing’ items? Are you able to create a 43rd item? Or when you create the 43rd item does one of the other items disappear? Or does the 43rd item disappear?
No items are disappearing. I can add a 43rd item with a different book. The only pattern I’m seeing is it seems to be having difficulty with certain books and DVDs. No errors are generated. It says they are added, but they aren’t in the database.
The plugin does do some ‘sanity checks’, making sure there is correct information in certain fields — maybe something is screwy there. Maybe there is a field that is wrong and it is not reporting the error, but not inserting the item either. You can try setting the Debug Database flag to ON, maybe that will show what is happening.
Debug Database is on. How do I see the debugger?
I think I found the error. When I manually enter the info instead of using the Amazon insert it seems to work. I noticed that the Publisher name is too long for the field. It looks like that field is limited to 36 characters. Instead of truncating it just doesn’t add it, but doesn’t return an error either.
OK, it *sounds* like there is something about some of the items that are failing to be added — some fields are being passed the sanity checks, but the low-level database insert code is failing for some reason.
There is some debugging code in the low-level database insert code (includes/database.php starting at line 831 — function store() in class WEBLIB_ItemInCollection). The code is commented out — the lines start line this: “//file_put_contents(“, you can edit this file and remove the “//”s. Debugging messages will go to the Apache error log file (you might need to talk to your server admin about getting access to that file). This might tell us what is going on.
With Debug Database on, it just display database errors — they should just show up (in red).
Yes, the fields have limited sizes (publisher is 36 characters). The sanity checks just check for empty fields, but not for over long fields, but the insert function is failing with a DB error, which is not being handled.
OK, I’ve updated the code to truncate over long fields.