Skip to content

fix: fatal error on servers with broken FTP filesystem configuration#1258

Open
HardeepAsrani wants to merge 1 commit intodevelopmentfrom
fix/issue-1064
Open

fix: fatal error on servers with broken FTP filesystem configuration#1258
HardeepAsrani wants to merge 1 commit intodevelopmentfrom
fix/issue-1064

Conversation

@HardeepAsrani
Copy link
Member

Summary

On some server setups (e.g. nginx with FTP configured but no active connection), WordPress initializes its FTP filesystem driver but fails when it tries to use it, throwing a PHP fatal error that crashes the page. Wrap the filesystem calls in a try/catch so any such failure falls back to the bundled customization.js gracefully.

Will affect visual aspect of the product

YES/NO

Screenshots

Test instructions

  • In wp-config.php, add define( 'FS_METHOD', 'ftpext' ); — this forces WordPress to use the FTP filesystem driver without a real connection.
  • Load any frontend page that has a Visualizer chart.
  • Before the fix: PHP fatal error, page crashes.
  • After the fix: page loads normally, charts render using the bundled customization.js.
  • Remove the define from wp-config.php when done.

Check before Pull Request is ready:

Closes #1064.

On some server setups (e.g. nginx with FTP configured but no active
connection), WordPress initializes its FTP filesystem driver but fails
when it tries to use it, throwing a PHP fatal error that crashes the
page. Wrap the filesystem calls in a try/catch so any such failure
falls back to the bundled customization.js gracefully.
@HardeepAsrani HardeepAsrani added the pr-checklist-skip Allow this Pull Request to skip checklist. label Mar 2, 2026
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Mar 2, 2026
@pirate-bot
Copy link
Contributor

Plugin build for e296e15 is ready 🛎️!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants