I have serveral terms with nodes of that subject wich I display per term. Something like
http://domain.com/term1
http://domain.com/term1?page=1

Single nodes of that term are displayed like http://domain.com/term1/10 (where 10 is the node-id)

When I delete this node and visit the URL Views has generated (http://domain.com/term1/10) it returns the term display of http://domain.com/term1 with pagers to next page (http://domain.com/term1/10?page=1)

So the original content of http://domain.com/term1 is now also available through invalid URL's:
http://domain.com/term1/10
http://domain.com/term1/10?page=1
etc..

This should be a Error 404 - Not found.
This causes a lot of duplicate content when search engines revisit the pages and follows every pager URL.

I have now disallowed it for spiders in my robots.txt for the time being.

Comments

mooffie’s picture

Category: bug » feature
Priority: Critical » Normal

This doesn't look like a bug. I assume you're using the 'Nide: Nid' argument.

http://domain.com/term1/10

You're asking Views to give you a list of all nodes having a node ID of '10'. Views obeys, by giving you an empty list.

To fix this, go to the argument's settings form and in the 'Validator' dropdown choose 'Node'. This will make Views ensure the number in the URL corresponds to some existing node. Make sure 'Action to take if argument does not validate' is '404'.

merlinofchaos’s picture

I have to admit, I'm really having a hard time following what it is you're doing. You've pasted a lot of URLs but you haven't really explained how you have things set up; you've completely blamed this on the pager, but I think placing that blame has led you to skip all the important details, like how your view is configured. For example, you've got domain.com/term1/10 but you haven't said whether or not there are arguments involved, or what's going on.

Please, I need real details here. An export of the view would probably help.

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)
Simx0r’s picture

Pages generated by Views are filtered by taxonomy id. This works just fine. Paths generated by Views are for example
/term1
/term1?page=1
etc

Module Pathauto aliases the nodes shown in this View in the pattern: /[term-raw]/[nid]
Since http://domain.com/term1/10 has the unique nid in the URL (http://domain.com/term2/10 cannot exist because of the nid in the URL)
I have tried options of the validator wich gives 1) completely blank page, or 2) empty text (no 404) or 3) situation described in the first post (wrong paging)

I cannot determine what I am doing wrong.

Simx0r’s picture

