Migrate the "About the Author" field into the Person bio field. #38

Closed
opened 2019-08-31 19:58:40 +00:00 by cedewey · 17 comments
cedewey commented 2019-08-31 19:58:40 +00:00 (Migrated from gitlab.com)

Background

Articles have an "About the Author" field. That would be most helpful to have on the author's node page to avoid double entry of info.

Work Required

  • Migrate content of field_author_bio in content type "story" to field_body_paragraph in content type "people"
## Background Articles have an "About the Author" field. That would be most helpful to have on the author's node page to avoid double entry of info. ## Work Required * [x] Migrate content of field_author_bio in content type "story" to field_body_paragraph in content type "people"
mlncn commented 2019-09-23 13:34:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #29

mentioned in issue #29
mlncn commented 2019-10-01 06:40:47 +00:00 (Migrated from gitlab.com)

@FreeScholar @cedewey @wolcen @gnuget @dinarcon Hey team! This is the biiig one we missed.

On certain article pages like this: http://geonewsletter.org/story/evolution-tool-library

There's an often-extensive biography:

Screenshot_2019-10-01_The_Evolution_of_the_Tool_Library_Grassroots_Economic_Organizing

The goal was to migrate this into the Person content type so that there'd be substance there, but we probably always needed to migrate these bios as part of the regular content as some of them do change over time (though most don't change much).

Regardless, the bio content from the bottom of some articles (story on the D7 site) didn't get migrated at all, and do need to be migrated as soon as possible.

I've added an entity reference field to use for the biography (keeping it conceptually separate from the author field, even though it should be a full overlap most if not all of the time (though i can see an interviewer being credited as an author but not given a bio at the end of the article, and a person who was interviewed getting a bio but not author credit, perhaps).

This will need to be updated to link to the biography when these are migrated in.

Further, these are special Entity Reference Override entity reference fields, so there's a text field to also be migrated in.

Migration implementation notes to @gnuget:

The D8 field_body_paragraph in content type "people" can keep only the most recent content from D7's field_author_bio (and can include the embedded image), but the entity reference custom text field (field_biography_override on node__field_biography table) can store each D7 nodes version of field_author_bio.

The mapping of field_author_bio data to Person (people) content is provided by your author field migration, upgrade_d7_node_story_author. The people from that field are the same ones with the bios in the field_author_bio field.

It is OK to roll back and rerun the author to People migration, but if there's any way to 'update' just specific fields on content without rolling back there shouldn't be any need to, because no paragraph text was migrated into people, and i'm fairly certain @joshua_davis hasn't edited any People.

Articles have been edited and must not be rolled back. If this means we're outside the migration system a one-shot script, tested somewhere other than live of course, will be fine.

@FreeScholar @cedewey @wolcen @gnuget @dinarcon Hey team! This is the biiig one we missed. On certain article pages like this: http://geonewsletter.org/story/evolution-tool-library There's an often-extensive biography: ![Screenshot_2019-10-01_The_Evolution_of_the_Tool_Library_Grassroots_Economic_Organizing](/uploads/14ace65d6374f33751636ede16ae476b/Screenshot_2019-10-01_The_Evolution_of_the_Tool_Library_Grassroots_Economic_Organizing.png) The goal was to migrate this into the Person content type so that there'd be substance there, but we probably always needed to migrate these bios as part of the regular content as some of them do change over time (though most don't change much). Regardless, the bio content from the bottom of some articles (`story` on the D7 site) didn't get migrated at all, and do need to be migrated as soon as possible. I've added an entity reference field to use for the biography (keeping it conceptually separate from the author field, even though it should be a full overlap most if not all of the time (though i can see an interviewer being credited as an author but not given a bio at the end of the article, and a person who was interviewed getting a bio but not author credit, perhaps). This will need to be updated to link to the biography when these are migrated in. Further, these are special [Entity Reference Override](https://github.com/agaric/entity_reference_override) entity reference fields, so there's a text field to also be migrated in. ### Migration implementation notes to @gnuget: The D8 `field_body_paragraph` in content type "people" can keep only the most recent content from D7's `field_author_bio` (and can include the embedded image), but the entity reference custom text field (`field_biography_override` on `node__field_biography` table) can store each D7 nodes version of `field_author_bio`. The mapping of `field_author_bio` data to Person (`people`) content is provided by your author field migration, `upgrade_d7_node_story_author`. The people from that field are the same ones with the bios in the `field_author_bio` field. It is OK to roll back and rerun the author to People migration, but if there's any way to 'update' just specific fields on content without rolling back there shouldn't be any need to, because *no* paragraph text was migrated into people, and i'm fairly certain @joshua_davis hasn't edited any People. Articles *have* been edited and **must not** be rolled back. If this means we're outside the migration system a one-shot script, tested somewhere other than live of course, will be fine.
mlncn commented 2019-10-01 22:07:58 +00:00 (Migrated from gitlab.com)

