When a view is created that uses the Stream Owner Type argument and then saved it works correctly. But when the view is opened again the default value overrides the saved choice of the stream type and sets the type to User unless changed each time.

Here is a patch that updates how the stream owner handler populates the argument with the saved value.

(Patch incorrect, new patch in comments.)

Comments

mistermoxy’s picture

StatusFileSize
new1020 bytes

I've updated the patch, the one in the body is incorrect.

mistermoxy’s picture

StatusFileSize
new1020 bytes

I am the worst patcher ever. Here is the correct patch.

mistermoxy’s picture

Status: Active » Closed (fixed)
jessehs’s picture

Version: 6.x-2.0-beta1 » 6.x-2.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new1.38 KB

This patch did not quite work for me. This one does.

Also, @mistermoxy, you should mark the issue as either "needs review" or "needs work" (depending on if the patch is a complete solution) after you submit a patch. The module maintainer will mark the issue "fixed" when the patch is committed to the project. The issue queue system will close the issue automatically after a few weeks.

icecreamyou’s picture

What version of Views are you using? Activity Log targets Views 2.x and may not work with Views 3.x.

jessehs’s picture

StatusFileSize
new131.97 KB

I'm using views 2.16 with a highly modified Commons site. I needed an activity stream in a block, so I cloned the default activity_log_stream view, providing default arguments for the stream owner type and stream owner arguments.

I believe you can reproduce the issue fairly easily by choosing "Stream type" as the default argument for the stream owner type Argument. I've attached an image explaining where the problem is.

icecreamyou’s picture

What makes me hesitate about this patch is that I obviously spent some time trying to figure out where this value was hidden just by the fact that it's so far down the rabbit hole:

    $argument = $this->view->display[$this->view->current_display]->display_options['arguments']['stream_owner_type'];

You may very well be right about this but I would like to have someone else test it first to confirm and I don't have time to test it myself at the moment.

icecreamyou’s picture

Issue summary: View changes

The patch was incorrect.