Darkroom is sometimes return the wrong number of crops, even when they have been successfully modified. I ran into this on the Times+ CMS, when I was trying to fix PT 1987 and implement a way to send only the modified crop to darkroom instead of all of them.
if (_.size(crops) !== numberOfCropsActual) {
console.log('crops length:', _.size(crops))
console.log(this.get('crops'), numberOfCropsActual)
this.trigger('cropsFailed')
}
http://git.io/RtTseQ
Sometimes Darkroom is returning the correct amount of crops, and sometimes it is not, which triggers the cropsFailed event. However, the crops are still persisted in the model, and still save properly when you save an article.
Darkroom is sometimes return the wrong number of crops, even when they have been successfully modified. I ran into this on the Times+ CMS, when I was trying to fix PT 1987 and implement a way to send only the modified crop to darkroom instead of all of them.
http://git.io/RtTseQ
Sometimes Darkroom is returning the correct amount of crops, and sometimes it is not, which triggers the
cropsFailedevent. However, the crops are still persisted in the model, and still save properly when you save an article.