In conversation @gnuget and i decided to also migrate field_author_bio to the people field_summary; everything else above still stands.

Including the not rolling back / overwriting edited content (e.g., non-People content). No idea how David's going to do that. :-)

In conversation @gnuget and i decided to also migrate `field_author_bio` to the `people` `field_summary`; everything else above still stands. Including the not rolling back / overwriting edited content (e.g., non-People content). No idea how David's going to do that. :-)
gnuget commented 2019-10-03 02:38:18 +00:00 (Migrated from gitlab.com)

In order to no rollback the migration we need to just update it, I did it using the following commands:

drush cr
drush mim  upgrade_d7_node_story_bio_paragraph 
drush mim  upgrade_d7_node_story_author --update
drush mim  upgrade_d7_node_story --update

Once we tested this and we are sure that all went well we might want to revert this commit: 563c7ee62a

That commit basically commented all the fields that we didn't want to update/migrate, so if we want to have the migration that migrate all the content we need to revert it.

In order to no rollback the migration we need to just update it, I did it using the following commands: ``` drush cr drush mim upgrade_d7_node_story_bio_paragraph drush mim upgrade_d7_node_story_author --update drush mim upgrade_d7_node_story --update ``` Once we tested this and we are sure that all went well we might want to revert this commit: 563c7ee62a6355a8b09701e78efffe20aee101cb That commit basically commented all the fields that we didn't want to update/migrate, so if we want to have the migration that migrate all the content we need to revert it.
mlncn commented 2019-10-03 02:49:46 +00:00 (Migrated from gitlab.com)

@gnuget OK great! Will run this soon!

@gnuget OK great! Will run this soon!
mlncn commented 2019-10-04 20:54:04 +00:00 (Migrated from gitlab.com)

mentioned in issue #79

mentioned in issue #79
mlncn commented 2019-10-05 00:08:25 +00:00 (Migrated from gitlab.com)

mentioned in commit d34cdff07c

mentioned in commit d34cdff07c2c3c10560a57d44d5c559e8e031190
mlncn commented 2019-10-07 15:14:51 +00:00 (Migrated from gitlab.com)

marked the checklist item Migrate content of field_author_bio in content type "story" to field_body_paragraph in content type "people" as completed

marked the checklist item **Migrate content of field_author_bio in content type "story" to field_body_paragraph in content type "people"** as completed
mlncn commented 2019-10-07 18:35:27 +00:00 (Migrated from gitlab.com)

Migration complete! Testing and then styling to commence.

(that was several days ago... been working on the needed display improvements since)

No existing fields on articles were changed, so that is excellent.

Problems revealed in testing:

  • Summary field was missing its text format— fixed already on live with UPDATE node__field_summary SET field_summary_format = 'full_html' WHERE field_summary_format is NULL;.
  • Biography reference fields are being populated even when there was no specific biography. I don't think i was clear in my instructions to @gnuget that only articles with existing biographies should receive one.

