Summary
The Zelle front-page migration can terminate with Cannot use object of type WP_Error as array when importing the generated Elementor template fails.
Expected behavior: A failed template import returns a handled migration failure to the REST client.
Actual behavior: The REST request raises an uncaught exception before a response is returned.
Impact: The affected migration cannot complete and the administrator receives a crashed REST request instead of an actionable failure result.
Customer context
- Product / area: Starter Sites & Templates by Neve, Zelle front-page migration REST endpoint
- Version: 1.4.3
- Environment: WordPress 7.0.2; PHP 8.4.11
- Integration / third party: Elementor local template import
- Reported error / symptom:
Cannot use object of type WP_Error as array
- Impact: Observed twice on one production site in the telemetry query window.
Reproduction notes
- Use the authenticated Zelle front-page migration REST workflow with Elementor available.
- Reach a condition where Elementor local template import returns
WP_Error.
- The captured production behavior is an uncaught
Cannot use object of type WP_Error as array exception at the migration import step.
The precise Elementor failure condition and request payload are unavailable from telemetry.
Diagnosis
Conclusion
Production telemetry records the exact exception at the product's array access in the Zelle importer. The repository's Elementor static-analysis declaration documents Source_Local::import_template() as returning either WP_Error or an array. Zelle_Importer::import_zelle_frontpage() checks only for an empty result and then dereferences [0]['template_id']; a WP_Error reaches that dereference and matches the captured error.
Where this likely occurs
includes/Rest_Server.php — Rest_Server::init() lines 96-105 registers the authenticated migrate_frontpage REST route, and Rest_Server::run_front_page_migration() lines 311-341 invokes the importer before converting returned WP_Error values into REST responses.
includes/Importers/Zelle_Importer.php — Zelle_Importer::import_zelle_frontpage() lines 99-108 receives the result of Elementor\TemplateLibrary\Source_Local::import_template() and indexes it as $el_template_post[0]['template_id'] after only an empty() check.
tests/php/static-analysis/elementor.php — Elementor_TemplateLibrary_Source_Local::import_template() lines 12-25 declares the possible WP_Error|array result used by the product's static analysis.
templates-patterns-collection.php — plugin header and TIOB_VERSION lines 3-5 and 57 identify the inspected release as 1.4.3, matching telemetry.
git blame attributes the relevant importer lines to commit e037047a (2020-07-21); the local clone has no tag containing its current revision, so a release boundary beyond the reported 1.4.3 could not be established.
Engineering notes
The failing request is an authenticated REST migration flow for users transitioning a Zelle/Zelle Lite front page to an Elementor template. The immediate import result is consumed inside the importer, before Rest_Server::run_front_page_migration() can inspect its return value with is_wp_error(). Telemetry identifies two occurrences on one site; it confirms this failure path but does not establish the frequency across Elementor versions or the underlying reason Elementor returned WP_Error.
Test coverage status
No direct PHP or e2e coverage for Zelle_Importer::import_zelle_frontpage() or the migrate_frontpage route was found during inspection. tests/rest-test.php covers other REST importers, while e2e-tests/specs/rest-endpoints.spec.js covers dismiss_migration but not front-page migration. The static-analysis stub records the union return type but does not execute the error path.
What to verify or explore next
- Reproduce an authenticated
POST to ti-sites-lib/v1/migrate_frontpage where Elementor's local template import returns WP_Error, and confirm the REST response does not terminate.
- Run the relevant PHP REST suite and an Elementor-enabled migration scenario on the reported WordPress 7.0.2 and PHP 8.4.11 environment.
- May be worth verifying which Elementor import validation or filesystem conditions produce the returned error and whether the result shape differs across supported Elementor releases.
Unknowns / follow-up
- The telemetry payload does not include the specific error code or message contained by Elementor's
WP_Error.
- The exact Elementor version and migration input that produced the observed failure are unavailable.
- No post-1.4.3 release boundary could be derived from tags in the inspected clone.
Confidence
Confidence: 98/100
Production telemetry captures the exact uncaught exception in the product's Zelle migration path, and source inspection confirms that a documented WP_Error|array return from Elementor is indexed as an array without an error guard.
Crash telemetry
|
|
| Occurrences |
2 |
| Distinct sites |
1 |
| First seen |
2026-08-04 21:39 UTC |
| Last seen |
2026-08-04 21:39 UTC |
| Crash location |
product:includes/Importers/Zelle_Importer.php:108 |
| Request context |
rest |
| Inside Themeisle SDK |
no |
| Product versions |
1.4.3 |
| WP versions |
7.0.2 |
| PHP versions |
8.4.11 |
| SDK versions |
3.3.58 |
Source: automated crash report — templates-patterns-collection, fingerprint 39ce9818455a692fad7cec7c2e3da39d
Generated by bug-report-triage (ID: bug-report-triage_6a7422fe914654.13905283)
Summary
The Zelle front-page migration can terminate with
Cannot use object of type WP_Error as arraywhen importing the generated Elementor template fails.Expected behavior: A failed template import returns a handled migration failure to the REST client.
Actual behavior: The REST request raises an uncaught exception before a response is returned.
Impact: The affected migration cannot complete and the administrator receives a crashed REST request instead of an actionable failure result.
Customer context
Cannot use object of type WP_Error as arrayReproduction notes
WP_Error.Cannot use object of type WP_Error as arrayexception at the migration import step.The precise Elementor failure condition and request payload are unavailable from telemetry.
Diagnosis
Conclusion
Production telemetry records the exact exception at the product's array access in the Zelle importer. The repository's Elementor static-analysis declaration documents
Source_Local::import_template()as returning eitherWP_Erroror an array.Zelle_Importer::import_zelle_frontpage()checks only for an empty result and then dereferences[0]['template_id']; aWP_Errorreaches that dereference and matches the captured error.Where this likely occurs
includes/Rest_Server.php—Rest_Server::init()lines 96-105 registers the authenticatedmigrate_frontpageREST route, andRest_Server::run_front_page_migration()lines 311-341 invokes the importer before converting returnedWP_Errorvalues into REST responses.includes/Importers/Zelle_Importer.php—Zelle_Importer::import_zelle_frontpage()lines 99-108 receives the result ofElementor\TemplateLibrary\Source_Local::import_template()and indexes it as$el_template_post[0]['template_id']after only anempty()check.tests/php/static-analysis/elementor.php—Elementor_TemplateLibrary_Source_Local::import_template()lines 12-25 declares the possibleWP_Error|arrayresult used by the product's static analysis.templates-patterns-collection.php— plugin header andTIOB_VERSIONlines 3-5 and 57 identify the inspected release as1.4.3, matching telemetry.git blameattributes the relevant importer lines to commite037047a(2020-07-21); the local clone has no tag containing its current revision, so a release boundary beyond the reported 1.4.3 could not be established.Engineering notes
The failing request is an authenticated REST migration flow for users transitioning a Zelle/Zelle Lite front page to an Elementor template. The immediate import result is consumed inside the importer, before
Rest_Server::run_front_page_migration()can inspect its return value withis_wp_error(). Telemetry identifies two occurrences on one site; it confirms this failure path but does not establish the frequency across Elementor versions or the underlying reason Elementor returnedWP_Error.Test coverage status
No direct PHP or e2e coverage for
Zelle_Importer::import_zelle_frontpage()or themigrate_frontpageroute was found during inspection.tests/rest-test.phpcovers other REST importers, whilee2e-tests/specs/rest-endpoints.spec.jscoversdismiss_migrationbut not front-page migration. The static-analysis stub records the union return type but does not execute the error path.What to verify or explore next
POSTtoti-sites-lib/v1/migrate_frontpagewhere Elementor's local template import returnsWP_Error, and confirm the REST response does not terminate.Unknowns / follow-up
WP_Error.Confidence
Confidence: 98/100
Production telemetry captures the exact uncaught exception in the product's Zelle migration path, and source inspection confirms that a documented
WP_Error|arrayreturn from Elementor is indexed as an array without an error guard.Crash telemetry
product:includes/Importers/Zelle_Importer.php:108Source: automated crash report — templates-patterns-collection, fingerprint
39ce9818455a692fad7cec7c2e3da39dGenerated by bug-report-triage (ID: bug-report-triage_6a7422fe914654.13905283)