---
title: DuplicateBlockArguments
description: Identifies duplicate argument names in block tags.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-block-arguments
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-block-arguments.md
api_name: liquid
---

# DuplicateBlockArguments

Identifies `{% block %}` tags that pass the same argument name more than once. Theme Check reports the second and later occurrences of each duplicate argument name, even when the target block file is missing.

Each block argument should be provided only once so the block receives an unambiguous value.

This check also reports an explicit `content` argument in a block tag that has an inline body, because the inline body takes precedence over the argument.

**Note:**

These checks all validate `{% block %}` tag arguments: [`DuplicateBlockArguments`](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/duplicate-block-arguments), [`MissingBlockArguments`](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/missing-block-arguments), [`UnrecognizedBlockArguments`](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/unrecognized-block-arguments), and [`ValidBlockArgumentTypes`](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/valid-block-argument-types).

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

In the following example, the `variant` argument is provided twice, so Theme Check reports `Duplicate argument 'variant' in block tag for 'button'.`:

```liquid
{% block 'button', variant: 'primary', variant: 'secondary' %}
  Button content
{% endblock %}
```

### ✓ Pass

In the following example, each argument name is unique:

```liquid
{% block 'button', variant: 'primary', class: 'button--large' %}
  Button content
{% endblock %}
```

### ✗ Fail

In the following example, the block tag has an inline body and an explicit `content` argument, so Theme Check reports `The explicit 'content' argument has no effect because the inline block body takes precedence.`:

```liquid
{% block 'button', content: 'Add to cart' %}
  Button content
{% endblock %}
```

***

## Options

The following example contains the default configuration for this check:

```yaml
DuplicateBlockArguments:
  enabled: true
  severity: warning
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended. If you can't avoid violating the rule, then you should disable the check using the [comment syntax](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#disable-checks-using-liquid-comments). This ensures that you intentionally disable the check for each instance.

```liquid
{% # theme-check-disable DuplicateBlockArguments %}
{% block 'button', variant: 'primary', variant: 'secondary' %}
  Button content
{% endblock %}
{% # theme-check-enable DuplicateBlockArguments %}
```

***
