To reproduce this bug, go to a product edit form, click on "Options" tab, after adding several attributes, and this error appears :

Fatal error: Unsupported operand types ubercart/uc_attribute/uc_attribute.admin.inc on line 1003

PHP 5.3

To remediate this error, go to line 1003, on uc_attribute.admin.inc et replace

$header = array(array('data' => '  ' . t('Options')) + theme('table_select_header_cell'), t('Default'), t('Cost'), t('Price'), t('Weight'), t('List position'));
  $table_id_num = $tables = 0;

by

$header = array(array('data' => '  ' . t('Options')) . theme('table_select_header_cell'), t('Default'), t('Cost'), t('Price'), t('Weight'), t('List position'));
  $table_id_num = $tables = 0;

Best regards

CommentFileSizeAuthor
#4 914060_options_select.patch4.76 KBIsland Usurper

Comments

Island Usurper’s picture

Status: Needs review » Active

theme_table_select_header_cell() has been removed from Drupal, so we need to figure out how it should be ported. Maybe using a #type => 'tableselect' element, but I'm not sure.

Island Usurper’s picture

Title: uc_attribute: Fatal error: Unsupported operand types ubercart/uc_attribute/uc_attribute.admin.inc on line 1003 » Can't use theme_table_select_header_cell() any more

Better title so I remember what it's about.

lphm’s picture

Good!

Island Usurper’s picture

Status: Active » Fixed
StatusFileSize
new4.76 KB

I decided that the tableselect element is just a little too limited, since I needed to put in radio buttons and checkboxes in the same table. So I just fake it by adding the CSS and JavaScript myself. No big deal.

Found some minor problems with the attribute forms, so got those fixed as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.