Hi
i try a install but not lucky here my errors..
Fatal error: Call to undefined function node_get_types() in ./modules/vote_up_down/vud_node/vud_node.module on line 82
Fatal error: Call to undefined function node_get_types() in ./modules/vote_up_down/vud_comment/vud_comment.module on line 44
Fatal error: Call to undefined function node_get_types() in ./modules/vote_up_down/vud_term/vud_term.module on line 41

i know is very beta:
ctools says Vote Up/Down (aktiv), Vote Up/Down Comments (aktiv), Vote Up/Down Nodes (aktiv), Vote Up/Down Terms (aktiv)
Fivestars is aktiv and on "vote" in voting api
the think is: it appers nothing (for me) in the People Permissions.
thanks for the d7 port

Comments

nevets’s picture

It needs to be replaced with a call to node_type_get_type() or node_type_get_types()

eule’s picture

hello! thanks for it
i test it and change the line 82 to '#options' => node_type_get_type('names'),
thats works for me..i get the screen but i become a form error here
Warning: Invalid argument supplied for foreach() in form_process_checkboxes() (Zeile 3016 von ./includes/form.inc).

with node_type_get_types() i dont see the screen but a error like in a iframe

Warning: strlen() expects parameter 1 to be string, object given in drupal_validate_utf8() (Zeile 1503 von ./includes/bootstrap.inc).
Recoverable fatal error: Object of class stdClass could not be converted to string in filter_xss() (Zeile 1333 von ./includes/common.inc).

nevets’s picture

You probably need to loop through the results of node_type_get_types() to produce a suitable options array.

metalinspired’s picture

Here's a quick fix.
Change:

function vud_node_admin_settings() {
  $form['vud_node_types'] = array(
    '#type'          => 'checkboxes',
    '#title'         => t('Node types'),
    '#description'   => t('Select the node types for which you want to activate voting.'),
    '#default_value' => variable_get('vud_node_types', array()),
    '#options'       => node_get_types('names'),
  );

to:

function vud_node_admin_settings() {
  $node_types = array();
  foreach(node_type_get_types() as $type) {
    $node_types[] = $type->name; 
  } 
  $form['vud_node_types'] = array(
    '#type'          => 'checkboxes',
    '#title'         => t('Node types'),
    '#description'   => t('Select the node types for which you want to activate voting.'),
    '#default_value' => variable_get('vud_node_types', array()),
    '#options'       => $node_types,
  );
eule’s picture

hi thats works for me, thank you! .. i dont get any error...but the Widget selection dont allow me to select any no widget comes up

metalinspired’s picture

Yeah. I think I hit the same wall but didn't have any time to try and figure it out :S

marvil07’s picture

duplicating #1092460: Error on node configuration in favour of this

dqd’s picture

Any help needed? (php, html, css) love the module and can't await working beta for d7!

good work! thanks!

regards from Berlin

codare’s picture

Hi
I found that changing

'#options' => node_get_types('names'),

on line 82, to

'#options' => node_type_get_names('names'),

completely solved the issue for me.

Good Luck!!

jack_tux’s picture

Yeah that worked here..

Just have to find out now why the vote widget doesn't display for the particular content type.

marvil07’s picture

Status: Active » Fixed

Fixed since 5202d8d.

Status: Fixed » Closed (fixed)

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

kirthisekhar’s picture

Issue summary: View changes

@codare That worked for me, thanks!