Compatibility issue with WP Automatic & WEB Stories
-
The FIFU plugin causes a Fatal error when inserting a new post programmatically using wp_insert_post function when Web Stories plugin is enabled
WordPress Automatic Plugin is an auto posting plugin that can import from any site to WordPress posts
The Fatal error that prevented the post insertion was triggered by WebStories when validating the type of the post_parent insider the data arrayour plugin did not set the post_parent to a string but it was passed as integer to your plugin and your FIFU plugin converted its type to a string which then was the root cause of the issue
Issue was caused on this file where you str_replace the whole data arraydata array contains not only strings but contains Integer also like the post_parent and the menu_order
passing an array to to the str_replace will loop all keys of this array and result in its value to be a string even if this was integer
please correct this issue but only doing the search and replace on the content or desired keys and do not apply it to the whole array and convert integers to strings
to check the types of the array passed by WordPress do use var_dump(data); before doing your modifications and after doing them to see how the types got changed
- The topic ‘Compatibility issue with WP Automatic & WEB Stories’ is closed to new replies.