it complains Caught exception in MusicBrainz::Server::Controller::RelationshipEditor->base "Missing field: entity.1.type at lib/MusicBrainz/Server/Controller/RelationshipEditor.pm line 75, <GEN63> line 3."
bitmap
you probably need entity.1.type to be "url"
JesseW
ok.
adding that
bitmap
I guess it's not smart enough to see that you're using the .text param
hm
JesseW
still get bad request
bitmap
that should be rels.0.url, not rels.0.url.1.text
JesseW
ok
bitmap
er
JesseW
rels.0.url.text?
bitmap
rels.0.entity.1.url, I think
JesseW
rels.0.entity.1.url or rels.0.entity.1.url.text?
bitmap
the former
JesseW
ok
testing
bad request
{"error":"invalid URL: at lib/MusicBrainz/Server/Controller/WS/js/Edit.pm line 255, <GEN44> line 3.\n"}
nikki
has that actually shipped yet?
JesseW
if not, how *should* the bots add URLs?
ianmcorvidae
yeah, I mean, just to confirm you're using beta
JesseW
I was using release. I'll switch to beta
and that works
bitmap
oh...sorry, I thought that was released already
ianmcorvidae
last actual release was the schema change hotfixes XD
possibly you've reproduced the cache issue and that release group doesn't actually exist
JesseW
hm
bitmap
yeah, there's no release group with that gid
JesseW
but I wasn't trying to edit a release group.
I was trying to add a URL to an artist
ianmcorvidae
oh heh, that's true
JesseW
which does exist on beta
so something is odd, there
bitmap
but link_type 94 is for release groups
JesseW
is it now...
bitmap
(not that it should terribly ISE instead of saying that)
JesseW
so, what is one of the link types for an artist-url relationship?
that I can use
ianmcorvidae
yeah, it's failing because it's not considering the types
(that ID number is the artist rowid of the test artist)
bitmap
and we should probably support gids for the link_type field since those are actually visible on the website
ianmcorvidae
yeah
JesseW
so, on http://beta.musicbrainz.org/edit/27876598/data when it says: "link_type":{"long_link_phrase":"has a review page at","link_phrase":"reviews","name":"review","reverse_link_phrase":"review page for","id":94} that doesn't mean the link_type for "reviews" is 94?
bitmap
yes
ianmcorvidae
it does mean that, but it's the release_group-url one
presumably that edit is in error/allowed when it shouldn't be
(well, there's only the one, there's no artist-url review AR)
JesseW
yes, that appears to be an error, then
hm
ianmcorvidae
anyway 183 is the artist-url official homepage rel
JesseW
sorry for the confusion
ianmcorvidae
if you want one to use for testing
JesseW
ok. thanks
and that works
yay!
ianmcorvidae
bitmap: if you have something to prevent rels like that with mismatched link_types I will absolutely hotfix that, btw
(the l_ tables getting out of sync with the link table can be really annoying)
(you have to drop triggers in a transaction and then delete and bring them back, or something? it's wacky)
bitmap
yeah, I'm investigating a fix
JesseW
bitmap: for rel-editor.as_auto_editor -- exactly what format should the (boolean) be in?
bitmap
0 or 1 should work
JesseW
bitmap: ok. Not "True" and "False"?
bitmap
I believe only 0 and 1 work
JesseW
ok
that would be good to mention on the wiki page
bitmap
it is at the top :)
demosdemon joined the channel
though it should mention that as_auto_editor is boolean
in case it's not obvious
JesseW
yep. and maybe include it in the example
bitmap
(and it's a wiki page so feel free to change it)
JesseW
bitmap: will do
I'll also add a mention of the {"edits":[{"message":"no changes"}]} value one gets back if the edit already exists.
bitmap: also, it doesn't look like the return value specifies whether or not the edit was automatically applied. It might be nice to know that.
and added to the wiki page
bitmap
thanks
demonimin joined the channel
demonimin joined the channel
JesseW
bitmap: it appears to return HTTP code 400 even when it succeeds. This is odd...
bitmap
hm, I think I see where that happens
JesseW
and the key is "error", not "errors"
ruaok joined the channel
Leftmost
Well, he was in and out fast. :-P
ianmcorvidae
he doesn't actually like us very much, dontchaknow ;)
Leftmost
I can't say as I blame him. :)
ianmcorvidae
we're pretty annoying, it's true
demosdemon joined the channel
_5moufl joined the channel
zas joined the channel
UmkaDK joined the channel
MBJenkins
Michael Wiencek: Various /relationship-editor endpoint fixes