The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (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.27 (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.27 (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.27 (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.27 (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.27 (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.27 (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 property: MyLanguage::$archive_pages - Line: 2 - File: printthread.php(257) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/printthread.php(257) : eval()'d code 2 errorHandler->error
/printthread.php 257 eval
/printthread.php 117 printthread_multipage
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Ordering of columns lost when exporting data - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: Ordering of columns lost when exporting data (/showthread.php?tid=1394)

Pages: 1 2


Ordering of columns lost when exporting data - Mark - Jun 20th, 2011

Hi Ben,

Just a minor thing I've noticed in '2.1.0-beta-20110619':

The Export Module doesn't seem to take into consideration the order of columns. For example in the web-view (submissions.php) they are nicely formatted as specified in the View configuration, such as:

Column 1 | Column 2 | Column 3 | Column 4

However when exported via the HTML / Printer-friendly or Excel options this ordering is lost and is pretty much randomised:

Column 1 | Column 4 | Column 3 | Column 2

I had a brainwave that perhaps the Export tool orders the columns by initial creation date, however even when I recreated them in the order I wanted, they still appeared randomly when exported.

- Mark



RE: Ordering of columns lost when exporting data - Ben - Jun 20th, 2011

Yeah, this isn't terribly clear, is it? When I added in the new Columns section I wondered about this.

The columns only determines what appears on the Submission Listing page. The printer-friendly + Excel need to show ALL fields in the View, so they pull the column order from the Edit View -> Fields tab, not the Columns tab.

Does that explain the ordering, or is it not even consistent with the order of your View fields?

- Ben


RE: Ordering of columns lost when exporting data - rnog - Jun 20th, 2011

Hello,

I had exactly the same problem as Mark.
It happened when I update version 2.1.0-beta-20110616 to 20110619.

I take this opportunity to ask how these updates should be made. I used an ftp program and copied the entire directory, deleting the folder "install" file and copying the old config.php

Regards

Rui


RE: Ordering of columns lost when exporting data - Mark - Jun 21st, 2011

Hi Ben / Rui,

(Jun 20th, 2011, 9:28 AM)Ben Wrote: The printer-friendly + Excel need to show ALL fields in the View, so they pull the column order from the Edit View -> Fields tab, not the Columns tab.

Does that explain the ordering, or is it not even consistent with the order of your View fields?

Unfortunately the ordering is still inconsistent even when I reorder the rows in the 'Fields' tab.

(Jun 20th, 2011, 4:01 PM)rnog Wrote: I used an ftp program and copied the entire directory, deleting the folder "install" file and copying the old config.php


I am also replacing all files via FTP, with the exception of the 'install' folder and 'config.php'.

- Mark


RE: Ordering of columns lost when exporting data - Ben - Jun 22nd, 2011

Weird...! I don't remember changing anything that would affect this. I'll check over the code today and let you know.

Thanks for letting me know, guys!

- Ben


RE: Ordering of columns lost when exporting data - Mark - Jun 22nd, 2011

(Jun 22nd, 2011, 4:20 AM)Ben Wrote: I'll check over the code today and let you know

Hi Ben,

As before, if you would like access to our test-rig where the problem is current, just PM me.

- Mark



RE: Ordering of columns lost when exporting data - Ben - Jun 22nd, 2011

Hey Mark,

Thanks! Yeah, it may come down to that. Just a couple of questions / things to try first.

So the code looks fine - I haven't changed anything since 20110616, so it's something else.

1. What browser & OS are you using? Reason I ask is that the only thing determining the order of those fields is the list_order database field in the view_fields table. If there's a JS error in the Edit View page, it's possible the ordering is somehow getting messed up in the DB. Beyond that, I don't see a cause.

2. Could you try this: go to your Edit View -> Fields page, and just click "Update". Then, in a different tab, go to the Submission Listing page and export the results.

Still out of order?

- Ben




RE: Ordering of columns lost when exporting data - Mark - Jun 22nd, 2011

Hi Ben,

I'll give it a go and let you know.

Thanks mate,

- Mark


RE: Ordering of columns lost when exporting data - Mark - Jun 23rd, 2011

Hi Ben,

I have found the problem!! Allow me to explain with an example;

For one of my Form views (via the 'Views' tab > 'Fields' mini-tab) I have 5 visible fields displayed over two groups:


======= GROUP 1 =======

ORDER / FIELD NAME
------------------------
1 / Day
2 / Status
3 / Open Time
4 / Close Time

======= GROUP 2 =======

ORDER / FIELD NAME
------------------------
1 / Special Notes


When I export this to a printer friendly view via the Export Manager, they are displayed in the following order:

1. Day - [from group 1]
2. Special Notes - [from group 2]
3. Status - [from group 1]
4. Open Time - [from group 1]
5. Close Time - [from group 1]

This is because the Day field from GROUP 1 and the Special Notes field from GROUP 2 both have an order/sort ID of '1', and therefore they are paired together. The remaining fields from GROUP 1 are displayed after this.

Would it therefore be possible to modify the coding to take the Group order into consideration? Perhaps by prefixing it with hidden letters? e.g. For my example they would appear:


======= GROUP 1 =======

ORDER / FIELD NAME
------------------------
A1 / Day
A2 / Status
A3 / Open Time
A4 / Close Time

======= GROUP 2 =======

ORDER / FIELD NAME
------------------------
B1 / Special Notes


B1 would surely proceed A4 in this example? I'm sure there is technically a better way to resolve this but I lack advanced PHP skills!

Hope my explanation makes sense.

- Mark


RE: Ordering of columns lost when exporting data - Ben - Jun 23rd, 2011

Ahhhh! Of course, yes this makes perfect sense now. Bah, I should have spotted it!

And absolutely: the script should take into account the groups, so it would order the fields as they appear in the page 1-4 in group 1, then 1-4 in group 2.

Thanks for taking the time to get to the bottom of it! I'll include this in the next build.

- Ben