SimpleDesk

SimpleDesk! => SimpleDesk Support => Topic started by: UKStu on January 18, 2012, 08:02:10 AM

Title: Certain characters lead to broken tickets/pages
Post by: UKStu on January 18, 2012, 08:02:10 AM

   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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on January 18, 2012, 01:55:39 PM
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?
Title: Re: Certain characters lead to broken tickets/pages
Post by: venguard223 on January 18, 2012, 06:48:18 PM
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?
Title: Re: Certain characters lead to broken tickets/pages
Post by: dotpage on May 20, 2013, 07:00:53 PM
Curious, I am having the same issue hee with some tickets, but they were created by SD....
Title: Re: Certain characters lead to broken tickets/pages
Post by: venguard223 on May 21, 2013, 09:07:57 AM
Need more details...
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 22, 2013, 08:50:32 PM
I've been getting WSOD's on my ticket log page...

https://www.xyz.com/helpdesk/index.php?action=profile;area=hd_actionlog

But if I look at the same tickets via the main log, sorted by username, it works OK.

https://www.xyz.com/helpdesk/index.php?action=admin;area=helpdesk_info;sa=actionlog;sort=member;asc;start=17100
Title: Re: Certain characters lead to broken tickets/pages
Post by: venguard223 on May 22, 2013, 10:04:45 PM
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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 23, 2013, 11:18:32 AM
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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 23, 2013, 11:35:12 AM
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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 23, 2013, 11:53:14 AM
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
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 23, 2013, 12:12:41 PM
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%'

Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 23, 2013, 12:35:02 PM
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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: venguard223 on May 23, 2013, 12:39:09 PM
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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 23, 2013, 02:01:41 PM
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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: venguard223 on May 24, 2013, 08:19:06 PM
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.
Title: Re: Certain characters lead to broken tickets/pages
Post by: tfs on May 25, 2013, 01:21:06 PM
The log paginates when viewing the full log...

?action=admin;area=helpdesk_info;sa=actionlog

But not when viewing the individual users' help desk log...

?action=profile;u=1;area=hd_actionlog

I'm not sure if the one visible on the ticket itself paginates, though I have one with 129 entries and it's not paginating, so presumably that doesn't paginate.  I don't expect that'll become an issue for me because a single ticket is unlikely to get thousands of log entries... though of course it could happen.  However, on an individual ticket the log is displayed at the same time as the rest of the ticket, so presumably it's not quite straight forward how the pagination would mesh into the display of the rest of the ticket.

I sure miss having you around working on SD.  :)
Title: Re: Certain characters lead to broken tickets/pages
Post by: Computek on March 24, 2014, 07:48:47 PM
I Found it was because of using the Pound sign...

A way around this in the short term was to replace the symbol in the censored words area...

Obviously the pound sign in the box and the html code for the symbol in the second £

Admin - Forum - Posts and Topics - Censored Words....

The symbol is then replaced by the html code version of the symbol, which means all blank screens will know open
Title: Re: Certain characters lead to broken tickets/pages
Post by: venguard223 on April 03, 2014, 09:37:36 PM
Completely different problem. In your case you should be using UTF-8 throughout the forum as the pound sign wouldn't work properly in the main forum either.