Closed (fixed)
Project:
Open Social
Version:
8.x-1.x-dev
Component:
Code (back-end)
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Apr 2018 at 13:35 UTC
Updated:
17 May 2018 at 11:39 UTC
Jump to comment: Most recent
Comments
Comment #2
brhane commentedThis issue is caused when we are editing a post on a user's timeline as the save function, from the post form, does not have the User parameter when you edit the post. So its better if we provide a solution to get the right replacement, or by making sure we don't replace the tokens at all on the Edit form since these values don't change, only the post message does. See the current logic at this function:
if (isset($display) && ($display_id = $display->get('id'))) {
if ($display_id === $this->postViewProfile) {
$account_profile = \Drupal::routeMatch()->getParameter('user');
$this->entity->get('field_recipient_user')->setValue($account_profile);
}
}
elseif ($display_id === $this->postViewGroup) {
$group = \Drupal::routeMatch()->getParameter('group');
$this->entity->get('field_recipient_group')->setValue($group);
}
Comment #3
brhane commentedHello,
I have already created a PR for this at github.com and here is the patch.
https://patch-diff.githubusercontent.com/raw/goalgorilla/open_social/pul...
Comment #4
brhane commentedComment #5
jaapjan commentedComment #6
ronaldtebrake commentedHi Brhane,
Code works like a charm :)
Great work!
Comment #7
jaapjan commentedIf it is merged to 8.x we can mark the status as "Fixed". Thanks!