Bug Description
admin/js/wpfaevent-admin.js contains an AJAX-based import-progress implementation, including wpfaevent_import_* AJAX handlers and progress-bar logic, that is not connected to the live Eventyay import flow and never executes in practice.
The AJAX code binds its submit handler to the form #wpfaevent-import-events-form. That form is only rendered by admin/partials/eventyay-import-settings.php, which belongs to Wpfaevent_Admin_Settings_Renderer. No current plugin code instantiates that renderer, so the partial is not rendered, the form does not appear on a live page, and the JavaScript handler never attaches to anything.
The live Eventyay import form is implemented separately in admin/class-wpfaevent-eventyay-importer.php. It submits synchronously to admin-post.php and does not use this AJAX implementation.
Steps to Reproduce
- Open the Eventyay import page in the WordPress admin.
- Inspect the form used for the current Eventyay import flow.
- Observe that the live form does not use the
#wpfaevent-import-events-form ID expected by the AJAX handler.
- Trace
Wpfaevent_Admin_Settings_Renderer and its eventyay-import-settings.php partial.
- Observe that there is no current plugin code instantiating the renderer, so the form targeted by the AJAX handler is never rendered.
- Adding the missing form ID to the live import form makes the AJAX path execute, but testing shows that its import steps run in a different order from the live POST-based flow.
- The AJAX path then produced fewer speakers and an empty schedule during testing.
Expected Behavior
The plugin should have a single, active Eventyay import flow without unused AJAX handlers, unreachable templates, or JavaScript that targets forms which are never rendered.
Removing the dead AJAX path should not change the behavior of the existing synchronous Eventyay import flow.
Actual Behavior
The repository contains an unused AJAX import-progress implementation and associated settings/update partials that are not connected to the current import flow.
Attempting to reconnect the AJAX implementation is also unsafe because its import sequence differs from the live POST-based flow. During testing, this resulted in fewer imported speakers and an empty schedule.
Because #277 hides empty schedule sections from the UI, this data loss may not be immediately visible to an administrator.
Screenshots
Not applicable. This issue concerns unreachable code and import-flow behavior rather than a visual UI defect.
Additional Context
This was identified while investigating #281 and PR #283.
The AJAX implementation should be removed rather than revived. Keeping an unreachable implementation creates unnecessary maintenance overhead, while reconnecting it without addressing its different import ordering can introduce data-loss behavior.
The cleanup should include:
wpfaevent_import_* AJAX handlers and their PHP callbacks
- Associated progress-bar JavaScript in
admin/js/wpfaevent-admin.js
admin/partials/eventyay-import-settings.php, after confirming it is unreachable
admin/partials/eventyay-update-events.php, after confirming it is unreachable
Wpfaevent_Admin_Settings_Renderer, if it has no remaining callers
- Any enqueue, localization, nonce, or hook code used only by this dead path
The existing synchronous import flow in admin/class-wpfaevent-eventyay-importer.php and its admin-post.php submission should remain unchanged.
Contribution Checklist
Bug Description
admin/js/wpfaevent-admin.jscontains an AJAX-based import-progress implementation, includingwpfaevent_import_*AJAX handlers and progress-bar logic, that is not connected to the live Eventyay import flow and never executes in practice.The AJAX code binds its submit handler to the form
#wpfaevent-import-events-form. That form is only rendered byadmin/partials/eventyay-import-settings.php, which belongs toWpfaevent_Admin_Settings_Renderer. No current plugin code instantiates that renderer, so the partial is not rendered, the form does not appear on a live page, and the JavaScript handler never attaches to anything.The live Eventyay import form is implemented separately in
admin/class-wpfaevent-eventyay-importer.php. It submits synchronously toadmin-post.phpand does not use this AJAX implementation.Steps to Reproduce
#wpfaevent-import-events-formID expected by the AJAX handler.Wpfaevent_Admin_Settings_Rendererand itseventyay-import-settings.phppartial.Expected Behavior
The plugin should have a single, active Eventyay import flow without unused AJAX handlers, unreachable templates, or JavaScript that targets forms which are never rendered.
Removing the dead AJAX path should not change the behavior of the existing synchronous Eventyay import flow.
Actual Behavior
The repository contains an unused AJAX import-progress implementation and associated settings/update partials that are not connected to the current import flow.
Attempting to reconnect the AJAX implementation is also unsafe because its import sequence differs from the live POST-based flow. During testing, this resulted in fewer imported speakers and an empty schedule.
Because #277 hides empty schedule sections from the UI, this data loss may not be immediately visible to an administrator.
Screenshots
Not applicable. This issue concerns unreachable code and import-flow behavior rather than a visual UI defect.
Additional Context
This was identified while investigating #281 and PR #283.
The AJAX implementation should be removed rather than revived. Keeping an unreachable implementation creates unnecessary maintenance overhead, while reconnecting it without addressing its different import ordering can introduce data-loss behavior.
The cleanup should include:
wpfaevent_import_*AJAX handlers and their PHP callbacksadmin/js/wpfaevent-admin.jsadmin/partials/eventyay-import-settings.php, after confirming it is unreachableadmin/partials/eventyay-update-events.php, after confirming it is unreachableWpfaevent_Admin_Settings_Renderer, if it has no remaining callersThe existing synchronous import flow in
admin/class-wpfaevent-eventyay-importer.phpand itsadmin-post.phpsubmission should remain unchanged.Contribution Checklist