Related items only point one way in the web API:s

67 views
Skip to first unread message

Lennart Borgman

unread,
Feb 5, 2014, 1:53:08 AM2/5/14
to zoter...@googlegroups.com
Dear Zotero,

I have added "related" to many items in our group library. In the desktop interface they points in both directions, i.e. if I add B as related to A:

A => B

I also get the reverse, A is related to B:

B => A

However when retrieving the items through the web API the reverse relation is not found. 

Lennart Borgman

unread,
Feb 11, 2014, 8:22:40 PM2/11/14
to zoter...@googlegroups.com
I get a bit confused here. I was told to report this error here. Or, did I perhaps misunderstand?

Where can I find the code handling this?

fcheslack

unread,
Feb 12, 2014, 8:34:42 AM2/12/14
to zoter...@googlegroups.com
You were told to post about it here, but this is not an error. It's a difference between what shows up on the back end and what gets shown to the user in the client. It's impossible to always put relations on both items because the user creating this relation may only have permission to modify one of the items, so currently the relation is added to the item in a personal library, or the group item that is being created.


--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at http://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Lennart Borgman

unread,
Feb 12, 2014, 9:00:14 AM2/12/14
to zoter...@googlegroups.com
Thanks fcheslack, but I think it definitively is a bug. Of course the restrictions you mentions make it impossible to link both ways sometimes, but that is not what I am talking about here.

In cases I see here the standalone desktop Zotero says the relation is both ways, but the web API does not. One of them is wrong.

BTW, is there a bug database somewhere?

PS: And where is the web API code?




--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/Pj2oVavaYvo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.

Lennart Borgman

unread,
Mar 20, 2014, 7:55:10 PM3/20/14
to zoter...@googlegroups.com
Any new thoughts about this problem? I can't even find a workaround here. And I can't either suggest a solution since the code of the server database och web server is not free.

It is becoming more acute now since I have setup a new web interface (using Zotero web API) for looking at the entries. For example on this entry there are 4 related items, but you can't see any of them on the web:

https://www.zotero.org/groups/from_some_psychologists/items/itemKey/CGDKMIM6

I sincerely do not care if this is considered a bug or not. It just does not work!




On Wednesday, February 12, 2014 3:00:14 PM UTC+1, Lennart Borgman wrote:
Thanks fcheslack, but I think it definitively is a bug. Of course the restrictions you mentions make it impossible to link both ways sometimes, but that is not what I am talking about here.

In cases I see here the standalone desktop Zotero says the relation is both ways, but the web API does not. One of them is wrong.

BTW, is there a bug database somewhere?

PS: And where is the web API code?


On Wed, Feb 12, 2014 at 2:34 PM, fcheslack <fche...@gmail.com> wrote:
You were told to post about it here, but this is not an error. It's a difference between what shows up on the back end and what gets shown to the user in the client. It's impossible to always put relations on both items because the user creating this relation may only have permission to modify one of the items, so currently the relation is added to the item in a personal library, or the group item that is being created.
On Tue, Feb 11, 2014 at 8:22 PM, Lennart Borgman <lennart...@gmail.com> wrote:
I get a bit confused here. I was told to report this error here. Or, did I perhaps misunderstand?

Where can I find the code handling this?



On Wednesday, February 5, 2014 7:53:08 AM UTC+1, Lennart Borgman wrote:
Dear Zotero,

I have added "related" to many items in our group library. In the desktop interface they points in both directions, i.e. if I add B as related to A:

A => B

I also get the reverse, A is related to B:

B => A

However when retrieving the items through the web API the reverse relation is not found. 

--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+unsubscribe@googlegroups.com.

To post to this group, send email to zoter...@googlegroups.com.
Visit this group at http://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/Pj2oVavaYvo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+unsubscribe@googlegroups.com.

Lennart Borgman

unread,
Mar 21, 2014, 12:54:44 AM3/21/14
to zoter...@googlegroups.com
Stumbling around in the code (I am not used to PHP) it looks like related items are loaded in

private function loadRelations() in file Item.inc.php.

There is some code with a comment "Add related items" that seems to do the job. Am I on the right track, here, or?

Dan Stillman

unread,
Mar 21, 2014, 5:20:45 AM3/21/14
to zoter...@googlegroups.com
https://github.com/zotero/dataserver/commit/fbaa602bdd32b0f43b8997f51aa13686986eab01

This will be live in a few days, after further testing.

Lennart Borgman

unread,
Mar 21, 2014, 9:45:49 AM3/21/14
to zoter...@googlegroups.com
Thanks Dan, that sounds promising. Is the test closed or is it possible to take part?
Reply all
Reply to author
Forward
0 new messages