Article and Forum Connect: XenForo and WordPress [Deleted]

Unfortunately your WP plugin is not correctly configured to be able to be translated, despite your answer which indicates that you have built this WP according to the correct procedures, which is the case, you have not done the necessary for it to be translatable, neither via WP nor via a third-party editor such as Poedit.

I translated this one https://xenforo.com/community/resou...ordpress-integration-french-translation.9054/ very easily thanks to the .po file which is necessary for each WP plugin to be translatable. I sent you a DM a few days ago to let you know all about this but you haven't responded.
 
Hi, I have a couple of questions specific to my site and possible usage of this.

I want to create a thread when I install this for every item in a specific tag, can it do that? Or is it limited to the last x posts? And can it do a specific WP tag only? And does it date the forum post current, or back date it/match the WP date?

I sometimes post retro game news on the date it happened. Can this find something I've posted and create a thread for that?

Thanks!
 
Unfortunately your WP plugin is not correctly configured to be able to be translated, despite your answer which indicates that you have built this WP according to the correct procedures, which is the case, you have not done the necessary for it to be translatable, neither via WP nor via a third-party editor such as Poedit.

I translated this one https://xenforo.com/community/resou...ordpress-integration-french-translation.9054/ very easily thanks to the .po file which is necessary for each WP plugin to be translatable. I sent you a DM a few days ago to let you know all about this but you haven't responded.
Sorry, I haven't had a chance to look at this this week as have been working on other things.

As I said, I'm not currently aware of how translations work in WP beyond using the documented __ function when outputting text, if there needs to be a manual file with strings built or anything like that I'd need to look into how this is supposed to be done in a way that isn't going to be a massive overhead each time a build is produced. It's probably not going to be something that's done soon but may be at some point in the future.
 
Hi, I have a couple of questions specific to my site and possible usage of this.

I want to create a thread when I install this for every item in a specific tag, can it do that? Or is it limited to the last x posts? And can it do a specific WP tag only? And does it date the forum post current, or back date it/match the WP date?

I sometimes post retro game news on the date it happened. Can this find something I've posted and create a thread for that?

Thanks!
Currently the thread creation is either set globally or enabled and disabled per post, it doesn't support conditional posting based on tags. It also doesn't create threads retrospectively, only after the plugin is installed. If you edit an older post and save it, and the settings for creating a thread are enabled, it will make one when you save the post.
 
Currently the thread creation is either set globally or enabled and disabled per post, it doesn't support conditional posting based on tags. It also doesn't create threads retrospectively, only after the plugin is installed. If you edit an older post and save it, and the settings for creating a thread are enabled, it will make one when you save the post.
Thanks for the quick answer. When you say the setting to create a thread is enabled, is that as simple as a checkbox in wordpress I can deselect when posting outside the 1 tag I want?
 
Sorry, I haven't had a chance to look at this this week as have been working on other things.

As I said, I'm not currently aware of how translations work in WP beyond using the documented __ function when outputting text, if there needs to be a manual file with strings built or anything like that I'd need to look into how this is supposed to be done in a way that isn't going to be a massive overhead each time a build is produced. It's probably not going to be something that's done soon but may be at some point in the future.

There's a CLI command to generate a PO/POT file automatically it looks like.
 
Thanks for the quick answer. When you say the setting to create a thread is enabled, is that as simple as a checkbox in wordpress I can deselect when posting outside the 1 tag I want?
Correct - you can set default thread creation settings, for example you may want to set the forum and maybe a prefix, plus the user to post as, but leave the option to actually create the thread set to No:

1676062006184.webp
Then when you create the post, there will be a meta box where you can set Create Thread to Yes, and it will post.

1676062114684.webp

So, it can be done conditionally if you manually select to create the thread, just can't currently be done automatically.
 

There's a CLI command to generate a PO/POT file automatically it looks like.
Thank you, I'll look into it. The phrases are output with a helper function so the translation group name doesn't have to be passed through each time, that probably doesn't work with existing tools like this which is likely the issue.
 
So, I downloaded and reading the readme under == Installation == when I search "Article and Forum Connect: XenForo and WP" or even just "xenforo" in the WordPress plugins area there's no result for this plugin?

Edit: Nevermind. The readme is with the plugin that it is telling me to go find where it can't be found. Got it. :)
 
Last edited:
Ah, yeah I forgot that was in there, that's from when we planned to have the plugin in the WordPress plugin directory but we couldn't deploy it because their build servers didn't support PHP 8. You'll need to just upload the article-forum-connect folder to wp-content/plugins and activate, and the options will be under Settings.
 
