Entry tags:
Difference between icon selection when posting and when editing a post
A while back I tackled a bug in which icons could not have "0" as a keyword. The problems were all caused by the fact that perl treats "0" as false, so a lot of checks for the existence of a keyword on the icon were failing.
Having fixed that particular problem a host of others have been revealed when someone tries to use an icon with a 0 keyword and I've been working through these.
At present, in my dreamhack, it is possible to make a post with a 0-keyword-icon selected and view that post. However if you then try to edit the post the icon gets replaced by the default icon, and if, in the edit page, you attempt to select a 0 keyword icon, it doesn't get attached to the post in the database.
I'm tearing my hair out over this because I can not identify how icon selection differs in the edit form from the post form. The bug appears both using the new and old versions of the post form so I'm assuming it isn't in the javascript or template toolkit and I'm going cross-eyed grepping the codebase.
One of my problems is I'm not even entirely clear where may be a good point to start inserting some "warn" statements, or how to simulate post editing within the test suite.
Any hints, suggestions or pointers much appreciated.
Having fixed that particular problem a host of others have been revealed when someone tries to use an icon with a 0 keyword and I've been working through these.
At present, in my dreamhack, it is possible to make a post with a 0-keyword-icon selected and view that post. However if you then try to edit the post the icon gets replaced by the default icon, and if, in the edit page, you attempt to select a 0 keyword icon, it doesn't get attached to the post in the database.
I'm tearing my hair out over this because I can not identify how icon selection differs in the edit form from the post form. The bug appears both using the new and old versions of the post form so I'm assuming it isn't in the javascript or template toolkit and I'm going cross-eyed grepping the codebase.
One of my problems is I'm not even entirely clear where may be a good point to start inserting some "warn" statements, or how to simulate post editing within the test suite.
Any hints, suggestions or pointers much appreciated.