$view = new view;
$view->name = 'Webcams_Regions';
$view->description = 'Regions display';
$view->tag = 'webcams';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'label' => 'Title',
    'link_to_node' => 1,
    'exclude' => 1,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'changed' => array(
    'label' => 'Updated',
    'date_format' => 'custom',
    'custom_date_format' => 'j/m/Y',
    'exclude' => 0,
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
  'field_description_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_description_value',
    'table' => 'node_data_field_description',
    'field' => 'field_description_value',
    'relationship' => 'none',
  ),
  'body' => array(
    'id' => 'body',
    'table' => 'node_revisions',
    'field' => 'body',
    'label' => '',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'title' => array(
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'order' => 'ASC',
    'relationship' => 'none',
  ),
  'changed' => array(
    'order' => 'ASC',
    'granularity' => 'minute',
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler->override_option('title', 'Webcams');
$handler->override_option('header_format', '1');
$handler->override_option('empty', 'woops, somethings gone bad..');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_pager', '1');
$handler->override_option('style_options', array(
  'grouping' => 'title',
));
$handler->override_option('row_options', array(
  'inline' => array(
    'title' => 'title',
    'changed' => 'changed',
  ),
  'separator' => '',
));
$handler = $view->new_display('page', 'Amsterdam', 'page');
$handler->override_option('arguments', array(
  'nid' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'links' => 0,
      'site' => 0,
      'webcams' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '2' => 0,
      '1' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
  'tid' => array(
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'operator' => 'and',
    'value' => array(
      '0' => '2',
    ),
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'type' => 'textfield',
    'vid' => '1',
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('title', 'Webcams in Amsterdam');
$handler->override_option('header', '');
$handler->override_option('header_format', '2');
$handler->override_option('path', 'webcams/amsterdam');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Amsterdam',
  'weight' => '0',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));
mooffie’s picture

$handler->override_option('arguments', array(
'nid' => array(

(You have a 'Node: Nid' argument there, don't you? If you added it just because of what I wrote in comment #1, then you should say so, and remove this argument. What I wrote in comment #1 was a guesswork that turned out incorrect: it was based on no data.)

merlinofchaos’s picture

Try adding the Argument "Global: Null" and checking 'Fail basic validation if an argument is given'.

Simx0r’s picture

Thanks guys for thinking with me :)
I've tried your hints and no, it didn't do it.

The 404 still don't show up. Tried about any option available in the admin panel.
Made a new export with some new settings, wich is still not what I need but it helps linking to pages that don't exist on my site.

If the node does not exist at all in a category it now gives a blank screen (wish my socks were that white).
If the node does exist, but in a different category it displays the empty text with just one link to the non-existing page. This is because of the menu-breadcrumbs.
Here's the export:

$view = new view;
$view->name = 'Webcams_Regions';
$view->description = 'Regions display';
$view->tag = 'webcams';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'title' => array(
    'label' => 'Title',
    'link_to_node' => 1,
    'exclude' => 1,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'changed' => array(
    'label' => 'Updated',
    'date_format' => 'custom',
    'custom_date_format' => 'j/m/Y',
    'exclude' => 0,
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
  'field_description_value' => array(
    'label' => '',
    'link_to_node' => 0,
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_description_value',
    'table' => 'node_data_field_description',
    'field' => 'field_description_value',
    'relationship' => 'none',
  ),
  'body' => array(
    'id' => 'body',
    'table' => 'node_revisions',
    'field' => 'body',
    'label' => '',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'title' => array(
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'order' => 'ASC',
    'relationship' => 'none',
  ),
  'changed' => array(
    'order' => 'ASC',
    'granularity' => 'minute',
    'id' => 'changed',
    'table' => 'node',
    'field' => 'changed',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'name' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'node',
    'validate_fail' => 'not found',
    'glossary' => 0,
    'limit' => '0',
    'case' => 'none',
    'path_case' => 'none',
    'transform_dash' => 0,
    'add_table' => 0,
    'require_value' => 0,
    'id' => 'name',
    'table' => 'term_data',
    'field' => 'name',
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'links' => 0,
      'site' => 0,
      'webcams' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '2' => 0,
      '1' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_php' => '',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
  'role' => array(),
  'perm' => '',
));
$handler->override_option('title', 'Webcams');
$handler->override_option('header_format', '1');
$handler->override_option('empty', 'woops, somethings gone bad..');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 5);
$handler->override_option('use_pager', '1');
$handler->override_option('style_options', array(
  'grouping' => 'title',
));
$handler->override_option('row_options', array(
  'inline' => array(
    'title' => 'title',
    'changed' => 'changed',
  ),
  'separator' => '',
));
$handler = $view->new_display('page', 'Amsterdam', 'page');
$handler->override_option('filters', array(
  'tid' => array(
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'operator' => 'and',
    'value' => array(
      '0' => '2',
    ),
    'group' => 0,
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'type' => 'textfield',
    'vid' => '1',
    'relationship' => 'none',
    'expose_button' => array(
      'button' => 'Expose',
    ),
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('title', 'Webcams in Amsterdam');
$handler->override_option('header', '');
$handler->override_option('header_format', '2');
$handler->override_option('path', 'webcams/amsterdam');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Prague',
  'weight' => '0',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'weight' => 0,
));

Simx0r’s picture

Perhaps it could be related to the .htaccess file in the root
Mine has this in it:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Maybe every request (valid or not) are passed on to the relative path.
Couldn't test this out.

esmerel’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Unable to reproduce, no updates for more than 30+ days.