I could not get Paperpile to format citations where there is only an editor, no author, with my own CSL , so I checked with the standard APA 6th edition CSL and the problem remains.
Book, no authors, one editor.
Editor’s name in field as Surname, Firstname.
Citation style: American Psychological Association, 6th edition.
If I use the quick ‘Cite’ button in Paperpile, this is copied to the clipboard in the following format, as expected:
Insoll, T. (Ed.). (2007). The archaeology of identities : a reader. London: Routledge.
When I am creating a document in Google Docs and use CTRL-ALT-P to insert this item as an inline citation it gives:
(Insoll 2007)
But when I use ‘Format citations’ in the Paperpile menu this is changed to:
(Timothy Insoll, 2007)
and the reference is formatted as:
Timothy Insoll. (2007). The archaeology of identities : a reader. London: Routledge.
When they should be:
(Insoll, 2007)
Insoll, T. (Ed.). (2007). The archaeology of identities : a reader. London: Routledge.
Let me know if you need any more information needed.
If you click ‘cite’ in Paperpile the citation is formatted under the assumption that this is the only item in your bibliography so there is never disambiguation going on if you just have selected one item.
If you cite multiple papers in one Google Doc with the same author APA will disambiguate.
It could be totally unrelated and if you really only have one item with the author Insoll in your library it might be something different.
You are on the right track. The same processing that is applied to the author variable, needs to be applied to the editor variable. The CSL file needs to edited this way:
By my reading of the specification the substituted element inherits the earlier name attribute values (see [here][1]):
“A shorthand version of [cs:names] without child elements, which inherits the attributes values set on the [cs:name] and [cs:et-al] child elements of the original [cs:names] element, may also be used.”
I understand that to mean that this is a simple and straightforward way of applying the the same values whether it is an author or editor.
I am testing with the APA 6th ed CSL and that has the simple layout as above and Zotero interprets that correctly (i.e. in line with my understanding of the specification) in formatting both inline ciation and the reference, whereas Paperpile does not.
I also talked to the Zotero developers and the error seems to be in the CSL processing engine citeproc.js used by both Zotero and Paperpile. I am currently looking into the requirements to update it to a new version.