Skip to content

fix(themes): blank most-sales-products page when sort options are missing - #1045

Merged
sallainternalbot[bot] merged 1 commit into
masterfrom
bugfix/TD-16291-blank-most-sales-products-page
Sep 12, 2026
Merged

sallainternalbot[bot] merged 1 commit into
masterfrom
bugfix/TD-16291-blank-most-sales-products-page

Conversation

@eslamoo

@eslamoo eslamoo commented Sep 12, 2026

Copy link
Copy Markdown
Member

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Bug fix

What is the current behaviour? (You can also link to an open issue here)

  • /most-Sales-products renders a blank page (HTTP 200, empty body) on ~647 stores. ComponentsController::displayMostSalesProducts hand-builds ['products', 'page_title'] and never passes sort_options, unlike the other render sites that go through HasCategoryPageData::getData(). sort_options is therefore null and |filter throws Twig\Error\RuntimeError: The "filter" filter expects an array or "Traversable", got "NULL".

What is the new behaviour? (You can also link to the ticket here)

  • sort_options|default([]) before the filter, so a missing value renders an empty sort-by instead of throwing. No change to any case that already worked.

Does this PR introduce a breaking change?

  • No

Screenshots (If appropriate)

Five views map to this template and most-Sales-products is the one that
never passes sort_options, so the filter call received null and the page
rendered blank.
@sallainternalbot
sallainternalbot Bot marked this pull request as draft September 12, 2026 17:33
@eslamoo
eslamoo marked this pull request as ready for review September 12, 2026 17:33
@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: run a review on demand. To trigger the first review automatically, go to your organization or repository integration settings. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@eslamoo

eslamoo commented Sep 12, 2026

Copy link
Copy Markdown
Member Author

/merge

@sallainternalbot

Copy link
Copy Markdown
Contributor

⏳ Enqueued for Merge

Your pull request has been added to the merge queue. It will be merged automatically once it reaches the front of the queue ✅


🔄 Queue Status

🚦 Queue

The queue is empty. Good luck!

🧬 PR's Dependencies

├── sallaapp/theme-raed#1045

@sallainternalbot

Copy link
Copy Markdown
Contributor

🔄 Merge In Progress

This pull request has reached the front of the queue and is now being processed for merge.

@sallainternalbot
sallainternalbot Bot merged commit 6f02c79 into master Sep 12, 2026
1 check passed
@sallainternalbot
sallainternalbot Bot deleted the bugfix/TD-16291-blank-most-sales-products-page branch September 12, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant