Skip to content

Fix visibility filter type mismatch and harden feed attribute handling#286

Open
Marvin-Magmodules wants to merge 2 commits into
masterfrom
fix/visibility-filter-type-mismatch
Open

Fix visibility filter type mismatch and harden feed attribute handling#286
Marvin-Magmodules wants to merge 2 commits into
masterfrom
fix/visibility-filter-type-mismatch

Conversation

@Marvin-Magmodules

Copy link
Copy Markdown
Member

Summary

  • Cast visibility filter values to int before strict in_array comparison, fixing type mismatch between string config values and int getVisibility()
  • Guard Item::add() against missing row id
  • Preserve hardcoded attributes (id, title, price) when EAV lookup fails instead of unsetting them

Test plan

  • E2E: feed generation, visibility filter, token auth, module disabled state
  • Manual: generate feed with NOT_VISIBLE products on PHP 8.x — no crash

- Cast visibility filter values to int for strict in_array on PHP 8.x
- Guard Item::add() against missing row id
- Preserve hardcoded attributes (id, title, price) when EAV lookup fails
  instead of unsetting them, preventing "Undefined array key" crashes
Covers basic feed generation, required fields validation,
visibility filter with type mismatch regression, token auth,
module disabled state, and single product feed.

Fixes feed tests to use process.env.CHANNABLE_TOKEN instead of
hardcoding token into Magento config.
@Marvin-Magmodules Marvin-Magmodules changed the title Fix visibility filter type mismatch causing feed crash on PHP 8.x Fix visibility filter type mismatch and harden feed attribute handling Jun 11, 2026
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