Repository navigation
QA reported two problems with v1.1.0: generation crawled, and generated events showed no attendees. Tracing those surfaced two more defects in the same code paths. All four are fixed here and verified against a live install (Event Tickets 5.30, a site that has completed rsvp-to-tc).
Fixed
Every event-creating CLI command was fatal. WP-CLI parses a docblock ---/default: block as a real value it injects into $assoc_args, not as documentation. default: +2 weeks from --start-date on --end-date reached DateTimeImmutable and threw:
Fatal error: Uncaught Exception: DateTimeImmutable::__construct():
Failed to parse time string (+2 weeks from --start-date)
Every add-rsvp / add-tickets ticket was created sold out. Same cause: default: random (20-200) on --capacity made parse_ticket_options()'s isset() fire and cast to capacity 0.
Events showed no attendees — two independent causes.
create_rsvp_ticket()calledticket_add()twice, the second time outsidewith_v1_rsvp_repositories(). On a V1 site that made a duplicate empty ticket; on a migrated V2 site it made atec_tc_ticketthat shadowed the real V1 ticket inget_all_event_tickets()while holding zero attendees.- Event Tickets caches attendees per post for an hour (
Tribe__Post_Transient), andticket_add()warms that cache before any attendee exists. Attendees are written with rawwp_insert_post()by design, so nothing invalidated the stale empty entry. On a 6-event series run, 3 of 6 events reported 0 attendees despite correct database rows. A fresh 9-event run now reports 9/9.
Generation was slow. tag_generated() built a separate image attachment per post — a picsum HTTP round trip plus wp_generate_attachment_metadata() resizing — including for ticket posts. That was ~70% of a run's wall clock.
| 6 events / 6 tickets / 30 attendees | wall clock | per unit |
|---|---|---|
| v1.1.0 | 10.87s | 1.81s |
| v1.2.0 | 2.63s | 0.44s |
Featured images now come from a pool of 8 built once per run and shared via set_post_thumbnail(), recovered across chunks the same way the venue and organizer pools already were.
Added
Plugin_Availability::has_rsvp_v2(), surfaced as a WP-CLI warning and an admin notice. On a site that has completed rsvp-to-tc, Event Tickets reads the V2 repositories, so this tool's V1 output is invisible in the Tickets and Attendees screens. That is expected — but indistinguishable from a generation failure if nobody says so. Run wp tec-data-generator revert first on such a site.
Behavior changes
- Featured images repeat within a run (8 distinct images shared across all posts) instead of each post getting a unique one.
- Tickets and attendees no longer get featured images.
Pool attachments have no post_parent, so Cleanup removes them by their own GENERATED_META_KEY tag rather than by parent cascade — verified.
Install
Download tec-data-generator-1.2.0.zip below and drop it into wp-content/plugins/. No Composer, npm, or build step — Event Tickets and The Events Calendar active is the only requirement.
Full changelog: 17f6b9f...v1.2.0 (PRs #4, #5)