e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
321 stars 213 forks source link

Subforum not moving together with parent forum #3545

Open wrxxy opened 5 years ago

wrxxy commented 5 years ago

Everytime i try to move/manage forum/subforums orders they stop working with v2 and link back to forum, it used to work with v1 but no longer..... I am not sure if this has to do with my v1 to v2 update but the problem has been there since update.. not sure how to fix as I am no guru but just wondering if anyone can help.... there may be other issue's opened due to this

image

Moc commented 5 years ago

they stop working with v2 and link back to forum,

Can you elaborate in 'stop working'? What exactly happens. Do you have issues with the URL? Do you get any errors? Can you show us an example?

wrxxy commented 5 years ago

Not sure how to explain but when I move a parent forum should'nt the subforums under those move also? as this doesn't happen. I get no errors its just I am not able to access those forum, as link, links back to main forum. That's probably my best explanation...

wrxxy commented 5 years ago

You actually need to see it while trying to manage forum order...

Moc commented 5 years ago
  1. Subforums do not move together with parent. Confirmed. Seems like a bug, or missing functionality. @Deltik Any thoughts on this? Not developed yet, or bug?

  2. Links not working. Cannot reproduce yet. You mean the link on the frontend of your website? What is the URL it links to?

wrxxy commented 5 years ago

Yes links back to frontend back to main forum from memory....

Moc commented 5 years ago

So it would be interesting to know what the actual link is that is rendered. Is your website public so I can see what's going on?

wrxxy commented 5 years ago

yes its up www.outlawsracing.com i have contacted you on gitter....

Moc commented 5 years ago

I'm limiting this issue to just the first problem described above. The issue of the links not working is discussed here: https://github.com/e107inc/e107/issues/3521

Deltik commented 5 years ago

@Moc: It looks like the forum parent-child relationship structure changed from e107 v0.8 to e107 v2.1, and now, the structure is stuck in a limbo where items can have a "Parent" parent and a "Sub-forum" parent. These aren't validated and a forum can be configured to have contradictory parents by moving the forums' inheritances around.

Walking back in time, I noticed that the tree model display format has never coped with this multi-parent concept correctly.

Apparently, the forum plugin has not ever abstracted forum items properly, but in e107 v0.7, it was hacked to work by having "Parent" parents sit at the top, "Forum" parents sit at the second level, and "Sub-forums" fill the third level.

Moc commented 5 years ago

For me now the subforums appear to be moving with the parent.

E.g.

Parent 1

Child 1.1

Subforum 1.1.1

If i change the order of Parent 1, with another Parent (e.g. Parent 2), both Child 1.1. and Subforum 1.1.1 seem to move correctly along.

Were there any changes on this recently?

Deltik commented 5 years ago

@Moc: In your example structure, "Child 1.1" should actually be the child of "Subforum 1.1.1".

Now, it is true that you can change the order by dragging the re-order bar, but even though it's changing in the backend, the children are not being reordered with it.

To make things more confusing, if "Child 1.1" does not have matching "Parents" and "Sub-forum" fields or even if the "Parents" field is omitted, it will be represented confusingly in the tree list.

Moc commented 5 years ago

@Deltik I just came across this when testing a v1 forum upgrade to v2.

On v1, I created Parent 1, Child 1.1 and Subforum 1.1.1 and subforum 1.1.2. In v1, there is only one way to add a subforum, and that is to click on the forum (1.1), so I am sure that this is the right hierarchy.

This is how it looks after the v2 update:

All forums: image

Subforum 1.1.1: image

I then used the blue arrows to drag and change the order of the subforums (changing around 1.1.1 and 1.1.2). This works fine.

Now, when I move child 1.1 and 1.2 around. The issue starts occurring:

image

The subforums 1.1.1 and 1.1.2 are not moving together with child 1.1.

The frontend still works fine: image

Hope this helps to illustrate the problem

CaMer0n commented 5 years ago

@Moc This will likely be solved with changes to: public function afterSort($result, $selected) in forum_admin.php line 317. Ie. check if the moved item has children and update their values in the db.