i'm using taxonomy view to display a list of terms.

as argument, i'm using Taxonomy term: Parent term.

for argument validation, custom php code (i'm using views global filter module, but it doesnt matter)

if(!empty($_SESSION['global_filter']['field_med_section']))return $_SESSION['global_filter']['field_med_section'];
else
return "0";

si, if argument is not set by user, it's set to 0 by validation.

i have "override title %1". it's works fine (display parent term title) for all values except '0'.

for value '0', the views title is 'No name'.

how to change or override it??

thank u.

Comments

ali6p’s picture

Translate "No name" to " ". This is not good solution but optimal fo me.

there is a problem:
/sites/all/modules/views/modules/taxonomy/views_handler_argument_term_node_tid_depth.inc #137

function title() {
    $term = taxonomy_term_load($this->argument);
    if (!empty($term)) {
      return check_plain($term->name);
    }
    // TODO review text
    return t('No name');
  }
Kars-T’s picture

Status: Active » Closed (won't fix)

Dear fellow Drupal enthusiasts,

This issue is now lasting for a very long time in the issue queue and was unfortunately never solved. As Drupal is a open source project, everyone is helping on a voluntary basis. That this was not solved is nothing personal and means no harm. But perhaps no one had time to deal with this issue, maybe it is too complex, or the problem was not described comprehensibly.

But this issue is not the only one. There are thousands of issues on Drupal.org that have never been worked on or could not be processed. This means that we are building a wave that is unmanageable and it is a problem for the Drupal project as a whole. Please help us keep the issue queue smaller and more manageable.

Please read again, "Making an issue report" and see if you can improve the issue. Test the problem with the current Core and modules. Maybe the problem doesn't exist anymore, is a duplicate or has even been solved within this issue but never closed.

Help can also be found for it on IRC and in the user groups.

In order to close this issue, I have set this issue to "Closed (won't fix)".

If there is new information, please re-open the issue by changing the status to active.

--
This issue was edited with the help of Issue Helper

brenk28’s picture

Issue summary: View changes

In case somebody goolges the same thing I did and comes across this... I was seeing "No name" in the view title in a view that was using taxonomy term: parent term as its contextual argument. The view display title itself was set to the argument (%1) and the contextual filter was set to provide a default fixed value of "NULL".

To fix this, I added a preprocess for the view and set the view title:

/**
 * Implements hook_preprocess_views_view().
 */
function my_module_preprocess_views_view(&$vars) {
  if ($vars['view']->name == 'my_view' && $vars['view']->argument['parent']->value[0] == 'NULL') {
    $vars['view']->set_title(t(Title'));
    // Or set this to some other value contained in variables/view object instead of hard-coding.
  }