DoSomething / legacy-website

:moyai: The DoSomething.org legacy website.
https://www.dosomething.org/
MIT License
50 stars 22 forks source link

Fact Page: Facts field collection #2674

Closed aaronschachter closed 10 years ago

aaronschachter commented 10 years ago

Desired functionality is to append copy to the end of a fact within a fact page, e.g.

Safe, insecticide-treated bed nets repel and kill disease-carrying mosquitoes to reduce the spread of malaria. Check out Comeback Clothes to learn how to fight disease.

  • [x] Build a field collection field_fact_collection into the Fact Page content type.
  • [x] field_fact -- Fact. mutli-value entity reference to a fact node. This could potentially just reuse fact_solution or fact_problem
  • [x] field_compound_text_copy -- Fact Copy. Use existing field
  • [x] field_campaigns -- Links. Use existing field. This potentially could even just be field_node so its not content type specific, but then could just be something like field_nodes or hell why not field_entity
  • [x] Build a token system to use [link] to replace any instances with a l to the node specified in field_campaigns
  • [x] Import existing field_facts values to the new field collection. This is nasty. OR an intern manually does this.
  • [x] Update the preprocess / template
  • [x] Drop field_facts Entity Reference field once all Fact Pages have been migrated.
aaronschachter commented 10 years ago

Deploying to stage failed, because the field_fact_collection did not exist when running 7002, suggesting that the code added to manually revert the feature did not work. This is kinda crazy because it worked for both me and @sergii-tkachenko.

Updating database...
DEBUG [6fc07136]    Added the administrator role to uid 1                                  [success]
DEBUG [6fc07136]     Dosomething_fact_page  7002  Imports existing field_facts data into the        
DEBUG [6fc07136]                                  field_fact_collection field.                      
DEBUG [6fc07136]     Dosomething_fact_page  7003  Removes field_facts from Fact Page content type.
DEBUG [6fc07136]    Do you wish to run all pending updates? (y/n): 
DEBUG [6fc07136]    Added the administrator role to uid 1                                  [success]
DEBUG [6fc07136]    y
DEBUG [6fc07136]    Added the administrator role to uid 1                                  [success]
DEBUG [6fc07136]    y
DEBUG [6fc07136]    Invalid field name given: field_fact_collection is not a Field           [error]
DEBUG [6fc07136]    Collection field.
DEBUG [6fc07136]    y
DEBUG [6fc07136]    Performed update: dosomething_fact_page_update_7002                         [ok]
DEBUG [6fc07136]    y
DEBUG [6fc07136]    'all' cache was cleared.                                               [success]
DEBUG [6fc07136]    y
DEBUG [6fc07136]    Finished performing updates.                                                [ok]
DEBUG [6fc07136]    Enabling modules in dosomething.info
DEBUG [6fc07136]    Finished performing updates.                                                [ok]
DEBUG [6fc07136]    No new modules to enable
DEBUG [6fc07136]    Finished performing updates.                                                [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Finished performing updates.                                                [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_campaign.field_base.                                   [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_campaign.field_group.                                  [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_campaign.field_instance.                               [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_campaign.node.                                         [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_campaign.user_permission.                              [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_campaign.variable.                                     [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    The feature dosomething_campaign_gr could not be found.                  [error]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_fact_page.field_base.                                  [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_fact_page.field_group.                                 [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_fact_page.field_instance.                              [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_fact_page.node.                                        [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_fact_page.user_permission.                             [ok]
DEBUG [6fc07136]    Reverting Features
DEBUG [6fc07136]    Reverted dosomething_fact_page.variable.                                    [ok]