10up / distributor

Share content between your websites.
https://distributorplugin.com
GNU General Public License v2.0
618 stars 156 forks source link

Could not pull content from connection due to error. API endpoint error. #1232

Open IonTulbure opened 1 month ago

IonTulbure commented 1 month ago

Describe the bug

Distributor stable Version 2.0.4.

I can establish connection from site X to site Y on a Shared Hosting (Hostinger)

image

image

However at Pull Content screen i get this error:

Could not pull content from connection due to error. API endpoint error.

image


On both of these 2 websites i get the following error (Query Monitor)

Post: https://site.xyz/wp-json/wp/v2/distributor/list-pull-content  (confidential)
500 Internal Server Error
Caller: 
Distributor\ExternalConnections\WordPressExternalConnection->remote_post()
wp-content/plugins/distributor-stable/includes/classes/ExternalConnections/WordPressExternalConnection.php:243
Distributor\ExternalConnections\WordPressExternalConnection->remote_get()
wp-content/plugins/distributor-stable/includes/classes/ExternalConnections/WordPressExternalConnection.php:176
Distributor\PullListTable->prepare_items()
wp-content/plugins/distributor-stable/includes/classes/PullListTable.php:530
Distributor\PullUI\dashboard()
wp-content/plugins/distributor-stable/includes/pull-ui.php:529
do_action('distributor_page_pull')
wp-includes/plugin.php:517 
Component: Plugin: distributor-stable

Besides Distributor everything works fine and fast. Hosting has enough resources. I tried to deactivate other plugins and change theme but it gave no result. Also i switched between various PHP versions (7.4 -> 8.1) and also no luck.

On both sites Rest Api is available : image

Steps to Reproduce

  1. Establish connection between sites
  2. Go to Pull Content screen
  3. Use Query Monitor to catch errors image

Screenshots, screen recording, code snippet

See Description

Environment information

Env info:

Wordpress: 6.5.4
SSl: yes
Web Server: LiteSpeed
PHP: 8.1.27 (Supports 64bit values)
PHP memory:     2048M
PHP max input variables 5000
PHP time limit  360
Max input time  360
cURL version    7.87.0 OpenSSL/1.1.1w
Extension   mysqli
Server version  10.11.7-MariaDB-cll-lve

WordPress information


Version 6.5.4
Site Language   en_US
User Language   en_US
Timezone    +00:00
Home URL    https://site.xyz
Site URL    https://site.xyz
Permalink structure /%postname%/
Is this site using HTTPS?   Yes
Is this a multisite?    No
Can anyone register on this site?   No
Is this site discouraging search engines?   Yes
Default comment status  Open
Environment type    local
User count  2
Communication with WordPress.org    WordPress.org is reachable

Code of Conduct