> For the complete documentation index, see [llms.txt](https://staylime.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://staylime.com/docs/theme-companion/theme-updates/fixing-rejected-files.md).

# Fixing rejected files

When the app saves updated files to your theme, Shopify validates each one. If Shopify can't accept a file — because of a structural issue in the code, such as broken Liquid syntax or an invalid section schema — the file is rejected, and the app collects it on the **Fix rejected files** screen. You get there from the [red banner on the update summary](/docs/theme-companion/theme-updates/understanding-your-update-summary.md#some-files-couldnt-be-prepared-for-update); if some conflicts are still unresolved, they come first — rejected files are fixed after.

This screen is different from conflict resolution: the update decisions are already made, and the file is fully editable. The only goal here is to make the file valid so Shopify accepts it.

### Fixing a file

{% stepper %}
{% step %}

#### Open the rejected file

The app shows Shopify's error messages with line numbers and highlights the likely places in the editor.
{% endstep %}

{% step %}

#### Fix the code

Edit the file right on this screen. If an edit goes wrong, **Reset file** discards your changes on this screen and returns the file to the state it arrived in.
{% endstep %}

{% step %}

#### Check & save

The app sends the file to Shopify again. If it's accepted, the file leaves the list; if not, the updated error message is shown — repeat until the file is accepted.
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
The highlighted location is approximate — Shopify reports errors with limited precision. Rely on the meaning of the error message rather than the exact line: the actual problem may be nearby or in a related part of the file.
{% endhint %}

Once every file is accepted, **Preview theme** and **Finish update** become available again on the [update summary](/docs/theme-companion/theme-updates/understanding-your-update-summary.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://staylime.com/docs/theme-companion/theme-updates/fixing-rejected-files.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
