Skip to content

Troubleshooting

This page collects the most common P2Lab Stats failure modes and the fastest way to diagnose them.

”Module doesn’t appear in the admin”

Section titled “”Module doesn’t appear in the admin””
  • Check the plugin is activatedExtensions → My extensions → P2Lab Stats should show Active.
  • Clear the admin cachebin/console cache:clear.
  • Reload the admin with a hard refresh (Ctrl/Cmd + Shift + R) so the JS bundle is fetched fresh.
  • Check user permissions — your role needs access to the P2Lab Stats module entries.

”KPI widget shows empty / zero values”

Section titled “”KPI widget shows empty / zero values””
  • Open the widget’s date range — if you’re on “current month” early in the month, the previous period might be the bigger window and dominate the comparison.
  • Check the order-state filter — the widget defaults to specific states; if those don’t match your real flow, the count is zero. Adjust under Settings → Plugins → P2Lab Stats → Widgets.
  • Make sure orders exist in the range — sounds obvious but it’s the first thing to confirm on staging environments.

”Report numbers don’t match what I see in Shopware orders”

Section titled “”Report numbers don’t match what I see in Shopware orders””
  • Filters are ANDed — if you’ve narrowed by sales channel, payment method and customer group, the result reflects the intersection. Clear filters and compare again.
  • Order state defaults — sales reports by default may exclude cancelled or refunded orders depending on the configured defaults. Check Settings → Plugins → P2Lab Stats → Reports.
  • Currency conversion — multi-currency orders are normalised to the shop default currency for KPIs. Per-row currency is preserved in the Currency report.
  • Cache staleness — click Refresh in the right-hand panel to bypass cache. If the refreshed numbers differ from the cached ones, you’ve found a cache poisoning bug — file an issue.

”Margin report is empty or shows revenue == margin”

Section titled “”Margin report is empty or shows revenue == margin””
  • Purchase prices missing — without purchasePrices, margin is calculated as revenue × 1. Fill purchase prices on products / variants.
  • Snapshots not running — without snapshots, the report uses current cost on historical orders. Check Settings → Plugins → P2Lab Stats → Tasks → Snapshots is Enabled and the Product snapshots page has recent rows.
  • Variant inheritance — variants without their own purchase price inherit from the parent in the snapshot. Verify the variant rows in the snapshot browser.

”Export job is stuck in Queued / Processing”

Section titled “”Export job is stuck in Queued / Processing””
  • Messenger worker not running — exports run via messenger:consume. On the Shopware host run bin/console messenger:consume. In Docker setups, the worker container should be active.
  • Queue backlog — other Shopware jobs may be ahead of your export. Check messenger:stats for queue depth.
  • Worker memory — a very large export can OOM the worker. Tighten the filter to reduce row count and re-run.

”Cache warming doesn’t seem to do anything”

Section titled “”Cache warming doesn’t seem to do anything””
  • Task not scheduled — check Shopware’s scheduled_task:run is wired up and messenger:consume is consuming.
  • Cache disabled — verify under Settings → Plugins → P2Lab Stats → Tasks → Cache warming that Report cache and/or Widget cache are enabled.
  • Interval too long — if you set the interval to 24 h and check 1 h later, nothing’s run yet. Set it to 1–2 h for faster feedback.

”Cohort matrix is sparse / RFM report is empty”

Section titled “”Cohort matrix is sparse / RFM report is empty””
  • Not enough order history — cohort needs at least a few months of orders to be useful. RFM needs at least two orders per customer to compute frequency.
  • Customer-group filter — if you’re filtered to a small B2B group with few customers, both reports may be too thin.
  • Order state filter — if cancelled / refunded orders are excluded by default, customers with only those orders disappear.

”Charts render blank / sw-chart error in console”

Section titled “”Charts render blank / sw-chart error in console””
  • Date range too narrow — a single day with no orders renders an empty chart. Widen the range.
  • JS bundle stale — hard-refresh the admin to flush the cached bundle.

When something looks wrong, include:

  • Plugin version (visible in Extensions → My extensions → P2Lab Stats)
  • Shopware version
  • Report key + the exact URL (so filters / date range / view-mode are reproducible)
  • A screenshot of the chart / table / KPI in question
  • Whether the issue persists after clicking Refresh in the right-hand panel
  • Whether the messenger:consume worker is running