I have a view with a block display that uses two arguments. The first argument is used to to display a date summary for the view, while the second argument is used with a PHP default value to filter the results by UID.

The problem I'm having is that views is ignoring the default value for the second argument when the first argument is using its default value. If I force a value for the first argument (in the views live preview), then the default value for the second argument works as expected. I need BOTH arguments to use their default value, and I don't understand why this isn't occuring.

Argument export is below:

$handler->override_option('arguments', array(
  'field_newsletter_date_value' => array(
    'default_action' => 'summary desc',
    'style_plugin' => 'default_summary',
    'style_options' => array(
      'base_path' => 'newsletters/archive',
      'count' => 1,
      'override' => 0,
      'items_per_page' => '25',
    ),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'date',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'date_fields' => array(
      'node_data_field_newsletter_date.field_newsletter_date_value' => 'node_data_field_newsletter_date.field_newsletter_date_value',
    ),
    'year_range' => '-30:+0',
    'date_method' => 'AND',
    'granularity' => 'month',
    'id' => 'field_newsletter_date_value',
    'table' => 'node_data_field_newsletter_date',
    'field' => 'field_newsletter_date_value',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      2 => 0,
      20 => 0,
      12 => 0,
      34 => 0,
      13 => 0,
      11 => 0,
      40 => 0,
      44 => 0,
      33 => 0,
      47 => 0,
      24 => 0,
      48 => 0,
      26 => 0,
      43 => 0,
      22 => 0,
      32 => 0,
      23 => 0,
      49 => 0,
      45 => 0,
      27 => 0,
      28 => 0,
      46 => 0,
      41 => 0,
      29 => 0,
      36 => 0,
      30 => 0,
      31 => 0,
      42 => 0,
      35 => 0,
      39 => 0,
      37 => 0,
      7 => 0,
      6 => 0,
      10 => 0,
      18 => 0,
      3 => 0,
      5 => 0,
      38 => 0,
      15 => 0,
      14 => 0,
      19 => 0,
      16 => 0,
      21 => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_taxonomy_tid_term_page' => 0,
    'default_taxonomy_tid_node' => 0,
    'default_taxonomy_tid_limit' => 0,
    'default_taxonomy_tid_vids' => array(
      1 => 0,
      4 => 0,
      3 => 0,
      5 => 0,
      7 => 0,
    ),
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'poll' => 0,
      'address' => 0,
      'company_block' => 0,
      'company_newsletter' => 0,
      'company_page' => 0,
      'compliance_msg' => 0,
      'css' => 0,
      'custom_block' => 0,
      'custom_page' => 0,
      'custom_protected_page' => 0,
      'event' => 0,
      'global_block' => 0,
      'global_page' => 0,
      'ig_consultant_profile' => 0,
      'kb' => 0,
      'marketing' => 0,
      'profile' => 0,
      'team_member' => 0,
      'testimonial' => 0,
      'user_profile' => 0,
      'webform' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      1 => 0,
      4 => 0,
      3 => 0,
      5 => 0,
      7 => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_signup_status' => 'any',
    'validate_argument_signup_node_access' => 0,
    'validate_argument_php' => '',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'uid' => array(
    'default_action' => 'default',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'php',
    'default_argument' => '',
    'validate_type' => 'user',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'uid',
    'table' => 'users',
    'field' => 'uid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      2 => 0,
      20 => 0,
      12 => 0,
      34 => 0,
      13 => 0,
      11 => 0,
      40 => 0,
      44 => 0,
      33 => 0,
      47 => 0,
      24 => 0,
      48 => 0,
      26 => 0,
      43 => 0,
      22 => 0,
      32 => 0,
      23 => 0,
      49 => 0,
      45 => 0,
      27 => 0,
      28 => 0,
      46 => 0,
      41 => 0,
      29 => 0,
      36 => 0,
      30 => 0,
      31 => 0,
      42 => 0,
      35 => 0,
      39 => 0,
      37 => 0,
      7 => 0,
      6 => 0,
      10 => 0,
      18 => 0,
      3 => 0,
      5 => 0,
      38 => 0,
      15 => 0,
      14 => 0,
      19 => 0,
      16 => 0,
      21 => 0,
    ),
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'default_argument_php' => 'return 792; // for testing',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'poll' => 0,
      'address' => 0,
      'company_block' => 0,
      'company_newsletter' => 0,
      'company_page' => 0,
      'compliance_msg' => 0,
      'css' => 0,
      'custom_block' => 0,
      'custom_page' => 0,
      'custom_protected_page' => 0,
      'event' => 0,
      'global_block' => 0,
      'global_page' => 0,
      'ig_consultant_profile' => 0,
      'kb' => 0,
      'marketing' => 0,
      'profile' => 0,
      'team_member' => 0,
      'testimonial' => 0,
      'user_profile' => 0,
      'webform' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      1 => 0,
      4 => 0,
      3 => 0,
      5 => 0,
      7 => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_signup_status' => 'any',
    'validate_argument_signup_node_access' => 0,
    'validate_argument_php' => '',
    'default_taxonomy_tid_term_page' => 0,
    'default_taxonomy_tid_node' => 0,
    'default_taxonomy_tid_limit' => 0,
    'default_taxonomy_tid_vids' => array(
      1 => 0,
      4 => 0,
      3 => 0,
      5 => 0,
      7 => 0,
    ),
  ),
));

Comments

kars-t’s picture

Status: Active » Fixed

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 voluntary basis. So that this is 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 did not describe the problem 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 just 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 remove this issue, I have set this issue to "fixed".

If there is new information, please re-open the issue.

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

Status: Fixed » Closed (fixed)

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