can't select module info on list_items
I've written several modules now but have one that lists all the items I have created, but they are not selectable so I can edit/view/delete them. I've compared against the other modules I have written and I can't see what I have missed.
I can edit them if I know the id and go to the proper URL appropriately (e.g.: navtech/projects/edit/1).
Any ideas or suggestions?
Comments
echo PHP_EOL . "this->rows_selectable:" . PHP_EOL . $this->rows_selectable;
The result is:
this->rows_selectable: 1
I added just before "foreach($this->table_actions as $key => $val)":
echo PHP_EOL . "this->table_actions:" . PHP_EOL . print_r($this->table_actions);
The result is:
Array ( [0] => EDIT [1] => VIEW [2] => DELETE ) this->table_actions: 1
It all looks good to me. I'm a bit perplexed on this one.
If you are already looking at the module.php file to try and debug, the logic for rendering that starts around line 330 in the items method. On line 462 is where it actually renders the string for the table.
In the $config['modules']['navtech_projects'] I am missing the 'id' column:
'table_headers' => array(
'name',
'last_remote_update',
'published',
),
Argh!
'table_headers' => array(
'id',
'name',
'last_remote_update',
'published',
),
Now works.