Troubleshooting
The entries below cover the most common issues people hit with relaticle/activity-log. For anything not listed, open a GitHub discussion — maintainers and community triage there.
Timeline looks unstyled in production
The plugin's Blade views use Tailwind utilities. If you see plain HTML, your panel theme isn't compiling the plugin's views. Add the @source directive — see /getting-started/installation#tailwind-theme-integration.
Custom renderer isn't picked up
Renderers resolve in this order: explicit $entry->renderer → bindings[$entry->event] → bindings[$entry->type] → DefaultRenderer. Most common cause: the binding key doesn't match. Check $entry->event against your registered key (it's the spatie event column for activity_log entries, the second arg to event() for RelatedModelSource, or the event field you set on a TimelineEntry for custom sources). Full resolution rules at /essentials/customization#renderer-resolution-order.
Duplicate entries appearing
Dedup uses dedupKey + sourcePriority. If two sources emit the same logical event with different keys, they won't collapse. Either align dedupKey on both sources (use ->dedupKeyUsing() on the builder) or raise the preferred source's priority so the loser is dropped. Mechanics at /concepts/how-it-works#dedup-behavior.
Type filter doesn't match anything
- Symptom:
$record->timeline()->fromActivityLogOf(['emails'])->ofType(['related_activity_log'])->get()returns empty. - Cause:
RelatedActivityLogSourceemits entries withtype='activity_log'(NOT'related_activity_log'). Therelated_activity_logkey only exists insource_prioritiesconfig — for priority configuration only. - Workaround: filter with
->ofType(['activity_log'])to include both own- and related-log entries. To distinguish them at the entry level, inspect$entry->relatedModel(nullforActivityLogSource, an Eloquent model forRelatedActivityLogSource). - Tracking: issue #11.
fromActivityLog() throws on a fresh model
- Symptom:
DomainException: ActivityLogSource cannot resolve entries for an unsaved subjectwhen callingtimeline()on a model that hasn't been persisted. - Cause:
ActivityLogSource::resolve()requires$subject->getKey() !== null. - Workaround: don't call
$model->timeline()from acreatingEloquent event or before$model->save(). Move the call to acreatedevent or to a controller after persistence.
Issue not listed here? Open a GitHub discussion.