The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.31 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.31 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
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! Smile

- 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! Smile

- 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