Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined Index ID in customizer on post delete with customize-posts plugin #935

Closed
mohdsayed opened this issue Aug 21, 2017 · 0 comments
Closed

Comments

@mohdsayed
Copy link
Contributor

When trashing a post in customizer with customize-posts plugin, stream causes this error

Notice: Undefined index: ID in /srv/www/wp.dev/docroot/wp-content/plugins/stream/classes/class-alerts-list.php on line 341

Its because customize-posts plugin is invoking wp_insert_post_data filter again and overriding $postarr to $unsanitized_post_data.
https://github.com/xwp/wp-customize-posts/blob/develop/php/class-wp-customize-post-setting.php#L474

So when Alerts_List::save_alert_inline_edit hooked to wp_insert_post_data is called it does not get $postarr['ID'] hence causing the above error.

https://github.com/xwp/stream/blob/develop/classes/class-alerts-list.php#L341

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant