matethurzo/liferay-portal — pull request #205 by danielreuther (2012-06-27 09:09:31+00:00)
Title: [TECH SUPPORT] LPS-28105

Hi Máté,

I've spent quite some time to figure out the possible approaches to this. I think Riccardo's first commit should be clear enough—we were just not catching the title exception which is why the import process failed completely in case it was thrown.

My second commit however is only one of a felt thousand possiblities to handle this. So, when the title map is created, there is a chance that the default locale is not an available locale. In this case, it would not be part of the array and the map could potentially be empty. I think we should consider those cases when creating the map.

Another approach I came up with was a sanitizing of the artlicles during import (changing their default locale to something that is in fact available), but I didn't like that solution too much.

Just let me know if you have any questions...

Thanks,
Daniel