Page 1 of 1

Weird - Hesk keeps field info from earlier post?

Posted: Thu Apr 15, 2010 2:49 pm
by MonkeyButt
Script URL:
Version of script: 2.1
Hosting company: own
URL of phpinfo.php: http://www.ethoxchemicals.com/helpdesk/phpinfo.php
URL of session_test.php: http://www.ethoxchemicals.com/helpdesk/session_test.php

What terms did you try when SEARCHING for a solution: cache

Write your message below:

1st of all, pleased with HESK and it's generally working good. My issue revolves moving around the Admin area when updating tickets. Forgive the lack of correct terminology.

Scenario, a user posts a ticket, an Admin sees and opens the ticket, yet wants to modify the users post (like to modify the subject of the original post), the Admin hits Save Changes. All good...

Now, when that Admin then posts a response back to that user, the "Name" (under Date and Name) on the last post changes to whatever name was in the Name field from the previous change.

To add to that, let's say the Admin then goes to another ticket un-related, posts a comment back to the ticket, that 1st name shows as the Name on the other ticket. So it looks like Joe Blow User replied to a ticket for Jack Smith User, when really the Admin posted it.

So, I assumed it has something to with caching, something is capturing the field names and auto-adding the matching Name field, yet I can't get around it, except by keeping a junk ticket out there that had "my" name in that Name field, and modifying it to save it.

I've tried both in IE 7, IE 8, FireFox, on 2 computers get exact same results. Clearing cache of the browser would be a pain to do after each and every modified post.

Sorry that was so long, I'm no expert here. ;-) Hope someone can help.

Posted: Thu Apr 15, 2010 4:56 pm
by Klemen
I couldn't duplicate the issue on my PC or server, but I'll keep looking into it.

In the meantime see if this helps:

1. open file admin/edit_ticket.php in Notepad

2. find line 181, the one that starts with:

Code: Select all

header('Location
3. Just ABOVE that line paste this:

Code: Select all

$sql = 'SELECT * FROM `'.$hesk_settings['db_pfix'].'users` WHERE `user` = \''.hesk_dbEscape($user).'\' LIMIT 1';
$result = hesk_dbQuery($sql);
$res=hesk_dbFetchAssoc($result);
foreach ($res as $k=>$v)
{
	$_SESSION[$k]=$v;
}
unset($_SESSION['pass']);
hesk_session_regenerate_id();
if (empty($_SESSION['isadmin']))
{
	$cat=substr($_SESSION['categories'], 0, -1);
	$_SESSION['categories']=explode(',',$cat);
}
session_write_close();
4. Save changes, upload and test.

Dude you rock!

Posted: Thu Apr 15, 2010 6:24 pm
by MonkeyButt
i don't exactly understand what the heck you gave me but you're good, with my initial tests that worked like a champ in both IE and FF. I'll do some more testing and report back if I see anything else.

Thanks a ton!!!!