Fix “Parameter Missing or Invalid” errors

New Member
3 0 0

Hi there,


Having an issue which I presume to be a result of using radio buttons for product variants (G:Variant app), but there is no button checked by default.


I checked the code and it appears to be correct, so I'm not sure why this error is appearing? Any help to ensure the first variant is auto-selected would be hugely appreciated.


{% form 'product', product, class: productClasses %}
<select name="id" id="ProductSelect-{{ }}" class="product-single__variants">
{% for variant in product.variants %}
{% if variant.available %}
<option {% if variant == product.selected_or_first_available_variant %} selected="selected" {% endif %} data-sku="{{ variant.sku }}" value="{{ }}">{{ variant.title }} - {{ variant.price | money_with_currency }}</option>
{% else %}
<option disabled="disabled">

{{ variant.title }} - {{ 'products.product.sold_out' | t }}
{% endif %}
{% endfor %}


Screen Shot 2021-11-16 at 9.19.20 AM.png

Replies 2 (2)
Shopify Expert
10440 169 2081

Liquid code is only part of what could be at play here. JavaScript would also have some impact, and could be changing the selection on load.


Are you able to share a link to the product that shows this issue? Being able to see it will be a much better view of the problem.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.
Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.
★ ★
New Member
3 0 0
Hi Jason,

Thank you so much for your response. It is happening with all products that
have variables. The shop is if that helps.