Skip to main content

[2025-10-08] Improved render line removal & reliability in theme file

Leo avatar
Written by Leo
Updated today

Summary

This release fixes the cleanup failure error that occasionally appeared when stopping/ pausing a test.

The fix improves how the app detects and removes Liquid render lines and eliminates false failures caused by Shopify’s API cache.

You can now stop/ pause tests without seeing liquid file rendering errors.

Why the issue happened

The original cleanup logic only matched exact render line strings.

When a theme included additional parameters or whitespace, the app didn’t detect those lines correctly — causing the verification step to think cleanup had failed, even though it hadn’t.

What changed

  • Enhanced render line removal

    Updated the cleanup logic to recognize all valid Liquid render formats, including those with parameters, whitespace, or trailing commas.

    Examples now fully supported:

{% render 'abconvert-content-test' %} 
{% render 'abconvert-content-test', foo: 'bar' %}
{%- render 'abconvert-content-test' -%}
{% render 'abconvert-content-test', %}
  • Removed outdated verification logic

    The previous verification step sometimes caused false errors due to Shopify’s Asset API returning cached content immediately after saving. This check has been removed to ensure faster and more reliable cleanup.

  • Added automated tests

    Added Jest test coverage for all known render line variations to prevent regressions.

Results

  • Render lines are consistently removed across all formats

  • Cleanup completes faster and more reliably

Developer Notes

If your developers maintain custom theme files, ensure render lines remain in the default format:

{% render 'abconvert-content-test' %}

This fix also covers custom variations, but keeping the standard format ensures maximum compatibility with future updates.

Visit this article to know all render lines for each test types.

Did this answer your question?