I hope someone can but if can't I understand. I have been trying for the past week to use VBO model to pass the title to the URL instead of the nid. I took the argument_selector.action.inc file and tried to modify the action to pass the title in the URL but I am struggling with the code. When I try to pass the title my url comes with http://url?Array instead of the title.

Can someone take a look at the code for the action I have created and let me know if I am heading in the right direction?

function views_bulk_operations_argument_selector_action($node, $context = array()) {
$base_url = $context['settings']['url'];
$arguments = array($node->title);
drupal_goto($base_url . $arguments );
}

Comments

pattyw created an issue. See original summary.

joelpittet’s picture

Status: Active » Fixed

$arguments is clearly an array and being concatenated to a string. Array is usually what you get when doing that.

Try using the nid though it better incase it changes... the url() function can help it look nice. drupal_goto(url('node/' . $node->nid, array('absolute' => TRUE)));

https://api.drupal.org/api/drupal/includes%21common.inc/function/url/7.x

Status: Fixed » Closed (fixed)

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