@joshua_davis The new functionality is that you can reference a Person to use their summary as their bio at the end of articles. By default, this shows (Biographies are currently independent of the Author reference, so you could have, say, only the interviewer listed as author and only the subject given a biography at the bottom of the article. If authorship should always be the same as who has bios, and bios should always be present, we can remove the redundant reference field.)

Now every article associated with an author (contributor profile) shows the summary for that profile as a bio at the bottom. The original intention was to have the biographies (as an override of the contributor/person profile summary only for those that had biographies before, but if this retroactive adding of bios below the articles is mostly desired we won't bother to role them back.

See https://geo.coop/story/commoning-our-cities for example.

cc @FreeScholar

Migration complete! Testing and then styling to commence. (that was several days ago... been working on the needed display improvements since) No existing fields on articles were changed, so that is excellent. Problems revealed in testing: * Summary field was missing its text format— fixed already on live with `UPDATE node__field_summary SET field_summary_format = 'full_html' WHERE field_summary_format is NULL;`. * Biography reference fields are being populated even when there was no specific biography. I don't think i was clear in my instructions to @gnuget that only articles with existing biographies should receive one. @joshua_davis The new functionality is that you can reference a Person to use their summary as their bio at the end of articles. By default, this shows (Biographies are currently independent of the Author reference, so you could have, say, only the interviewer listed as author and only the subject given a biography at the bottom of the article. If authorship should always be the same as who has bios, and bios should always be present, we can remove the redundant reference field.) Now every article associated with an author (contributor profile) shows the summary for that profile as a bio at the bottom. The original intention was to have the biographies (as an override of the contributor/person profile summary only for those that had biographies before, but if this retroactive adding of bios below the articles is mostly desired we won't bother to role them back. See https://geo.coop/story/commoning-our-cities for example. cc @FreeScholar
mlncn commented 2019-10-07 18:35:27 +00:00 (Migrated from gitlab.com)

assigned to @FreeScholar

assigned to @FreeScholar
mlncn commented 2019-10-07 18:36:40 +00:00 (Migrated from gitlab.com)

There is a related bug with saving articles now that i am trying to fix.

Also there's an improvement, a widening of the left column for the author name, that i accidentally had not committed before deploying; it will with the saving bug.

There is a related bug with saving articles now that i am trying to fix. Also there's an improvement, a widening of the left column for the author name, that i accidentally had not committed before deploying; it will with the saving bug.
mlncn commented 2019-10-07 18:54:35 +00:00 (Migrated from gitlab.com)

OK, not yet able to fix the biography fields preventing saving of articles, so they are hidden from the form for the moment, but the result of the migrated ones can be seen at the bottom of articles like https://geo.coop/story/brief-history-cooperatives-california

OK, not yet able to fix the biography fields preventing saving of articles, so they are hidden from the form for the moment, but the result of the migrated ones can be seen at the bottom of articles like https://geo.coop/story/brief-history-cooperatives-california
joshua_davis commented 2019-10-07 19:00:56 +00:00 (Migrated from gitlab.com)

Ok, standing by.

Ok, standing by.
mlncn commented 2019-10-08 20:25:57 +00:00 (Migrated from gitlab.com)

@joshua_davis all set! You can now reference people to add biographies, and provide text to override their biography summary for that particular article if you choose.

Very interested in if you think the edit-side functionality of authors and biographies should be merged (on the visitor viewing the site side, it can be kept the same).

@joshua_davis all set! You can now reference people to add biographies, and provide text to override their biography summary for that particular article if you choose. Very interested in if you think the edit-side functionality of authors and biographies should be merged (on the visitor viewing the site side, it can be kept the same).
mlncn commented 2019-10-09 17:22:27 +00:00 (Migrated from gitlab.com)

marked this issue as related to #85

marked this issue as related to #85
mlncn commented 2019-10-09 17:23:05 +00:00 (Migrated from gitlab.com)

mentioned in issue #85

mentioned in issue #85
cedewey commented 2019-10-16 20:18:49 +00:00 (Migrated from gitlab.com)

closed

closed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: geo/geo-coop#38
No description provided.