Ticket #1418 (closed developer task: fixed)
Post from groups moving to general forum.
| Reported by: | peregri | Owned by: | mahouni |
|---|---|---|---|
| Priority: | major | Milestone: | 0.7 |
| Component: | BW Forum | Keywords: | group, forum |
| Cc: |
Description
When a post created on a group is edited, and updated, the post shows up in the general forum, out of the group.
Attachments
Change History
comment:2 Changed 2 months ago by mahouni
- Type changed from bug to developer task
It happens that groups topics disappear from groups but the topics are still in the forum. This is because the thread loses its group-id after editing.
When someone wants to edit a topic from a group, the group-id is available in forums/templates/editcreateform.php as $vars['IdGroup'].
If a new topic is created the group-id is known as $groupsforum.
So in line 194, it is asked:
if ($groupsforum)
and in line 195 value is set to $groupform if true. If $groupform is false (e.g when the topic is not in a group): value is set to 0 in line 197.
However $groupform is FALSE when editing! But if the Group-id already exists (as $vars['IdGroup'] it is NOT used in the form.
Therefore somehow after line 194 we need something like:
ELSE IF (isset($vars['IdGroup'])
and if this condition is true then set the value to the existing group-id:
value="$vars['IdGroup']"
Please note: This is just guessing and I haven't tested it, I don't have a local install of BWRox. And I don't know the correct syntax in PHP...
comment:3 Changed 2 months ago by mahouni
- Milestone changed from unassigned to 0.5.9 - bugfixing
same ticket: http://trac.bewelcome.org/ticket/1561
comment:4 Changed 2 months ago by planetcruiser
hi mahouni, thanks for looking into this. so, do i understand correctly that you won't commit a patch? if so, who will? we should only attach tickets to the next milestone if a developer committed to solve the issue until the milestone release date.
do you need help with setting up a local copy and committing a fix?
comment:7 Changed 5 weeks ago by planetcruiser
- Owner set to mahouni
- Status changed from new to assigned
- Milestone changed from unassigned to 0.7
patch looks good, please add spaces around the operators and commit.
!=0
should be
! = 0
and
'.$vars['IdGroup'].'
' . $vars['IdGroup'] . '
maybe also consider an intval() around $vars['IdGroup']
comment:8 Changed 2 weeks ago by planetcruiser
looks like this was fixed via:
- https://gitorious.org/bewelcome/rox/commit/f5c1bde34dbe523a1327326247caca301e64eed3
- https://gitorious.org/bewelcome/rox/commit/3a47f1caa80c880e5af0ea356a5e23567a056d07
has this been successfully tested on alpha yet? if yes, please close this ticket.




The post loose the reference to the group where it belongs, when the post is updated later on.