-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elgg_get_river() doesn't work as expected when using the 'view' attribute #10791
Labels
Comments
Ouch,
|
Actually, adding the feature is super trivial. (see #10792) |
I see us getting rid of view column eventually and using hooks instead, so let's just not add any API that would be building upon it. Option 1 sounds good to me. |
mrclay
added a commit
to mrclay/Elgg-leaf
that referenced
this issue
Feb 27, 2017
mrclay
added a commit
to mrclay/Elgg-leaf
that referenced
this issue
Feb 27, 2017
Devs who refactor `elgg_delete_river()` code to use `elgg_get_river()` may be surprised that it doesn't support this option. Fixes Elgg#10791
PR #10793 |
mrclay
added a commit
to mrclay/Elgg-leaf
that referenced
this issue
Feb 27, 2017
Devs who refactor `elgg_delete_river()` code to use `elgg_get_river()` may be surprised that it doesn't support this option. Fixes Elgg#10791
mrclay
added a commit
to mrclay/Elgg-leaf
that referenced
this issue
Feb 27, 2017
Devs who refactor `elgg_delete_river()` code to use `elgg_get_river()` may be surprised that it doesn't support this option. Fixes Elgg#10791
Fixed by #10791. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Due to deprecation of elgg_delete_river() I've switched to the recommended new way ("Use elgg_get_river() and call delete() on the returned item(s)") in several plugins. Mistake of me: I've not checked the parameters of elgg_get_river() and just changed the code to use an ElggBatch with elgg_get_river() fetching the river items with basically the same parameters as used before in elgg_delete_river(). And it seemed to work.
BUT!
It seems using the 'view' attribute doesn't return exactly the river items I want to have but MORE.
Example:
did not only the river items with the view river/user/default/profileupdate" but ADDITIONALLY items with views "river/user/default/profileiconupdate" and "river/object/poll/update" that I surely do NOT want to delete here.
It seems to work with a custom where clause:
But that's not really what you think of using in the first place.
So, bug or what?
And btw, there's a public usable replacement of elgg_delete_river() necessary urgently both for Elgg 2.3 and 3.0. It's just annoying that you either get the deprecated warning all the time (2.3 will get LTS so will be around for a while), or use the private _elgg_delete_river() or need to use much too much custom code to replace elgg_delete_river() by other means.
The text was updated successfully, but these errors were encountered: