-
Notifications
You must be signed in to change notification settings - Fork 16
Description
I am referring to the "Response too long" error message, which is bugging quite a few people (me included). This is the piece of code that is raising the error:
If (CLng(resultLength) > 65535) Then
MsgBox "Error: Response too long." + Chr(10) + Chr(10) + "Please don't cite so many references in one citation."
End If
https://github.com/Mendeley/openoffice-plugin/blob/master/src/mendeleyMain.vb#L178
In the corresponding support ticket, a Mendeley employee stated that this check is necessary because LibreOffice has a limit on the number of characters that can be stored in a field.
When he talks about "fields", I guess he means the fields that are created for every citation (or "citation-cluster"). So the above limit check should be called separately for every citation field. As it turns out, the data for ALL citation fields is requested at once from the Mendeley API (when MendeleyDesktopAPI.formatCitationsAndBibliography() is called). Because of that, the above if-statement doesn't check if single fields exceed the limit but checks whether all fields together would have more than 65535 characters. Which wouldn't make sense...
This is what I found out after some quick debugging (btw. thanks for the build script, which made it easy to get started!). I haven't fully grasped the whole code and I am not sure what would be the right fix. But maybe this hint helps.