-
Notifications
You must be signed in to change notification settings - Fork 3
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
get_related_items sometimes returns an Array #4
Comments
oh ok, i haven't seen that here. is there any particular pattern to this? the line in the code that outputs that link is:
i am not aware of why the array would be treated as an array variable instead of using it's contents by elgg_echo. do you know? |
The pattern is yet unclear. I just did a shallow research and total_related_items uses get_related_items which has the option to count. I think that that option is not always used for all subtypes. Maybe use something like $count = count(elgg_get_entities_from_metadata($options). but I have not tested that. |
i looked through the functions being used and i am not detecting any reason as to why count would not apply to particular sub-types. why do you think that this may be the case? i think the issue is more likely to be due to some type of type mis-match within my code, though i am not clear on where yet. |
You are right that count should be applied to all subtypes. It was a guess, because a lot of functions were called and maybe I overlooked one. |
In some views the link "View all %s related items" sometimes shows "View all Array related items "instead of the number.
The text was updated successfully, but these errors were encountered: