Skip to content
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

Error with activity river when not logged in #5

Open
poVoq opened this issue Sep 12, 2013 · 6 comments
Open

Error with activity river when not logged in #5

poVoq opened this issue Sep 12, 2013 · 6 comments
Assignees

Comments

@poVoq
Copy link

poVoq commented Sep 12, 2013

I am using the git version, but when I am not logged in and visit the activity page this happens:

Fatal error: Call to a member function getURL() on a non-object in /home/XXXXX/public_html/Elgg/mod/elgg-brainstorm/views/default/river/object/brainstorm/under_review.php on line 27

Seems to be a result of the changes in the under-review tab or so...

Thanks for fixing it.

@poVoq
Copy link
Author

poVoq commented Sep 16, 2013

Also happens in the brainstorm menu section itself.
Maybe it is related to the fact that I created that brainstorm entity with the previous version of elgg_brainstorm?

Edit: deleting the old and creating a new "under review" item creates the same error. Maybe it is due to the fact that the brainstorm item was created in a closed group and with restricted view options?

@poVoq
Copy link
Author

poVoq commented Sep 16, 2013

Ok, I think it might be related to the fact that in the git version I am using the "access level control" dropdown box is missing, and thus the new ideas in the closed group automatically get the accesslevel "public", but then are obviously only accessible by users that are member of the original closed group, or something like that.

@ManUtopiK
Copy link
Member

Thank's for your feedback !
I hope your problem will be solved with this commit.

I want to know which version of Elgg you use ?

@poVoq
Copy link
Author

poVoq commented Oct 3, 2013

I am using version 1.8.14.

Will try the new git version :)

@poVoq
Copy link
Author

poVoq commented Oct 3, 2013

ONLY PARTIALLY FIXED :(

The activity/river view bug seems to have been fixed now, but is shows ideas from

invisible groups (I think that's a group_tools plugin feature?) which is not quite

perfect... and I just noticed that clicking on the link of that idea (of the closed

group) then also still redirects you to a error (same as below).

However the /brainstorm/all page still breaks for non logged-in users:

Fatal error: Call to a member function canWriteToContainer() on a non-object in /home/XXX/public_html/Elgg/mod/elgg-brainstorm/views/default/object/idea.php on line 114

I guess an standard elgg "access" dropdown would be nice to have (and will probably fix

quite a few issues), so that certain idea are only visible to group-members etc.

The admin panel should also have plugin settings page to set a standard for displaying the

separated tabs etc. instead of having to set it for every group individually would be

great (my site has over 400 groups).

Last but not least: It still needs an "brainstorm:filter:finished" entry in the language file. In the settings

view a lot of language file parts are also missing (in en.php at least).

Keep up the great work! When the issues are fixed, this will be an extremely nice plugin for elgg!

@CamilleTrd
Copy link

The problem with the river comes from the fact that the object idea is public so it will display the river activity log to everyone but as it needs to be nested in a group if the user is not part of the group it can't access it and the error comes again.
so you need to set in the idea creation page : (in actions -> saveidea.php)
//access only to group as need to create idea in group
$idea->access_id = $container->group_acl;

(and editidea.php)
ln 25 $container_guid = get_input('container_guid');
ln 24 $container = get_entity($container_guid);
(..)
ln 39 $idea->access_id = $container->group_acl;

another change needed is for every river view file (completed, declined, open, planned, started, under_review) :
and delete $subject_link and $object_link -> not necessary the engine do that for you.

if($container){
$group_link = elgg_view('output/url', array(
'href' => $container->getURL(),
'text' => $container->name,
'is_trusted' => true,
));
$group_string = elgg_echo('river:ingroup', array($group_link));
}

I noticed as well that another member of a group can't change the status of its own idea if he is not admin... So as we just changed the permission to all members of the group only, we can now delete the verification in the form edit idea.php
ln 36 if ($group->canEdit()) { (..) }

So after those changes, only the user that can edit in the group receive the river log and they can access the idea and edit it.

hope it helps

@ManUtopiK ManUtopiK self-assigned this Mar 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants