Prinftul Shop Sync Failed
-
Hey guys,
So I’m trying to sync my Printful PoD shop with Woocommerce, however, it seems that Wordfence is blocking the syncing process. If I turn off the plugin, it works, however, that obviously isn’t the solution.
Do you guys have a suggestion for this? Anything you need for this? (sorry, noob here)Best,
-
Hi @previve,
Can you look under Wordfence -> Live Traffic, and then attempt to sync?
What reason does Wordfence state for blocking the sync request?
Dave
Nothing’s flagging up that comes from Printful :S
The Error I receive from Printful is:
Error received from your server:
HTTP Error 500 Internal Server ErrorBtw. maybe this is correlated. I have issues uploading pictures to my wordpress media when wordfence is running. Because Printful uploads pictures along the synch process, maybe this is where the conflict occurs?
BEst,
Can I have you check your error_logs for PHP?
It might be located at
/usr/local/apache/logs/error_log
.You can also check Wordfence -> Tools -> Diagnostics -> Log Files.
If it’s only getting blocked when Wordfence is active, there must be some firewall rule that’s blocking the Printful request.
Dave
Hey,
Sorry for the delay. Hopefully the following will help
WP Admin log:
“PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version.”Debug:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 54805736 bytes) in /home3/steve90/public_html/wp-includes/class-requests.php on line 381
These refer to:
public static function request($url, $headers = array(), $data = array(), $type = self::GET, $options = array()) {
if (empty($options[‘type’])) {
$options[‘type’] = $type;
}
$options = array_merge(self::get_default_options(), $options);self::set_defaults($url, $headers, $data, $type, $options);
$options[‘hooks’]->dispatch(‘requests.before_request’, array(&$url, &$headers, &$data, &$type, &$options));
if (!empty($options[‘transport’])) {
$transport = $options[‘transport’];if (is_string($options[‘transport’])) {
$transport = new $transport();
}
}
else {
$need_ssl = (0 === stripos($url, ‘https://’));
$capabilities = array(‘ssl’ => $need_ssl);
$transport = self::get_transport($capabilities);
}
$response = $transport->request($url, $headers, $data, $options);$options[‘hooks’]->dispatch(‘requests.before_parse’, array(&$response, $url, $headers, $data, $type, $options));
return self::parse_response($response, $url, $headers, $data, $options);
}01-Dec-2018 15:00:02 UTC] PHP Notice: Trying to get property of non-object in /home3/steve90/public_html/wp-content/plugins/wp-members/inc/class-wp-members.php on line 1487
[01-Dec-2018 15:00:02 UTC] PHP Notice: Trying to get property of non-object in /home3/steve90/public_html/wp-content/plugins/wp-members/inc/class-wp-members.php on line 1580
[01-Dec-2018 15:00:02 UTC] PHP Notice: Trying to get property of non-object in /home3/steve90/public_html/wp-content/plugins/wp-members/inc/class-wp-members.php on line 1580Refers to
$autoex = ( isset( $wpmem->autoex[ $post->post_type ] ) && 1 == $wpmem->autoex[ $post->post_type ][‘enabled’] ) ? $wpmem->autoex[ $post->post_type ] : false;And
$content = apply_filters( ‘wpmem_auto_excerpt’, $content, $post->ID, $post->post_type );
As for the error listing WP-Members, it appears that the WP_Members::do_excerpt() is run but the post object does not exist. Ordinarily, this method would be run from another method that is hooked to the_content filter. But it can also be run through the WP-Members API.
A potential change to the method to check to see of the $post object actually exists before continuing may solve the issue. A potential change is applied in the following gist which you can use to replace wp-members/inc/class-wp-members.php:
https://gist.github.com/butlerblog/a5af4f2bb2087bf47b18e3e25502fbd7
If that solves the PHP notices for “Trying to get property of non-object” please let me know.
If that solves the PHP notices for “Trying to get property of non-object” please let me know.
It did, however, this just flagged up since:
[04-Dec-2018 03:55:41 UTC] PHP Notice: Undefined variable: has_post in /home3/steve90/public_html/wp-content/plugins/wp-members/inc/class-wp-members.php on line 1499
Thanks for taking the time!
So, just now it worked!
I updated my PHP to 7.1 Edge & did your changes. Don’t know what was the actual solution but it seems that it works now 🙂
- The topic ‘Prinftul Shop Sync Failed’ is closed to new replies.