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.
 

Sanmu

Member
Hello, I just want to let wordpress comment section is used by xenforo users. I don't need wordpress user database.

Followed by this instruction.

I installed this plugin on my WordPress website: mydomain.com. My xenforo forum is under a folder like mydomain.com/forum.

I filled in xenforo URL in wordpress ACP.
Generated a super user API from ACP panel Xenforo and filled it in WordPress.
on wordpress it shows "Successfully connected to your XenForo API".


I think my integration method is XF Session Cookie and no need to install any adds-on on xenforo sides.

But how this plugin works? When I try to comment on WordPress under the article, there is nothing special, anything just like before.

If this plugin can not solve my problem, how about Xpress? Can I still purchase Xpress? (it seems discontinued.)
 
Last edited:

mattrogowski

Active member
Are you trying to comment on an existing WP post? You’ll need to link a thread to it, otherwise it won’t know which thread to post to. Xpress would work the same way.
 

Sanmu

Member
Yes, tried to comment on an existing WP post.

Ok, after creating a dedicated user API for WordPress users, now post an article on WordPress news portal, it automatically creates and posts on a thread on the forum. And if forum users comment on it, it will appear on wordpress under the article. And if forum users go to wordpress portal, they can comment on it without the need to log in again since the comment section was occupied by xenforo.

It seems that this plugin is not all like what I want.

I just want a plugin for all users to be seamlessly used between wordpress and xenforo.


What I have seen some places have to be improved:
1. Need to remove "Go to thread" button at the end of article. If so, how?
2. Comment section is something too ugly for wordpress.

1635086275243.png

3. How to deal with the thread post content on xenforo website? It is just not a good idea to dupliate the same content from wordpress to xenforo, even for SEO it is not so good.

There are any better solutions?
 
Last edited:

mattrogowski

Active member
If you only have WordPress users they'd need to register for XF account, it doesn't create XF accounts from a WP account. It needs an XF user to post as but doesn't do full user syncing.

Removing the go to thread link would require an edit, I can add a backlog task to make it an option. For the comment styling, it uses the same markup as default comments use so will style them the same as it would default comments, but it won't be possible to perfectly match every theme that exists or support customisations for every site out of the box.
 

Sanmu

Member
I tried deleting "Go to thread" under the article on WordPress, but there is no way in Gutenberg to delete it.
In the forum in the thread there is a "Go to post", I can delete this one without any problems, but the "Go to thread" is still under the article on WordPress.

3. How to deal with the thread post content on xenforo website? It is just not a good idea to duplicate the same content from wordpress to xenforo, even for SEO it is not so good. Maybe there are some ways to hide the news thread on xenforo just like the PC reports for Advance forms?

4. After many times testing, now it has a bug: When I posted a comment, it appears 2 times in the comment section and 2 times on xenforo forum.


Anyway, this wordpress plugin is a good idea to replace your wordpress comment section by using something from xenforo. You just need to disable your wordpress registration, it is a great idea. And you can just put your Xenforo Login/register entry to the WordPress portal.

But as I mentioned above, there are at least 4 problems that need to be solved.

This free plugin almost suitable for me.

My website struction:

www.domain.com -- wordpress (I almost don't have wordpress users)
www.domain.com/forum -- xenforo (I have many users here)
 
Last edited:
Top