We have moved to Github. Please open tickets there.

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#2641 closed Defect (fixed)

Issue with ELGG - Files - Friends' Files - subtype menu

Reported by: kienvu Owned by: cash
Priority: normal Milestone: Elgg 1.7.5
Component: Core Version: 1.7
Severity: minor Keywords: Files, Friends' Files, subtype menu
Cc: brettp Difficulty: trivial

Description

We experienced a issue with ELGG - Files - Friends' Files - subtype menu:

*
These are steps to re-produce it.

Logged into ELGG

Go to Tools - Files

Go to Your Friends' Files - http://ELGGSITE/pg/file/acarer/friends/
Files show up

Click on All - http://ELGGSITE/mod/file/search.php?subtype=file&md_type=simpletype&tag=video&friends_guid=8532&page_owner=8532

NOTHING shows up

*
I have looked at the core code and regconize the error from function elgg_normalise_plural_options_array($options, $singulars) in /engine/lib/elgglib.php

The reason is: the function elgg_get_entities() has problem if the owner_guid is an array of array( this is caused by the elgg_normalise_plural_options_array() function.

*
To fix this we change the code in function elgg_normalise_plural_options_array($options, $singulars) in /engine/lib/elgglib.php

Need to change the old code from :

$options[$plural] = array($options[$singular]);

To

if(!is_array($options[$singular])) $options[$plural] = array($options[$singular]);

else $options[$plural] = $options[$singular];

Change History (3)

comment:1 Changed 3 years ago by cash

  • Difficulty set to trivial
  • Milestone changed from Needs Review to Elgg 1.7.5
  • Owner set to cash
  • Status changed from new to assigned

Confirmed. Thanks for looking into this!

comment:2 Changed 3 years ago by cash

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [svn:7295]) Fixes #2641 was not checking for arrays in singular test

comment:3 Changed 3 years ago by cash

(In [svn:7296]) Refs #2641 merged [svn:7295] into trunk

Note: See TracTickets for help on using tickets.