You are not logged in.
- Topics: Active | Unanswered
#1 2021-01-09 00:53:13
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
moderators move topics - empty list of topics
Offline
#2 2021-01-09 12:07:43
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
Offline
#3 2021-01-09 13:27:33
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,465
- Website
Re: moderators move topics - empty list of topics
Give the moderator rights to multiple forums and check again.
query https://github.com/fluxbb/fluxbb/blob/m … e.php#L489
print https://github.com/fluxbb/fluxbb/blob/m … #L516-L530
My modification of FluxBB 1.5.11 - rev.82, Parserus, UserAgentAnalyzer
I speak only Russian
Offline
#4 2021-01-09 14:52:05
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
Re: moderators move topics - empty list of topics
Thanks for your help !
I already tried with a new moderator, giving moderation right to multiple forums, with no success.
I also tried a fresh moderate.php, no success either, same behaviour.
From what I can understand from your links, I don't see any difference in the list generation between moderator and admin.
I have no warning of "Nowhere to move", meaning the list is not empty. It 's just not displaying...
I'll have to search a bit more.
Edit: I tried with "moderate.php" from you link and it's working as it should. Perfect.
Offline
#5 2021-01-09 15:18:45
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,465
- Website
Re: moderators move topics - empty list of topics
And before that, what version did you use, where moderate.php does not work correctly?
Was this the original FluxBB or my build? And the version number?
My modification of FluxBB 1.5.11 - rev.82, Parserus, UserAgentAnalyzer
I speak only Russian
Offline
#6 2021-01-09 19:52:16
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
Re: moderators move topics - empty list of topics
I tried to compare each version to have a better idea:
- The version I used to use was a 1.5.11 original where I added a lot of the github improvement ( using with php7.2)
- I then tried a original 1.5.11 wich was doing same result
- Then I gave a go to the file you pointed, and it surprised me but it seems to do the job.
The version I used was not far from it, you can take a look here
https://controlc.com/3a9b5274
Offline
#7 2021-01-11 00:07:39
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
Re: moderators move topics - empty list of topics
So I kept the github master branch where the list was diplayed:
- had to clean the has_row and generate_crumb for which my forum doesn't have support yet.
The only difference with my file was line 501 to 506
$forums = array();
while ($row = $db->fetch_assoc($result))
$forums[] = $row;
if (count($forums) < 2)
instead of
if ($db->num_rows($result) < 2)
and line 528
foreach ($forums as $cur_forum)
instead of
while ($cur_forum = $db->fetch_assoc($result))
and with this changes, moderators have the drop down list filled when moving topics.
everything works as intended , except the split fonction, same issue.
working perfect for administrator, "move to" drop down list is empty for moderator.
By looking at code, I can see the same while loop .
So I added
$forums = array();
while ($row = $db->fetch_assoc($result))
$forums[] = $row;
on line 220
and replaced the while loop line 241 by
foreach ($forums as $cur_forum)
and... Tada !! drop down list is filled for moderator.
I'm way beyond my understanding but this seem to do the trick.
Seem the While loop is kind of buggy, I suppose it's the same for everyone, kind of a bug ?
Offline
#8 2021-01-11 03:50:44
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,465
- Website
Re: moderators move topics - empty list of topics
There is no error in the while loop.
You cannot use one file from one version and all others from another.
My modification of FluxBB 1.5.11 - rev.82, Parserus, UserAgentAnalyzer
I speak only Russian
Offline
#9 2021-01-11 11:30:16
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
Re: moderators move topics - empty list of topics
I just used the other version file as a "whynot" desperate test... and the drop down list magicaly appear for moderator.
(other functions where not working).
I don't fully understand the php/sql stuff, but i'm not dumb either.
By comparing the two files
The issue is/was this while loop, don't know why...
With one the drop down list appear only for admin, with my modification both admin and moderator can use the split and move moderation functionnality.
I'd like to understand why, but anyway i'll leave it like that: everything is working as it should, I'll understand another day.
I'll try with an all new forum when I'll got time to see if it's a bug in 1.5.11 version
Last edited by Elementair (2021-01-11 11:33:14)
Offline
#10 2021-01-11 12:15:38
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,465
- Website
Re: moderators move topics - empty list of topics
Maybe had PHP or MySQL updated and after that a glitch appeared?
My modification of FluxBB 1.5.11 - rev.82, Parserus, UserAgentAnalyzer
I speak only Russian
Offline
#11 2021-01-11 12:28:51
- Visman
- Member
- From: Siberia
- Registered: 2010-07-10
- Posts: 1,465
- Website
Re: moderators move topics - empty list of topics
The problem with while() may be that, for some reason, the internal pointer $result is shifted to the end, as a result of iterating over the strings, there are no strings, false is returned immediately.
Before the problematic
while ($row = $db->fetch_assoc($result))
add
mysqli_data_seek($result, 0);
for test.
My modification of FluxBB 1.5.11 - rev.82, Parserus, UserAgentAnalyzer
I speak only Russian
Offline
#12 2021-01-11 13:03:23
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
Re: moderators move topics - empty list of topics
I don't know when the glitch appeared cause I tested all those fonctions with the admin account, never really tried with the moderator account.
One of the moderators tried to move a discussion last week and discover this.
I suspect the glitch is here since update from 1.2.16 to 1.5.11 in March 2020.
I tried to add
mysqli_data_seek($result, 0);
with no result; admin can see the drop down list, moderator can't
Offline
#13 2021-01-11 13:08:55
- Elementair
- Member
- Registered: 2020-02-28
- Posts: 39
Re: moderators move topics - empty list of topics
The problem is I don't see any difference between moderator and admin from the point of this loop.
I should try to make a dump of that list to see what's in it when a moderator use it. (maybe there's a buggy character that prevent the display).
Offline