The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Upgrade to 2.1 sorting issue on "added" column - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: Installation (https://forums.formtools.org/forumdisplay.php?fid=4) +--- Thread: Upgrade to 2.1 sorting issue on "added" column (/showthread.php?tid=1537) |
Upgrade to 2.1 sorting issue on "added" column - moorezilla - Aug 15th, 2011 Hi Ben, Congrats on the release of 2.1! Very exciting developments! I just updated a previous Form Tools install and it seems to have gone smoothly, but when I view prior submissions, clicking on the "Added" column does not seem to reorder submissions according to their timestamp. You have some notes about changes to "date" fields, but I don't see anything that would affect this field. When I look at the field itself, the added field is "core__submission_date" and it is a textbox field, rather than a time field. Not sure if that's an/the issue. Thanks in advance. RE: Upgrade to 2.1 sorting issue on "added" column - Ben - Aug 15th, 2011 Hi Andy, Thanks! I can't tell you how nice it is to finally get it out there. Quote:When I look at the field itself, the added field is "core__submission_date" and it is a textbox field, rather than a time field. Not sure if that's an/the issue. Yes, that'll be the problem. If it thinks it's a textbox field, the sorting wouldn't working properly. Unfortunately, the only way to solve this will be to change the field_type_id value for the field record in the ft_form_fields table. Change it from 1 to 9 (I think... double check that, though - just look for the ID of the Date field in the ft_field_types table). Curious that this problem didn't arise with other upgrades, but it's possible I missed something. I'll look over the code now! Thanks! ![]() - Ben RE: Upgrade to 2.1 sorting issue on "added" column - moorezilla - Aug 15th, 2011 Uh oh. I went to the "Fields" area and changed the Textbox to Time for the core_submission_date "added" form field, but after doing so, all the Added values on the form seem to be set to "2" when viewed. [attachment=131] [attachment=132] RE: Upgrade to 2.1 sorting issue on "added" column - Ben - Aug 15th, 2011 Okay, so for some reason, that field wasn't marked as a system field in the database. That's bad. Don't worry about the "2" - the Time field type is just getting confused - that's fine. So don't do any more editing of the fields within the interface - this is a problem with the field, and updating it further through the UI will only make it worse. You need to do two things: 1. Do as described in my last post: go into the DB and change the field_type_id for that form field to "9" so it's marked as a Date (just FYI, the Dates field type include datetimes, so once this is all repaired, you can just tell it to output the result in whatever format you want). 2. Also change the field so the "is_system_field" is set to "yes". That will prevent it's field type from being further editable - which is how it SHOULD be. Also, you'll need to do the same change for the Last Modified field. That's a core field as well and needs the same change. I looked over the upgrade code and can't see any problems, but obviously I'm missing something. Q: do you have the database backed up? If so, any chance you could send it to me so I could upgrade it myself to see where things went wrong? - Ben RE: Upgrade to 2.1 sorting issue on "added" column - moorezilla - Aug 15th, 2011 Yep... I've got a backup. Taking a look at the database now. Database on its way. Have to put my daughter to sleep... be back in a bit. RE: Upgrade to 2.1 sorting issue on "added" column - Ben - Aug 15th, 2011 Awesome, thanks Andy! ![]() - Ben RE: Upgrade to 2.1 sorting issue on "added" column - Ben - Aug 15th, 2011 Again, a big thanks, Andy. I've patched 2.1.0 with the fix. Let me know if that SQL doesn't work. - Ben |