Commit a468e253 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 f63d8cdb
......@@ -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 {
......@@ -66,6 +66,7 @@ define ("LOCATOR_CONSTANTS", json_encode(array(
'User menu' => array(".icon-chevron-down.collapsed", "css_element"),
'Signoff page' => array("#signoff-confirm-form", "css_element"),
'Verify page' => array("#verify-confirm-form", "css_element"),
'Inbox message icon' => array("#activitylist .panel-heading a span", "css_element"),
// properties with xpath_elements
'Settings sub-menu' => array("//span[@innertext='Settings']", "xpath_element"),
'Settings' => array("//ul[#'userchildmenu-8']/?/?/a[@innertext='Settings']", "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 inbox
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"
Supports Markdown
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