You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes: Plugin file does not exist error after auto-update
Problem:
- After updating to v1.4.3, plugin gets deactivated
- WordPress shows: errorvault-wordpress/errorvault.php does not exist
- Update process not properly preserving plugin structure
Root Cause:
- after_install hook was processing ALL plugin updates
- Not checking if the update was for our specific plugin
- Missing destination_name setting for WordPress recognition
Solution:
- Add plugin-specific check in after_install
- Only process updates where hook_extra[plugin] matches our slug
- Set result[destination_name] = errorvault-wordpress
- Add upgrader_clear_destination filter for pre-update handling
Changes:
- Check hook_extra[plugin] === this->plugin_slug before processing
- Set destination_name to ensure WordPress recognizes folder
- Add clear_destination filter for better update flow
- Enhanced logging with plugin basename tracking
This ensures:
1. Only our plugin updates are processed by after_install
2. WordPress maintains correct plugin path after update
3. Plugin remains activated after successful update
4. Better debugging with detailed logs