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

groups: Can't edit or delete group forum discussion object (Trac #1856) #1856

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 3 comments
Closed
Labels
Milestone

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/1856 on 40085116-08-28 by brettp, assigned to unknown.

Elgg version: 1.7

(Copied from http://trac.elgg.org/elgg/ticket/1369)

In Group Discussions (forums), there is a serious problem that only appears to be a minor problem:

Topics (entities that start discussions) and Posts (which are annotations to discussions) are different things. Also, the initial text of a topic is an annotation of the topic, which is different than the Post annotations.

Here is what goes wrong:

  1. You create a topic 2. You decide to alter it 3. You hit the delete button. You get a message saying the "post" is deleted - but it wasn't a post! 4. You see that the topic title is there. You go to discussions and see it's gone, but... it's still in the river, and if you tagged that post, it will come up when you search by tag. 5. If you chose edit, that also doesn't work. You can only edit the text of the topic, and not the title or tags.

So what explains this behavior?

The Edit/Delete links on the Topic don't work because they lead to the edit and delete functions for posts. But the posts are annotations and not entities (like topics). You can edit the text because the system says, "change the text for the annotation with this ID" using the post functionality. It then calls an update on the annotation of the topic (which isn't a post) but the update works as it doesn't check to see if it's a post you're updating.

So what's the solution to all this?

  • You need a new "view" ( a file ) for topic that isn't the view for the post, and those edit/delete links need to result in editing and deleting the topic. (attaching this file, needs to go in /mod/groups/views/default/forum)
  • You need a change to the viewposts.php file to direct you to that correct view. (patch included for that and nice divs for striping)

I realize this is a lot of text for this report, but my wife Maureen found this and put a lot of effort into fixing the problem. (I have the Trac account, so I filed it)

I have tested this, and it works. Also, when you add these fixes, you must either hit upgrade.php or do something to clear the view cache as you have a new file (topic.php) that Elgg doesn't know about.

@elgg-gitbot
Copy link
Author

cash wrote on 40305919-09-24

The group discussion listing page needs to display an edit link (I think it already has a delete link - which may not work).

I think it would be best if the edit/delete links on the first annotation went to the topic edit form rather than allowing the user to just delete/edit the first annotation. Users expect that.

@elgg-gitbot
Copy link
Author

Milestone changed to Elgg 1.7.2 by cash on 40305919-09-24

@elgg-gitbot
Copy link
Author

cash wrote on 40503921-01-17

(In [svn:6608]) Closes #1856 - forum topics can now be edited

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant