Problems with the "This Edition doesn't have an Author" tag

It is the first time I add a book without author or editor. So I checked the box for “This Edition doesn’t have an Author”.
The result looks like this:

I think it should be “No author” or something similar.

When I opened the edition page, I noticed that the checkmark had disappeared:

Vollbildaufzeichnung 11.10.2023 150710

But it was still valid, you couldn’t click on it. (not true when I wanted to add an id later, I had ro click it again to submit the change)

Then I tried something else; I changed the author of an existing edition (a book by Stephen R. Donaldson) to “No author”.
The result was suprising :wink:

A certain Jason West appeared as author and “as himself”

The I reverted the edit, opened it again and it looked this:

The author edit field is grayed out. You can’t edit the author, that’s not really as it should be, I suppose.

Then I examined self-proclaimed new author Jason West. It’s a photographer and his page looks like this:

There are two editions assigned to him.
“Gob” has already been deleted and shouldn’t appear here,
And the second is my test object by Stephen Donaldson. So it wasn’t deleted, when I changed back to the real author.

There is probably still a lot to be corrected :wink:

2 Likes

the solution MusicBrainz has used is [no artist], I wonder if that could work over here as well?

1 Like

What would be the difference to [anonymous]? Somebody must have edited the book. we just don’t know who did the work. And that’s what the [anonymous] credit is used for.

We also have the equivalent [no author] for BookBrainz.

This topic was even discussed at the summit, the general concensus being that we no longer need it since Author Credits are now optional in BB (opposed to MB where the AC is mandatory). Other special purpose authors like [unknown], [anonymous] or [traditional] still make sense for use in relationships, while [no author] is not relevant for these.

Of course the above only makes sense if the “no author” checkbox is actually working as expected :grin:

Regarding your (first) observed bug, it would probably be helpful to have a look at the server logs, as it seems that some revisions failed to be created properly. Notice the missing revision numbers 155406 and 155411:

2 Likes

Haha, I just tried editing a random entity in my local dev server to have an unset author credit, and the result is also “Jason West as himself” :rofl:

Unfortunately there was nothing helpful in the server logs which is related to the submission.

Edit: At least I’ve found out why Jason West is the one which is displayed due to this bug, he has the first entry in the author credit table:

bookbrainz=# select * from author_credit_name order by author_credit_id asc limit 1;
 author_credit_id | position |             author_bbid              |    name    | join_phrase 
------------------+----------+--------------------------------------+------------+-------------
                2 |        0 | 34191894-564f-4696-a144-64e4d1d3cfae | Jason West |  as himself
(1 row)
4 Likes

lol, this photographer is really pushing his way into the spotlight quite aggressively. :rofl:

I can confirm that the issue can be easily reproduced for new edition groups as well. Creating a new edition Group without an Author Credit works almost… it only wants me to still add an AC afterwards:

Initial state when I’m editing the freshly created EG again:

After the first click on the checkbox, the AC editor gets greyed out, but the checkbox is still unchecked:

At this stage the Submit button is enabled, but clicking it results in a “Submission Error: Form contained invalid data” message in the browser (because either a non-empty author credit or a ticked checkbox is required).

This POST request also manages to crash the server:

bookbrainz-site  | POST /edition-group/fafb0aa6-c8ad-41f7-9385-25bf58942e8a/edit/handler 400 201.975 ms - 39
bookbrainz-site  | × { FormSubmissionError: No Updated Field
bookbrainz-site  |     at _callee29$ (/home/bookbrainz/bookbrainz-site/src/server/routes/entity/entity.tsx:1117:10)
bookbrainz-site  |     at tryCatch (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:63:40)
bookbrainz-site  |     at Generator.invoke [as _invoke] (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:294:22)
bookbrainz-site  |     at Generator.next (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:119:21)
bookbrainz-site  |     at asyncGeneratorStep (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
bookbrainz-site  |     at _next (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
bookbrainz-site  |   status: 400 }
bookbrainz-site  | × { FormSubmissionError: No Updated Field
bookbrainz-site  |     at _callee29$ (/home/bookbrainz/bookbrainz-site/src/server/routes/entity/entity.tsx:1117:10)
bookbrainz-site  |     at tryCatch (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:63:40)
bookbrainz-site  |     at Generator.invoke [as _invoke] (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:294:22)
bookbrainz-site  |     at Generator.next (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:119:21)
bookbrainz-site  |     at asyncGeneratorStep (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
bookbrainz-site  |     at _next (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
bookbrainz-site  |   status: 400 }
bookbrainz-site  | Uncaught Exception:
bookbrainz-site  | Error: Cannot set headers after they are sent to the client
bookbrainz-site  |     at new NodeError (node:internal/errors:405:5)
bookbrainz-site  |     at ServerResponse.setHeader (node:_http_outgoing:648:11)
bookbrainz-site  |     at ServerResponse.header (/home/bookbrainz/bookbrainz-site/node_modules/express/lib/response.js:794:10)
bookbrainz-site  |     at ServerResponse.send (/home/bookbrainz/bookbrainz-site/node_modules/express/lib/response.js:174:12)
bookbrainz-site  |     at ServerResponse.json (/home/bookbrainz/bookbrainz-site/node_modules/express/lib/response.js:278:15)
bookbrainz-site  |     at ServerResponse.send (/home/bookbrainz/bookbrainz-site/node_modules/express/lib/response.js:162:21)
bookbrainz-site  |     at Object.sendErrorAsJSON (/home/bookbrainz/bookbrainz-site/src/common/helpers/error.js:169:4)
bookbrainz-site  |     at _callee$ (/home/bookbrainz/bookbrainz-site/src/server/helpers/handler.js:37:16)
bookbrainz-site  |     at tryCatch (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:63:40)
bookbrainz-site  |     at Generator.invoke [as _invoke] (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:294:22)
bookbrainz-site  |     at Generator.throw (/home/bookbrainz/bookbrainz-site/node_modules/regenerator-runtime/runtime.js:119:21)
bookbrainz-site  |     at asyncGeneratorStep (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
bookbrainz-site  |     at _throw (/home/bookbrainz/bookbrainz-site/node_modules/@babel/runtime/helpers/asyncToGenerator.js:29:9)
bookbrainz-site  |     at processTicksAndRejections (node:internal/process/task_queues:95:5)

Only after a second click the checkbox is finally ticked (new attempt after the server has been restarted):

When I try to submit I now, the error message is “Submission Error: No Updated Field” (as expected), so I do a random change (such as adding a disambiguation comment) to be able to submit.

In this case, the resulting entity still has no AC and is asking me to add one, which is different from the case of unsetting an AC which always ends up with Jason West being credited.

4 Likes

Yes, that is exactly what I was trying to describe. But you can do it more precisely :wink:

Nasty bugs !
Thanks for reporting @indy133 and for digging into it @kellnerd !
I’ve opened BB-768 to track this cluster of related issues

One of them I had already discovered two weeks ago, but I hadn’t hit the other issues : https://tickets.metabrainz.org/browse/BB-767

5 Likes

Hello! :blush: I’ve implemented some fixes to address the bug mentioned in BB-768 within PR-1051. Now, when creating or editing editions or edition-groups, there shouldn’t be any issues.

I haven’t delved into the matter of our friend "Jason West himself " yet, but perhaps we can explore that in our next round. :wink:

I’d really appreciate it if you could take a look and share any suggestions or feedback you might have. Thanks !!!

2 Likes

Well, editing works again. That’s great! But if I use the tag “This edition…” and submit the edition, it still looks like this:

When I reopen the edit page, the tag has disappeared and when I tag it again I get a submission error: “No changes made”.

:sweat_smile: I think for seeing changes in that PR you have to pull them on your machine and run them locally until they merged , then you wont see the warning “Unset credit…”

if that’s not the case please let me know :smiley:

1 Like