Article and Forum Connect: XenForo and WordPress

Article and Forum Connect: XenForo and WordPress 1.0.0

No permission to download

mattrogowski

Active member
So I have tried this out and tried to authenticate on WP with the cookie settings and nothing. Just doesn't seem to work. I am not sure exactly what I am doing wrong but it just won't work and I have read through all the docs twice.

Also, it's still not clear how you get your hands on the plus version. I can't find where to get it.
What’s your forum and blog setup? Is one in a subfolder or are you using subdomains? Have you changed the cookie prefix from the default?

The Plus version is in our AC Resources premium subscription plan which you need to contact us directly for.
 

Rushster

Member
One WP site with forum in subdirectory (/forums) and no change to cookies. On the same domain.

Interested in looking at a plan but not until I can at least get the basics working. I have followed the docs carefully with the API etc and it's all connected fine, it finds the forums etc in the WP backend so I know it's connected.

I have actually used your old WP bridge which I know was discontinued but it did work.
 

mattrogowski

Active member
One WP site with forum in subdirectory (/forums) and no change to cookies. On the same domain.

Interested in looking at a plan but not until I can at least get the basics working. I have followed the docs carefully with the API etc and it's all connected fine, it finds the forums etc in the WP backend so I know it's connected.

I have actually used your old WP bridge which I know was discontinued but it did work.
Can you PM me the URLs and a test account? The cookies are set on the domain so they'd be available on both, otherwise logging into the forum wouldn't work either. Shoot me details over and I'll take a look.
 

horchata

Member
Code:
 Warning: file_exists(): open_basedir restriction in effect. File(/home/composer.json) is not within the allowed path(s): (/home/cocinasu/:/tmp/:/var/tmp/:/opt/alt/php74/usr/share/pear/:/dev/urandom:/usr/local/php74/lib/:/usr/local/php74/lib/:/usr/local/php72/lib/:/usr/local/php56/lib/:/usr/local/php80/lib/:/usr/local/lib/php/) in /home/cocinasu/domains/cocinasushi.com/public_html/wp-content/plugins/article-forum-connect/vendor/haydenpierce/class-finder/src/AppConfig.php on line 32

It gives me this error when trying to activate the plugin and it also does not let me install it in xenforo from install and upgrade

any suggestions?
 

Brogan

XenForo moderator
Staff member
The error is due to a server limitation - open_basedir restriction in effect.

Contact your host and they will be able to resolve it.
 

horchata

Member
I have contacted the hosting and it tells me that all the permissions are correct ...

The plugin looks for the composer in this path "/home/composer.json" and it should look for it in "/home/cocinasu/composer.json" but I don't know where to modify it ....

@Mr Lucky Could you tell me how did you fix the problem? you got the same error
 

mattrogowski

Active member
I thought it was a server issue too, but it looks like the composer.json file is missing from the zip still - not sure how that's happened as we definitely replaced the file in June and it's worked for other people since. Anyway, can you download a fresh copy from the site, it will have a composer.json file now, upload that to /public_html/wp-content/plugins/article-forum-connect and should resolve it.

Also, it won't upload to the XF addon page as it's only a WP plugin.
 

horchata

Member
I thought it was a server issue too, but it looks like the composer.json file is missing from the zip still - not sure how that's happened as we definitely replaced the file in June and it's worked for other people since. Anyway, can you download a fresh copy from the site, it will have a composer.json file now, upload that to /public_html/wp-content/plugins/article-forum-connect and should resolve it.

Also, it won't upload to the XF addon page as it's only a WP plugin.
works perfectly! tnksss
 

FedericoS

Active member
Hello,

I've installed this plugin to my WordPress website and put the correct URL and API Key. The WordPress admin panel keeps to say this:

Failed to connect to your XenForo API. Check your credentials.
  • Integration type: Connected WP/XF users
  • Connected user method: Login Credentials
 

jb-net

Active member
Hi,

