Possible bug in File plugin in ELGG1.7

So I have noticed an odd behavior in two ELGG 1.7 sites (both upgraded from 1.6.1).  I wanted to see if anyone has seen this as well.

Basically the sub menus seems to be broken.  The statement $page_owner = page_owner_entity(); does not seem to be working because $page_owner is null and therefore the menus created using it are invalid (I have verified that $page_owner is NULL using firephp).

For example the 'Your Friends files' link takes you to 'pg/file//friends/' instead of 'pg/file/username/friends/'  .

Has anyone else seen this? 

  • So I went in and traded out all of the instances of $page_owner->name with $_SESSION['user']->username and that fixed the issue.  Any ideas why $page_owner->name is not working within the files plugin?

  • So I figured it out.  I had an old link that didn't get updated correctly after upgrading to 1.7.  The old link was to the file world view (which was mod/file/world.php).  I did noticed that the new version had a pagehandler for the world view and updated the link, just not accurately.  For some reason I simply changed the mod to a pg (pg/file/world.php) instead of to the full page handler URL (pg/file/world/world - the two 'worlds' look a bit odd to me but that is how it set up).   If you go to pg/file/world.php the file plugin loads but it is in an odd page where there is apparently no page owner. This was causing the problem I described above.