How can I regenerate activity from content?

Created on 12 July 2024, about 1 year ago

Problem/Motivation

I had to update config
and these two fields were deleted (I am not sure why because I did not update anything dealign with activity):
field.field.activity.activity.field_activity_entity.yml
field.storage.activity.field_activity_entity.yml

I reimported them but now my activity has been deleted.

How do I regenerate activity based on the node content that I had?
I tried to resave everything and that did not bring it back?

While this is an old issue, I definately got bitten by it: #2921476: Error when deleting config entities in Open Social β†’

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

13.0

Component

Code (back-end)

Created by

πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    I am looking through the code and there is a reference to a view that I cannot seem to find anywhere:
    profiles/contrib/social/modules/custom/activity_creator/config/install/field.field.activity.activity.field_activity_message.yml:22: view_name: entity_reference_messages

    Where is the view defined. I am not seeing it anywhere anymore.

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    Did the nature of the messages change. For example when I created a topic, the picture and title showed up in the activity stream. now it just says XXX created a topic. there is no title and no image anymore.

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru
    • Open Social activity_stream uses simple_text format. I tried to update it to use ckeidtor5 not knowing that is what opensocial uses
    • View this page: https://mysite/admin/structure/activity/settings/display
      • Make sure that entity is added to the manage display.
      • You will have to go and make sure that the proper displays are selected for certain content types
  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    Still have an issue.
    Goto https://mysite/admin/structure/activity/94/edit

    There is no entity_reference_message view associated with field_activity_message.

    field: https://mysite/admin/structure/activity/settings/fields/activity.activit...

    profiles/contrib/social/modules/custom/activity_creator/config/install/field.field.activity.activity.field_activity_message.yml:22: view_name: entity_reference_messags

    On a new install there is no view and it seems to work just fine. It might be defined in code somewhere.

    The following error is there when you try to resave the message at admin/structure/activity/number/edit:

    Warning: Undefined array key "target_id" in Drupal\activity_creator\ActivityAccessControlHandler->checkAccess() (line 70 of profiles/contrib/social/modules/custom/activity_creator/src/ActivityAccessControlHandler.php).
    Drupal\activity_creator\ActivityAccessControlHandler->checkAccess(Object, 'view', Object) (Line: 109)
    Drupal\Core\Entity\EntityAccessControlHandler->access(Object, 'view', Object, 1) (Line: 786)
    Drupal\Core\Entity\ContentEntityBase->access('view', NULL, 1) (Line: 690)
    content_translation_page_attachments(Array) (Line: 311)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}(Object, 'content_translation') (Line: 395)
    Drupal\Core\Extension\ModuleHandler->invokeAllWith('page_attachments', Object) (Line: 308)
    Drupal\Core\Render\MainContent\HtmlRenderer->invokePageAttachmentHooks(Array) (Line: 285)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 284)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 54)
    Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle(Object, 1, 1) (Line: 39)
    Drupal\bat_api\StackMiddleware\BatApiMiddleware->handle(Object, 1, 1) (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 45)
    Drupal\services\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 43)
    Drupal\webform_product\RedirectMiddleware->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

  • πŸ‡ΊπŸ‡ΈUnited States SocialNicheGuru

    πŸ› Undefined array key "target_id" Needs review

Production build 0.71.5 2024