Posts: 95
Threads: 19
Joined: Sep 2007
Reputation:
0
2010-10-24, 11:02 AM
Hi all
when i select threads for inline thread moderation, they are selected, the counter counts correctly, but when i make an action -ex. stick-, i have the following message
Quote:Sorry, but you did not select any threads to perform inline moderation on, or your previous moderation session has expired (Automatically after 1 hour of inactivity). Please select some threads and try again.
i searched and searched, tried removing google-analytics tracking code, even the theme maker -Audentio- thankfully checked personally and confirmed it's not the theme
i noticed after a refresh or even a restart of my pc, selected threads are kept selected, meaning if i select thread A, restart my pc, thread A is still selected.
any help would be much appreciated, btw quick reply works normally
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
776
2010-10-24, 11:10 AM
(This post was last modified: 2010-10-24, 11:11 AM by Matt.)
Dunno what causes this at all, but can you try the steps in this post and let me know what it writes to the file: http://community.mybb.com/thread-74132-p...#pid542306
Thanks.
Posts: 95
Threads: 19
Joined: Sep 2007
Reputation:
0
2010-10-24, 11:20 AM
(This post was last modified: 2010-10-24, 11:22 AM by ahmed1.)
i tried replacing moderation.php, didn't help
i try finding the code to replace but moderation.php on 1.6 is very different, not sure which part to replace...
function getids($id, $type)
{
global $mybb;
$newids = array();
$cookie = "inlinemod_".$type.$id;
$cookie_ids = explode("|", $mybb->cookies[$cookie]);
foreach($cookie_ids as $cookie_id)
{
if(empty($cookie_id))
{
continue;
}
if($cookie_id == 'ALL')
{
$newids += getallids($id, $type);
}
else
{
$newids[] = intval($cookie_id);
}
}
return $newids;
}
the closest thing i found, should i replace that?
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
776
2010-10-24, 11:26 AM
Err, ohh yeah that thread was on a 1.4 forum. Use this version of the function:
function getids($id, $type)
{
global $mybb;
$fp = fopen("mod_debug.txt", "w+");
$newids = array();
$cookie = "inlinemod_".$type.$id;
fwrite($fp, $cookie . "\n");
fwrite($fp, $mybb->cookies[$cookie] . "\n");
$cookie_ids = explode("|", $mybb->cookies[$cookie]);
foreach($cookie_ids as $cookie_id)
{
if(empty($cookie_id))
{
continue;
}
if($cookie_id == 'ALL')
{
$newids += getallids($id, $type);
}
else
{
$newids[] = intval($cookie_id);
fwrite($fp, $cookie_id . "\n");
}
}
fclose($fp);
return $newids;
}
Posts: 95
Threads: 19
Joined: Sep 2007
Reputation:
0
2010-10-24, 11:35 AM
i substituted this
function getids($id, $type)
{
global $mybb;
$newids = array();
$cookie = "inlinemod_".$type.$id;
$cookie_ids = explode("|", $mybb->cookies[$cookie]);
foreach($cookie_ids as $cookie_id)
{
if(empty($cookie_id))
{
continue;
}
if($cookie_id == 'ALL')
{
$newids += getallids($id, $type);
}
else
{
$newids[] = intval($cookie_id);
}
}
return $newids;
}
with
function getids($id, $type)
{
global $mybb;
$fp = fopen("mod_debug.txt", "w+");
$newids = array();
$cookie = "inlinemod_".$type.$id;
fwrite($fp, $cookie . "\n");
fwrite($fp, $mybb->cookies[$cookie] . "\n");
$cookie_ids = explode("|", $mybb->cookies[$cookie]);
foreach($cookie_ids as $cookie_id)
{
if(empty($cookie_id))
{
continue;
}
if($cookie_id == 'ALL')
{
$newids += getallids($id, $type);
}
else
{
$newids[] = intval($cookie_id);
fwrite($fp, $cookie_id . "\n");
}
}
fclose($fp);
return $newids;
}
moderation.php comes as white page, reuploaded fresh one and same problem
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
776
2010-10-24, 11:40 AM
(This post was last modified: 2010-10-24, 11:40 AM by Matt.)
Try and perform inline moderation again, it'll probably say you've not selected anything, but it'll write some debug stuff to a text file whilst doing it..
Posts: 95
Threads: 19
Joined: Sep 2007
Reputation:
0
2010-10-24, 11:48 AM
(This post was last modified: 2010-10-24, 11:48 AM by ahmed1.)
tried again, apparently wrong copy/paste sorry
so the file contains
inlinemod_forum35
Posts: 3,660
Threads: 137
Joined: Dec 2009
Reputation:
80
2010-10-24, 11:52 AM
Who is your host? I'm just wondering if the OP of the thread Matt linked you to was/is using the same host.
Posts: 95
Threads: 19
Joined: Sep 2007
Reputation:
0
2010-10-24, 11:55 AM
i have shared hosting through eblanet.net, they have servers from teliasonera as i guessed from a tracert
Posts: 37,498
Threads: 399
Joined: Apr 2008
Reputation:
776
2010-10-26, 11:10 AM
Hmm, same as the last person who had this.
What's weird here is that the javascript is reading the cookie fine. When you said you reloaded the page or even restarted your computer and they were still selected, that's because the javascript was reading the cookie and auto-selecting the ones you selected before. But, for some reason, very rarely, the PHP won't pick these cookies up, and it's only these ones.
Will continue to investigate.
|