After digging through the Patreon Wordpress (patreon-connect) plugin code, I’ve found the method Patreon_Content_Sync::check_replace_patreon_images_with_local_images
must be always called with 3 parameters, but the third parameter $post_id
is missing when being called in Patreon_Content_Sync::add_new_patreon_post
method, throwing the fatal error and interrupting the post import. This only happens if there are some images in the post content.
For the record, I’ve been developing a quick fix by doing the following in the patreon-connect/classes/patreon_content_sync.php
file:
- move the lines 168:172 to line 203 (handle images after post has been inserted)
- add
$inserted_post_id
as 3rd parameter to$this->check_replace_patreon_images_with_local_images