-
Thanks @Michael Newton ! Really appreciate the detailed safety checks.
Confirming our approach:
- Type list safety: ✅ We're using hardcoded array with proper quoting:
php
$eventTypes = ['timeline_common_post', 'timeline_common_repost']; $typeList = "'" . implode("','", $eventTypes) . "'";- Guard rails: I'll add these checks. Quick question - in our UNA 14 schema, I should verify which of these columns exist:
sql
DESCRIBE bx_timeline_events;
Then add any that exist (system, sticked, promoted). Correct?
- Newest 10 test clarification: The DESC order was purely for dev testing - I adjusted the Timeline module settings in Studio (sort order + filtered to show only these two event types) so we could visually confirm the deleted posts disappeared from the timeline immediately. For production, we're using ASC (oldest first) with the 90-day date filter.
- Delete method: We're using:
php
$timeline = BxDolModule::getInstance('bx_timeline'); $result = $timeline->deleteEvent($aEvent);This is working perfectly across dev/production (including symlinked NFS storage). Should we switch to bx_srv('bx_timeline', 'delete', [$eventId]) for better version compatibility? What's the exact syntax?
- Storage cleanup verification: Confirmed working - remote NFS storage decreased from 260GB → 259GB, orphaned file mappings = 0. The native deleteEvent() properly triggers all storage hooks.
- CLI-only enforcement: ✅ Adding this.
Questions:
- For the bx_srv() approach, is it: bx_srv('bx_timeline', 'delete', [$eventId]) or does it need the full event array?
- Any UNA 14-specific gotchas we should watch for?
Script has been rock-solid (165/200 successful, 35 cascade-deleted, 0 failures). Want to ensure we're future-proof for UNA 15+.
Thanks for the thorough review! 🙏