Last edited:
Ok, so I have it installed and the plugin says everything is working. It can see the forums and I can select which forum the post will go into in wordpress settings, etc.

But when I go to update edit or post any new post (whether I select to create a forum thread or not): "There has been a critical error on this website. Please check your site admin email inbox for instructions"

The result is that it publishes the post on wordpress when it gives that error but does not create a thread in the forum.

An error of type E_ERROR was caused in line 396 of the file /racesimcentral/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php. Error message: Uncaught XFApi\Exception\RequestException\NoPermissionRequestException: You do not have permission to view this page or perform this action. in /racesimcentral/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php:396

Stack trace:

#0 /racesimcentral/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php(362): XFApi\Client->handleException(403, Array)

#1 /racesimcentral/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Client.php(211): XFApi\Client->request('POST', 'threads', Array, Array, Array)

#2 /racesimcentral/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Domain/AbstractDomain.php(67): XFApi\Client->post('threads', Array, Array, Array)

#3 /racesimcentral/wp-content/plugins/article-forum-connect/vendor/xfapi/xfapi-php/src/Domain/XF/ThreadDomain.php(16): XFApi\Domain\AbstractDomain->post
 
You have probably either not set the scopes on the API key properly (it explains which scopes you need on the settings page and has an API key wizard) or not set a XF user ID on the WP user (there will be a notice on the options page informing you of this).
 
You have probably either not set the scopes on the API key properly (it explains which scopes you need on the settings page and has an API key wizard) or not set a XF user ID on the WP user (there will be a notice on the options page informing you of this).
Super user key set with auth, node read, thread read and thread write.
User in WP given ID "1" which is the user number on xenforo. It didn't require anything but the number there, right? Obviously API entered on that user, too.
 
Super user key set with auth, node read, thread read and thread write.
User in WP given ID "1" which is the user number on xenforo. It didn't require anything but the number there, right? Obviously API entered on that user, too.
You don't need an API key on the user unless the wizard says you do, just the ID is fine. It says this under the field - "You do not always eed an API key. Use the API Key wizard to see if you need one". If you've entered an API key and that doesn't have the correct scopes, it won't work. The user ID will need to be set on either the WP user you've selected in the thread settings, or your user if you haven't selected a user.

Check the API key and scopes, the error message is coming from XenForo and is saying the key doesn't have permission to perform the API call, so does not appear to be correct as XF is not able to perform the action.
 
Last edited:
It was the inherited user permissions for that forum. Even though the usergroup had permission I had to assign the specific user with permissions that overrode the inherited usergroup ones.
 
Hello @mattrogowski , thanks for the effort put on this awesome plugin. I am using it but recently, with a theme change it stopped working. I am using default new wordpress theme "twenty twenty three" that uses the block system.

The only thing I can see now is the number of comments:

1684577700522.png
Maybe you can help me with this issue.

UPDATE:

Seems that i managed to se comments forms again, but comments are generated in default wp mode, the counterpart is post in xenforo thread but not pulled when display the template part, so only new comments (native wp) are shown and worst, if somebody edits or delete a comment it dowsnt work properly, leaving them not equal.

Kind regards
 
Last edited:
So the way the plugin works is it uses the WordPress hook to define the comments template, and sets it to be the template for the plugin. So it should just work with any theme that uses the standard comments function in the template, which the default WordPress themes will. It will stop switching the template if there’s an error with your API connection though. If you go to the admin options page for the plugin, does it say the connection is okay?
 
So the way the plugin works is it uses the WordPress hook to define the comments template, and sets it to be the template for the plugin. So it should just work with any theme that uses the standard comments function in the template, which the default WordPress themes will. It will stop switching the template if there’s an error with your API connection though. If you go to the admin options page for the plugin, does it say the connection is okay?
Yes, the connection its ok. Tried with other themes and works, is something with this (last wordpress official theme) - please let me know how can i help you to debug this. This is the official url for the theme https://wordpress.org/themes/twentytwentythree/
 
@mattrogowski , the theme editor of the new theme is different than wordpress previous themes, it uses a new system of blocks, you can personalize it

1684678437072.png

I leaved it untouched, but I think the way comments are included has changed. Wich hook do you use when replacing the comments section in wordpress?

1684679343257.png

1684679429307.webp

1684679517588.webp

Kind regards
 
Last edited:
Back
Top Bottom