I installed it, createded an API User with the correct permission and sucessfully connected the plugin (using it on the same domain)
Successfully connected to your XenForo API.
Perfect!
Every time I save the Wordpress setting page the last time of usage of the API key gets updates - seems good!
I left all the settings at default values and granted the XF Super user key all the requested permissions.

But if I create a new blog post it fails with the following error in the wordpress logs:
PHP Fatal error: Uncaught XFApi\Exception\RequestException\NoPermissionRequestException: You do not have permission to view this page or perform this action. in /home/mydomain.com/public_html/blog1/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php:396
Stack trace:
#0 /home/mydomain.com/public_html/blog1/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php(362): XFApi\Client->handleException()
#1 /home/mydomain.com/public_html/blog1/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php(211): XFApi\Client->request()
#2 /home/mydomain.com/public_html/blog1/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Domain/AbstractDomain.php(67): XFApi\Client->post()
#3 /home/mydomain.com/public_html/blog1/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Domain/XF/ThreadDomain.php(16): XFApi\Domain\AbstractDomain->post()
#4 /home/mydomain.com/public_html/blog1/wp-content/plugins/arti in /home/mydomain.com/public_html/blog1/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php on line 396
In Xenforo the last time of API key usage doesn't get updated, it stays at the timestamp of the last time I saved the wordpress plugin setting page.

SOLVED: I found the problem. I needed a second API key just for the user. After I created and linked the second key it works.
 
Last edited:

jb-net

Active member
If a User without an Xenforo avatar posts a comment I get the following error in Wordpress:

Notice: Undefined variable: avatar in /home/public_html/blog1/wp-content/plugins/article-forum-connect/src/AudentioForumConnect/AudentioForumConnect.php on line 419

Notice
: Undefined variable: avatar2x in /home/public_html/blog1/wp-content/plugins/article-forum-connect/src/AudentioForumConnect/AudentioForumConnect.php on line 420

That doesn't look to good:
1630662688619.png
 

mattrogowski

Active member
Hello,

I've installed this plugin to my WordPress website and put the correct URL and API Key. The WordPress admin panel keeps to say this:


  • Integration type: Connected WP/XF users
  • Connected user method: Login Credentials
Do you have a thread with the ID of 1? I think it does a test API call to find thread ID 1 (I thought it was 1 thread, not ID 1) so it'll probably be that if the API key is definitely correct. I'll need to update how it checks that.
Hi,

I installed it, createded an API User with the correct permission and sucessfully connected the plugin (using it on the same domain)

Perfect!
Every time I save the Wordpress setting page the last time of usage of the API key gets updates - seems good!
I left all the settings at default values and granted the XF Super user key all the requested permissions.

But if I create a new blog post it fails with the following error in the wordpress logs:

In Xenforo the last time of API key usage doesn't get updated, it stays at the timestamp of the last time I saved the wordpress plugin setting page.

SOLVED: I found the problem. I needed a second API key just for the user. After I created and linked the second key it works.
Yes, you'll need to either add the API key for the user, or just enter their forum user ID in the user settings and then it'll use the super user API key.
If a User without an Xenforo avatar posts a comment I get the following error in Wordpress:



That doesn't look to good:
View attachment 256935
Thanks for reporting this, all my test users had gravatars set up. I'll fix this and make it fall back to a default avatar.
 

FedericoS

Active member
Do you have a thread with the ID of 1? I think it does a test API call to find thread ID 1 (I thought it was 1 thread, not ID 1) so it'll probably be that if the API key is definitely correct. I'll need to update how it checks that.
Yes, I created it after configuring the API Key.
 

mattrogowski

Active member
Yes, I created it after configuring the API Key.
So you're saying there is a thread with an ID of 1, and it's still saying it can't connect? In that case, double check the URL and API key are definitely correct. It will only go to the failed message if the API call test fails with an error. If you're sure everything is correct, if you can PM me XF and WP admin details and cPanel/FTP details, I can debug where it's failing and what the error response is.
 
Top