Magento 2 Experten — Hyvä Theme, Tailwind CSS & SEO aus einer Hand ›

A Troubleshooting Guide for the Whole Project

A Troubleshooting Guide for the Whole Project

~9 Min. Lesezeit Zuletzt aktualisiert am August 9, 2026

Every block of this series had its own small troubleshooting chapter, or at least a warn() callout about its most typical mistake. This chapter bundles them into one single reference, sorted by symptom rather than by cause - the way a real production issue actually surfaces first.

The general diagnostic order

Before hunting for a specific symptom in the list below, the same generic sequence is always worth running first - for practically every problem below, it's the fastest first step:

bin/magento cache:flush
bin/log exception.log
bin/log mironsoft_loyalty.log
bin/magento deploy:mode:show
bin/magento setup:di:compile

Symptom table

  1. Points aren't credited after an order completes. Most likely cause: an exception inside AwardPointsOnOrderPlaced was caught by its own try/catch (\Throwable) (chapter 30) and lands exclusively in var/log/mironsoft_loyalty.log (chapter 34), never in exception.log - checkout itself keeps working unnoticed. First step: bin/log mironsoft_loyalty.log, not exception.log.
  2. Points get credited twice when a points package is purchased. loyalty_points_multiplier (chapter 19) wasn't set to 0 on the points-package product - both AwardPointsOnOrderPlaced (chapter 30) and CreditPurchasedPointsPackageOnOrderPlaced (chapter 76) then independently book points for the same order; see the documented practical recommendation from chapter 76.
  3. The admin grid shows no rewards, or the wrong ones. Either an incorrectly built EAV collection filter (raw addAttributeToFilter() instead of the chapter-15 helpers addActiveFilter()/addRewardTypeFilter()) or a new attribute assigned only to the Default set, see the warning in chapters 19/20.
  4. PHPStan flags an error right after adding a new configuration type. setup:di:compile was forgotten, or run once instead of twice - the same trap as the types array merge from chapters 88/99 (feedback_di_xml_compile_gotcha).
  5. A GraphQL query unexpectedly returns null after a schema change. The config cache wasn't cleared after changing schema.graphqls - bin/cache-clean config is enough, no setup:di:compile needed (chapters 82/83, consistent with this catalog's GraphQL series).
  6. A customer repeatedly gets HTTP 429 while redeeming. Not a bug - RedemptionRateLimiter (chapter 86) hit MAX_ATTEMPTS = 5 within WINDOW_SECONDS = 60. Check whether the client is actually retrying incorrectly rather than simply raising the limit without understanding why.
  7. The new payment method doesn't appear at checkout. Either AvailabilityHandler::handle() (chapter 64) returns false because quote.loyalty_points_to_redeem is still 0 or null, or the Knockout renderer registration in checkout_index_index.xml (chapter 65) is missing after a static content deploy that skipped the admin area - see chapter 99, step 6.
  8. The free-shipping option doesn't appear in the shipping method list. FreeShippingByPoints::collectRates() (chapters 66/67) consistently returns false instead of an empty Result once points_cost exceeds the current balance - that's intended behavior, not a bug, see the chapter-67 reasoning.
  9. company_form.xml doesn't show loyalty_tier_override. AddLoyaltyTierOverridePlugin (chapter 22) doesn't check Magento_Company's availability itself - if the module is missing from the system, extension_attributes.xml validation already fails, see chapter 98.
  10. setup:upgrade aborts with a data patch error. Usually an incorrect or cyclical getDependencies() declaration - the complete, correct dependency graph of all twelve patches is in chapter 99.
  11. The ExpirePoints cron job shows up as "missed" in cron_schedule. Either the mironsoft_loyalty cron group (chapter 32) isn't active, or the reconciliation query exceeds schedule_lifetime for lack of an index on the ledger - see the performance warning in chapter 100.

The known residual risk: race conditions

Achtung: Two parallel redemptions by the same customer (storefront checkout and a mobile app at the same time, for instance) can spend the same balance twice - documented, but deliberately not fixed in chapters 63, 81, and 86, for lack of SELECT ... FOR UPDATE. This symptom doesn't show up as an error, but as a loyalty_points_balance that briefly goes negative or implausibly low after two near-simultaneous orders - not a coincidence, but the gap already documented in three places across this series.

Anyone using this series as a template for a real module shouldn't stop at the same point this tutorial stopped at for didactic reasons - which is exactly what chapter 104 addresses, pointing to further series in this catalog.