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
Need a default river view (Trac #4384) #4384
Comments
ewinslow wrote on 42305823-11-26 Option 1 sounds impossible to get right, but option 2 will cause this problem: There could appear to be only 13 results when limit was set to 20. Ultimately we need a way to ignore unsupported entries in the river. Before executing a river query, we should query for all the unique views that are in the river, filter out the ones that do not exist (using elgg_view_exists), and then add an |
brettp wrote on 42307343-07-15 Sounds good as long as we cache the valid views list. |
I wrote a modification following your guidelines to get valid views list with SELECT DISTINCT view FROM {$CONFIG->dbprefix}river and checking with elgg_view_exists. I'm currently caching valid views in memory in a global var, but maybe you were talking about caching in file cache. I want to do a pull request, but I need to know if I'm doing this right. See my commit here: adayth@a6ccaf9 |
That looks like you're on the right track. Thanks for looking into this! I'm not really sure how much a file-based cache will matter since the query is simple and we should be caching the results of elgg_view_exists if we aren't already. |
Am I wrong to assume that we could tackle this by checking types/subtypes against registered types/subtypes? We already use a river filter that does just that, so perhaps we could partially eliminate this problem; after all, it is likely that a view concerned is likely within the same plugin as elgg_register_entity_type() |
This will make river views more generic and it's no longer required to provide a `view` to elgg_create_river_item fixes: Elgg#4384
This will make river views more generic and it's no longer required to provide a `view` to elgg_create_river_item fixes: Elgg#4384
This will make river views more generic and it's no longer required to provide a `view` to elgg_create_river_item fixes: Elgg#4384
This will make river views more generic and it's no longer required to provide a `view` to elgg_create_river_item fixes: Elgg#4384
This will make river views more generic and it's no longer required to provide a `view` to elgg_create_river_item fixes: Elgg#4384
This will make river views more generic and it's no longer required to provide a `view` to elgg_create_river_item fixes: Elgg#4384
Original ticket http://trac.elgg.org/ticket/4384 on 42155019-02-05 by brettp, assigned to unknown.
Elgg version: 1.8.3
River entries with invalid views (usually from disabled plugins) don't show up at all, but still create a
The text was updated successfully, but these errors were encountered: