Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In "Authors" you can assign a role to all contributors. Regardless of which role I assign, contributors will still appear as Authors, which is wrong. As far as I can see, there's no function yet to show the role of authors. I would expect a table row for each role with the assigned contributors.
I would also suggest to rename the tab "Authors" in the edit menu to "Contributors".
In the attached images you can see how I assigned two contributors, one as author, the other as editor and that they appear as Authors in the table. They will also appear as authors in the Citation.
Comment | File | Size | Author |
---|---|---|---|
#22 | chicago_author_date.xml_.txt | 21.09 KB | antongp |
#9 | Screenshot 2019-08-01 at 4.03.05 PM.png | 63.13 KB | u_tiwari |
#9 | Screenshot 2019-08-01 at 3.59.48 PM.png | 38.8 KB | u_tiwari |
bibcite_show_contributors.png | 11.58 KB | plepe | |
bibcite_edit_contributors.png | 47.21 KB | plepe |
Comments
Comment #2
antongp CreditAttribution: antongp at ADCI Solutions commentedComment #3
plepe CreditAttribution: plepe commentedI now somehow solved this issue by creating fields for Editors and Advisors (we don't need other roles) and copying the data in the database. This might not be the best solution, but I wanted to share mine, as long as there's no other.
You can find code changes in the attachment, these are the database queries:
Things todo: Remove the 'role' column from the new tables.
Comment #4
antongp CreditAttribution: antongp at ADCI Solutions commentedComment #5
u_tiwari CreditAttribution: u_tiwari commentedThis issue with all roles being treated as Author even if Editor is selected still exists in alpha-10 and dev version, is there any plan to roll out this patch or any other fix for this is already in place?
Comment #6
u_tiwari CreditAttribution: u_tiwari commentedThis fixes the issue of all roles being treated as author always because of fixed contributorKey in `bibcite_entity.normalizer.reference` service.
Seems to work fine with citeproc.
Comment #7
u_tiwari CreditAttribution: u_tiwari commentedComment #8
antongp CreditAttribution: antongp at ADCI Solutions commentedHi @u_tiwari
Original issue is about different thing, not about what you're trying to fix by patch #6. There is issue report already related to roles/category problem on import: #3069985: Endnote import: author category/role. But the problem is actually more general and affects some other formats, not only EndNote, and affects export as well. So, fix for that issue has to be more general and probably will include new mapping settings.
Re. original issue: patch #3 is not the right way, we're not going to add new base fields to the Reference entity type to fix this. I think there'll be individual fix for Table view only, on theming level (preprocess hook + template). For more general case, we'll probably add more formatters for Contributor field type which will provide more flexibility, but not sure for now.
Thanks.
Comment #9
u_tiwari CreditAttribution: u_tiwari commentedThanks for the reply. This patch has more to do with citation view mode display for `csl` format. When the citation is rendered on Entity view page we get this array where editor key is empty and gets included in authors
And if applying that patch we get the correct author types with desired keys
I agree we might need more work on this but this seemed a simple fix for citation view mode.
Comment #10
antongp CreditAttribution: antongp at ADCI Solutions commentedAh, yes, you're right. Citation output is also affected since it uses serialization as well. But table output and citation output will be fixed in different ways, and citation problem is more general and there are a few more issues related at some degree.
Thanks!
Comment #11
jrochate CreditAttribution: jrochate at ADJ 3 Sistemas commentedHi.
I had to adapt the patch in #6 to test for empty $author['role'] because prior to saving after patch this info is not available and we stick to the default method of $attributes[$this->contributorKey] = $authors;
I'm not sending the patch to not confuse future users, because this does not happen when we save new records AFTER this patch.
But existing information may be need to be checked and default to previous condition that this patch removes.
thanks.
This is important stuff, because without it the CSL doesn't process authors and editores correctly,
Comment #12
robcast CreditAttribution: robcast commentedI also applied @u_tiwari's patch in #6 and now the editor of a chapter in an edited book is no longer shown as author in the CSL output.
It is still missing the "ed." it should get according to the chicago style.
@antongp: it seems you are saying that this is the wrong way to fix it. Is there a better way?
Thanks
Comment #14
antongp CreditAttribution: antongp at ADCI Solutions commentedPushed a hotfix. Mapping is hardcoded for now, but should help with editors and some other roles.
@robcast
With the hotfix, it's still missing for me with Chicago on clean installation. But American Medical Association style has it. I achieved "ed." with Chicago by editing "secondary-contributors" macro in the CSL (by setting form="short" instead of verb on label), though still not sure if it's an issue with the CSL style or processor library.
Comment #15
robcast CreditAttribution: robcast commented@antongp thanks for the quick fix!
I do have a problem when I try to use the latest 1.x-dev though:
Could it be a problem with my installation? When I try to do the "drush updb" I get an error:
Comment #16
antongp CreditAttribution: antongp at ADCI Solutions commentedWhich Drupal core version do you use? Seems like not newer than 8.6.x , because EntityNormalizer::__construct() signature change as well as EntityDefinitionUpdateManager::updateFieldableEntityType() method addition happened in Drupal 8.7.0.
We basically keep latest dev compatible with supported Drupal core versions, i.e. Drupal 8.7.x and 8.8.x at the moment, compatibility with unsupported versions is not guaranteed. Fun fact: there are a few workarounds in the code already to make the module compatible with both supported Drupal core branches (these workarounds can be removed once Drupal 8.9/9.0 is released). BibCite alpha10 should be compatible with Drupal 8.6, 8.7 and 8.8.
Hope this helps.
Comment #17
robcast CreditAttribution: robcast commented@antongp sorry, I didn't specify my Drupal version. Yes it's 8.6.
I am working on the upgrade to 8.7 and I'll try again.
Comment #18
robcast CreditAttribution: robcast commented@antongp I am on 8.7.11 now and I can install bibcite-1.x and it works!
The editor is recognized by the CSL now. I have to try out your fix to get the "ed." into Chicago style...
Can I use the current bibcite-1.x in low-volume production, or are there known issues?
Thanks!
Comment #19
antongp CreditAttribution: antongp at ADCI Solutions commentedI believe there are no new issues added in latest dev in comparison with alpha10. I would start with latest dev because of all nice changes happened since alpha10 (revisions support, UI improvements, etc... You can find full list of changes in the changelog https://git.drupalcode.org/project/bibcite/blob/8.x-1.x/CHANGELOG.md)
Comment #20
robcast CreditAttribution: robcast commented@antongp I am using 1.x-dev now and it works well!
Thanks a lot!
Comment #21
robcast CreditAttribution: robcast commented@antongp in #14 you mentioned that you have been able to get the Chicago style to insert "ed." for the editor of a book chapter.
I tried to replicate your fix by changing the label in the secondary-contributors macro but it does not work for me. I have the editor as category=secondary and role=editor.
Could you post the patched style?
The "ed." does work with the AMA style, as you noted.
Thank you.
Comment #22
antongp CreditAttribution: antongp at ADCI Solutions commented@robcast sorry for late response. Attached edited chicago_author_date style markup. I edited "secondary-contributors" macro.
Comment #23
robcast CreditAttribution: robcast commentedThanks @antongp! Your style did not exactly what I wanted (editor for chapter type as secondary author) but it showed me that it could work and I found that I needed to change the "verb" in "container-contributors" instead :-)