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

Group Forum Topic Edit/Delete Broken! (Trac #1369) #1369

Closed
elgg-gitbot opened this issue Feb 16, 2013 · 4 comments
Closed

Group Forum Topic Edit/Delete Broken! (Trac #1369) #1369

elgg-gitbot opened this issue Feb 16, 2013 · 4 comments

Comments

@elgg-gitbot
Copy link

Original ticket http://trac.elgg.org/ticket/1369 on 39873392-12-10 by trac user edfactor, assigned to unknown.

Elgg version: 1.6

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

Attachment added by trac user edfactor on 39873395-07-05: topic.php

@elgg-gitbot
Copy link
Author

Attachment added by trac user edfactor on 39873398-06-16: 1128_viewposts_fix.diff

@elgg-gitbot
Copy link
Author

trac user darkwingduck wrote on 39897519-06-14

I was going to report this.

Also, I think the thread should be deleted when the last post is deleted.

@elgg-gitbot
Copy link
Author

brettp wrote on 40085116-12-21

Moved to http://trac.elgg.org/extensions/ticket/288

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

No branches or pull requests

1 participant