Commit fd409baa authored by Robert Lyon's avatar Robert Lyon Committed by Cecilia Vela Gurovic
Browse files

Bug 1813200: Wallpost activity passing in confusing 'id' value

When we allowed the wallpost to have embedded images we accidentally
adjusted what was being sent in the wall post activiy object by
including the 'id' value when we didn't need to and this caused
unexpected consequences.


Change-Id: Ic1b19320cb1cf0c90131dca9bfe262a95fffdd2f
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent 6689eadf
......@@ -233,6 +233,7 @@ EOF;
'postdate' => db_format_timestamp(time()),
'text' => clean_html($values['text']),
$activityrecord = clone $record;
$newid = insert_record('blocktype_wall_post', $record, 'id', true);
......@@ -246,7 +247,7 @@ EOF;
update_record('blocktype_wall_post', $updatedwallpost, 'id');
activity_occurred('wallpost', $record, 'blocktype', 'wall');
activity_occurred('wallpost', $activityrecord, 'blocktype', 'wall');
$instance = new BlockInstance($values['instance']);
$owner = $instance->get_view()->get('owner');
......@@ -20,6 +20,8 @@ defined('INTERNAL') || die();
* @param string $plugintype
* @param string $pluginname
* @param bool $delay
* NOTE: If the $data object contains an 'id' property this needs to be the id of the activitytype
function activity_occurred($activitytype, $data, $plugintype=null, $pluginname=null, $delay=null) {
try {
......@@ -58,6 +58,7 @@ define ("LOCATOR_CONSTANTS", json_encode(array(
'Secret urls - table row 1' => array("//table/tbody/tr[1]/td[4]/a", "xpath_element"),
'Multirecipientnotification' => array("//li[@id='module.multirecipientnotification']", "xpath_element"),
'Inbox message icon' => array("#activitylist .panel-heading a span", "css_element"),
// xpath related to participation report
'Group views report tr1 tc1' => array("//*[@id='groupviewsreport']/tbody/tr[1]/td[1]", "xpath_element"),
'Group views report tr1 tc2' => array("//*[@id='groupviewsreport']/tbody/tr[1]/td[2]", "xpath_element"),
......@@ -20,6 +20,7 @@ The wall post must generate a notification (Bug 547333)
And I log out
And I log in as "UserA" with password "Kupuh1pa!"
And I choose "mail" from user menu by id
Then I should see "Wall post" in the "Inbox message icon" property
When I click on "New post on your wall"
Then I should see "Hello"
When I follow "View whole wall"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment