When editing a table and attempting to change a column title this was dumped onto the page without committing the change:

Array
(
    [name] => Peer to Peer
    [desc] => 
    [order] => asc
    [column] => Array
        (
            [0] => Array
                (
                    [data] => Feature
                    [weight] => 0
                )

            [1] => Array
                (
                    [data] => Usenet
                    [weight] => 1
                )

            [2] => Array
                (
                    [data] => BitTorrent
                    [weight] => 2
                )

            [3] => Array
                (
                    [data] => Limewire etc.2
                    [weight] => 3
                )

        )

    [default] => 0
    [tid] => 2
    [op] => Save
    [form_build_id] => form-744690b235a333d5a0ebe0643c0b7b84
    [form_token] => b4681a963eec5a6ce3f7fe38f1c1d499
    [form_id] => tablemanager_table_edit
)

No php errors where thrown up.

Thanks for the great module and all your work!

Comments

tseven’s picture

Ok, with a little poking around I found the line of code causing this:

Line 380 of tables.inc

 function tablemanager_table_edit_submit($form, &$form_state) {
  $form_state['storage'] = $form_state['values'];
  // organise default sort radio button
//  if ($form_state['clicked_button']['#post']['default'] >= 0) {
   print_r($form_state['clicked_button']['#post']);  < - - - - - - - - - - - - This is the the culprit
//  }
  if (preg_match("/^delete_(\d+)$/i", $form_state['clicked_button']['#name'], $match)) {
    unset($form_state['storage']['column'][$match[1]]);
    // check to see if all columns are to be deleted
    if (count(element_children($form_state['storage']['column'])) == 0) {
      // redirect to table delete
      drupal_goto('admin/content/tablemanager/table_delete/table-'. $form_state['values']['tid']);
    }
  }

} // tablemanager_table_edit_submit

I've tried, but don't know enough about what's going on to write the missing code to submit the data. Any tips or advice would be appreciated.
Thanks

pobster’s picture

Hiya, apologies but afraid that's not a bug - it's simply unfinished! (The print_r statement is there for debugging reasons) The code has been in dev an awful long time now as I've simply not had any spare time to be able to work on it as my current job extended its opening hours from 7am - 6pm to now, 1am - 9pm.

However... My work PC went pop yesterday and I'm unable to work at all as I've no back up machine (requires Windoze and I'm writing this on a PPC iMac) and well seeing as work is the cause of my lack of spare time, I'm therefore going to have a little spare time on my hands right now! So I *may* resume progress of a few modules here and there before I decide what new PC to buy... That said I've hopefully got an interview for a Drupal position in the week, so maybe if I can get something which is normal working hours again - I'll be able to have a bit more spare time permanently to devote to finishing my projects.

Pobster

tseven’s picture

I figured as much :)

Sorry to hear about the pc issues. I hope things work out with the job.

Hopefully this module will be completed, I'd like to use it in all of it's editing glory.

Thanks for you work so far.

pobster’s picture

Status: Active » Closed (fixed)

I'm going to close this as it's not really a bug (etc, see above) and I'm going to hopefully soon get another chance to get some more of this module finished/ rewritten.

Thanks,

Pobster