Certain characters lead to broken tickets/pages

Started by UKStu, January 18, 2012, 08:02:10 AM

Previous topic - Next topic

UKStu


   SimpleDesk version: SimpleDesk 2.0 Anatidae
   SMF version: SMF 2.0.1

   Hi,

I have noticed that when certain characters are used (slanted quotation marks and extended hyphens amongst them) within a ticket, then that ticket becomes unreadable, clicking on any link to it leads to a blank page.

Also, whatever page the ticket is listed in will also be blank.

Please advise accordingly.

tfs

The dreaded White Screen Of Death!  (WSOD)  I've not had trouble with it on those tickets entered via SimpleDesk, but I have had trouble with tickets imported from another system.  The import utility was custom written.

I'm not particularly knowledgeable about collations and things like that, but I believe it's coming into play here, as I don't get WSOD on tickets entered via the help desk.

Can you give steps to reproduce?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223

Do the same characters work properly in regular posts?

I'd be surprised if they did, the code is taken directly from SMF's own posting code. Also, anything in the error log?

dotpage

Curious, I am having the same issue hee with some tickets, but they were created by SD....

venguard223


tfs

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223

If there's a WSOD there should be an entry in the error log, either SMF's error log or the main error log.

Though I can't imagine a situation where if SMF is configured properly that SD won't adhere to that itself.

tfs

Nothing in the logs.

I decided I'd purge the help desk action log up to the beginning of the year, to rid the system of the offending entry, and I can't recall now if that's possible.  The action log has a [Empty out the entire log] option, but nothing to do a partial date based purge.  Does anyone recall if a date based purge option is in there?

There's a good chance, I believe, that this WSOD on my log is a size issue.  I've got a TON of entries.  Many x times more than anyone else.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

I can fairly well confirm that the WSOD on the individual users' action logs is a size issue, because there's no pagination on the action log when viewed for an individual user.  First I did this query in phpMyAdmin...

SELECT count( * ) , `id_member`
FROM `smf_helpdesk_log_action`
GROUP BY `id_member`
ORDER BY count( * ) DESC
LIMIT 0 , 30


Then I went down the list.  The two users with the most entries (4k & 5k) have the same problem.  The 3rd user has 1359 entries and his still works.

I'll look into crafting a delete query on those two problematic users and delete from smf_helpdesk_log_action back to the end of the year just for them.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

Hmmmm... I'll have to figure out that unix date field.

Also, I suppose there's some types of activities that I'd be more willing to delete than others.  Though the ones I'd like to keep seem to be the most populous.

SELECT count( * ) , ACTION
FROM `smf_helpdesk_log_action`
WHERE id_member =205
GROUP BY ACTION
ORDER BY count( * ) DESC
LIMIT 0 , 30


1777    newreply
702    assign
550    cf_tktchange_staffadmin
437    editticket
268    editreply
229    cf_tktchange_userstaffadmin
157    cf_rplchange_userstaffadmin
102    cf_tktchgdef_userstaffadmin
64    cf_tktchgdef_staffadmin
52    rel_linked
25    monitor
25    newticketproxy
21    urgency_increase
14    rel_duplicated
14    delete_reply
11    newticket
8    urgency_decrease
2    rel_child
2    rel_parent
2    rel_delete
2    unresolve
2    cf_rplchgdef_userstaffadmin
2    rel_re_duplicated
1    cf_tktchange_admin
1    resolve
1    restore_reply
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

If anyone's interested, the from_unixtime() function is what you need to see the log_time field in a more readable manner.  Example...

SELECT from_unixtime(log_time) as date_time, id_action, log_time, id_member, ip, action, id_ticket, id_msg, extra
FROM `smf_helpdesk_log_action`
where id_member = 205
and from_unixtime(log_time) not like '2013%'


That returns all log entries for user 205 that are not in 2013.  To delete them you'd substitute "delete" in place of "select xxx".  Such as ...

DELETE
FROM `smf_helpdesk_log_action`
where id_member = 205
and from_unixtime(log_time) not like '2013%'

A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

Quote from: UKStu on January 18, 2012, 08:02:10 AM
I have noticed that when certain characters are used (slanted quotation marks and extended hyphens amongst them) within a ticket, then that ticket becomes unreadable, clicking on any link to it leads to a blank page.

Also, whatever page the ticket is listed in will also be blank.

Please advise accordingly.

BTW UKStu, sorry for hijacking your thread with my logfile issues.  I've also noticed that certain characters will cause WSOD if embedded within a ticket.  I had lots of trouble with that initially until I reinstalled my forum and used a different character encoding... and I'm sorry, I can't remember exactly what the different was.  Was it UTF8 maybe?  Whatever it was, it did help.

The biggest trouble seemed to stem from people writing the body of the ticket in MS Word and then pasting into the ticket body.

Also, you could possibly use phpMyAdmin to fix some of these tickets.  If you could find a filter to locate them, and then use the edit ability on phpMyAdmin to remove the offending characters.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223

If the forum is set up as UTF-8 in the first instance it should never be a problem ;)

The writing-in-Word is because Word adds non-standard characters for the smart quotes.

tfs

Just one last note re logfile size... I ran this query from phpMyAdmin...

delete FROM `smf_helpdesk_log_action`
where id_member = 205
and from_unixtime(log_time) not like '2013%'
and from_unixtime(log_time) not like '2012%'


...which deleted my own entries entered before 1/1/2012, and leaves me with 3154 logfile entries.  I can now view my own log, though it takes a while to finish displaying since there's so many in the grid.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

venguard223

So the WSOD is an out of memory issue, that seems reasonable.

Definitely means ticket logs need pagination. Can't remember how much of a pain that would be to implement, I have a feeling that it doesn't use the generic list structure, which makes pagination even more of a pain.