XPress - A theme and bridge for bringing WordPress into XenForo [Deleted]

Edit: This seems to be the underlying problem:

<b>Fatal error</b>: Uncaught Error: Class 'XF' not found in /var/www/html/wp_blog/wp-content/themes/wp-xpress-theme/front-page.php:18

Has anyone else experienced the Class 'XF' not found in ...front-page.php:18 before?

The line in question in that file is:

XPress::app()->registry()->set('xpress', array_merge($registryValues, ['title' => \XF: phrase('thxpress_home')]));
That's a symptom of a not yet correctly established link that happens when you try to use the theme without a working bridge, not the underlying problem. As Elmer stated, the exact error that XLink ran into when trying to establish the link is logged under internal_data/xlink_errors on your XenForo installation.
 
Did any of you guys figure out a solution to the 404 XLink error? I'm getting the same, with the issue seeming like it relates the the "rest_route" part of the call being made to Wordpress.

Edit: It seems like it's a problem with a call the Wordpress API. In a previous version of XPress prior to XLink I didn't experience this problem and the connection between XF and WP worked well.

Edit: This seems to be the underlying problem:

<b>Fatal error</b>: Uncaught Error: Class 'XF' not found in /var/www/html/wp_blog/wp-content/themes/wp-xpress-theme/front-page.php:18

Has anyone else experienced the Class 'XF' not found in ...front-page.php:18 before?

The line in question in that file is:

XPress::app()->registry()->set('xpress', array_merge($registryValues, ['title' => \XF: phrase('thxpress_home')]));
No, I stopped using this addon since that day. I remember having problems with CloudFlare. If I disabled CloudFlare it worked, also you need to specify an API key or password somewhere in the wordpress config file so that it connects to your xenforo ( or viseversa I think, in the xenforo config file (cant remember)).
 
That's a symptom of a not yet correctly established link that happens when you try to use the theme without a working bridge, not the underlying problem. As Elmer stated, the exact error that XLink ran into when trying to establish the link is logged under internal_data/xlink_errors on your XenForo installation.
Before upgrading the plugin and theme, but having the addon upgraded, this error occurs in /xlink_errors:

GuzzleHttp\Exception\ClientException: Client error: GET <website redacted>?xf_user=1&rest_route=%2Fxpress%2Fv1%2Fuser&id=1 resulted in a 404 Not Found response:
{"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}
in /var/www/html/src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

As far as I'm aware, this is caused by the correct REST routes to /xpress not being available in /wp-json until I've upgraded the plugin and theme, where this error then stops.

After upgrading everything to the most recent versions, I don't get any further errors in xlink_errors because now the REST routes to /xpress/v1/users etc have been added to the wp API, but instead none of the pages of the wp part of the site work (all with a fatal error) and when wp debug is enabled, the error message that shows on every wp page is:

Fatal error: Uncaught Error: Class 'XF' not found in /var/www/html/wp-content/themes/wp-xpress-theme/front-page.php:18 Stack trace: #0 /var/www/html/wp-includes/template-loader.php(98): include() #1 /var/www/html/wp-blog-header.php(19): require_once('/var/www/htm...') #2 /var/www/html/index.php(17): require('/var/www/htm...') #3 {main} thrown in /var/www/html/wp-content/themes/wp-xpress-theme/front-page.php on line 18

So from my point of view, I've got no way of knowing what needs to be edited with regards to the link in order to get this working - only an error message relating to /front-page and 'XF' not being found there, which now might just be a symptom, but with no indication of the cause.

It's an understatement to say that having this problem solved so that I could move on with other more important things would make me feel profound inner joy and happiness.

I realise that you guys are really under the pump dealing with hundreds of other people as well, but after renewing 3 of the 6 Themehouse products I own specifically to try to deal with this problem, it would be very much appreciated to get some of your time and focus to directly solve this problem today.

I've completed everything as per the documentation, and now have the newest possible versions of XF, UIX2, XLink and XPress, so really I can't do much more than I have already done in order to try to facilitate a successful transition to a fully-working XPress website, and obviously as you can imagine, this is negatively impacting a project that I've been working hard on for a very long time and care very much about.

Edit:

I was just trying anything I could think of in XLink > Platforms, and changed the Disk Path from '/var/www/html' to '/var/www/html/' - notice the '/' at the end.

A few things happened:

  • The fatal error on all wp pages is gone and the pages are loading
  • The blog posts/pages are broken however, with css problems throughout, but all text and images on the page.
  • Categories aren't displaying the scrolling secondary nav bar
  • The featured grid isn't showing at all even though it's set up in options.
  • In XLink > Platform, the Disk Path text has now returned to '/var/www/html'

1. I had the exact same settings for a previous version of XPress, without the '/' at the end, and it worked perfectly, so how would anyone know you needed to add another '/' or why that even worked.

2. You should have something in the text for this field saying that '/' needs to be at the end. If this was there it could have saved me some hassle.


Screenshot 2020-03-06 at 09.11.50.png

3. Because no further xlink_error logs have been created, I'm assuming the link is no longer the problem (with my pages being glitchy), but something to do with XPress? It seems like maybe something to do with thxpress_wrapper, the featured grid isn't rendering at all on the wp homepage, none of the categories are showing in the scrolling secondary nav bar any more either.
 
Last edited:
Did any of you guys figure out a solution to the 404 XLink error? I'm getting the same, with the issue seeming like it relates the the "rest_route" part of the call being made to Wordpress.

No and frankly I didn't care anymore. I just moved to another solutions. I just hated what direction this project took.

Now I sleep well at nights.
 
No, I stopped using this addon since that day.
No and frankly I didn't care anymore.
If I can just get this working it will be worth it, the addon itself is really nice when it works (like the earlier version I had that doesn't need XLink which I upgraded from) - but there's a bunch of factors that feel like this has been so much tougher than it needs to be.

It just feels like these guys are doing the best they can to manage everything, but are either understaffed or have way oversold this addon. They need to hire about another 1.5 support staff because 1 response to questions per day from the only team member it seems like deals with the technical side of XPress, mid-way through trying to fix serious problems like this, is painful.
 
What is your other solution if I may ask?

@Jaxel 's and @Bob 's solutions. I don't want to specify directly their products as this is a TH's XPress discussion thread for their addon and that could not be right. Just please click and look at their profiles and posts.
Both achieve the same (almost) using different approaches. But both using the XF framework. No need to do bridges to anything. Both solutions doing what XF should point in the near future. Be a full portal.

I don't want to discuss why I moved on and my disagreements with TH. I've just paid for an addon that I could never have working in a plain fresh installation for both platforms in a popular shared hosting running PHP 7.2.
 
Anyone using a CDN on their WP site in addition to their XF site? Playing around with it just wondering if this causes any issues
 
Hi, whenever I edit or add a new notice to my site, I get the following server error. I'm not too sure what causes it, but what can I do to fix this? Thanks.

Code:
ErrorException: Template error: Invalid argument supplied for foreach() src/addons/ThemeHouse/XPress/Listener/CriteriaTemplateData.php:27
Code:
#0 src/addons/ThemeHouse/XPress/Listener/CriteriaTemplateData.php(27): XF\Template\Templater->handleTemplateError(2, 'Invalid argumen...', '/var/www/drayto...', 27, Array)
#1 [internal function]: ThemeHouse\XPress\Listener\CriteriaTemplateData::criteriaTemplateData(Array)
#2 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#3 src/XF/App.php(2654): XF\Extension->fire('criteria_templa...', Array, NULL)
#4 src/XF/Criteria/AbstractCriteria.php(166): XF\App->fire('criteria_templa...', Array)
#5 [internal function]: XF\Criteria\AbstractCriteria->getExtraTemplateData()
#6 src/XF/Template/Templater.php(999): call_user_func_array(Array, Array)
#7 internal_data/code_cache/templates/l1/s0/admin/notice_edit.php(264): XF\Template\Templater->method(Object(XF\Criteria\Page), 'getExtraTemplat...', Array)
#8 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(ThemeHouse\XLink\XF\Template\Templater), Array)
#9 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('notice_edit', Array)
#10 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#11 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Notice\\Edit', 'admin:notice_ed...', Array)
#12 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#15 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#16 src/XF.php(391): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}
 
Hi, whenever I edit or add a new notice to my site, I get the following server error. I'm not too sure what causes it, but what can I do to fix this? Thanks.

Code:
ErrorException: Template error: Invalid argument supplied for foreach() src/addons/ThemeHouse/XPress/Listener/CriteriaTemplateData.php:27
Code:
#0 src/addons/ThemeHouse/XPress/Listener/CriteriaTemplateData.php(27): XF\Template\Templater->handleTemplateError(2, 'Invalid argumen...', '/var/www/drayto...', 27, Array)
#1 [internal function]: ThemeHouse\XPress\Listener\CriteriaTemplateData::criteriaTemplateData(Array)
#2 src/XF/Extension.php(67): call_user_func_array(Array, Array)
#3 src/XF/App.php(2654): XF\Extension->fire('criteria_templa...', Array, NULL)
#4 src/XF/Criteria/AbstractCriteria.php(166): XF\App->fire('criteria_templa...', Array)
#5 [internal function]: XF\Criteria\AbstractCriteria->getExtraTemplateData()
#6 src/XF/Template/Templater.php(999): call_user_func_array(Array, Array)
#7 internal_data/code_cache/templates/l1/s0/admin/notice_edit.php(264): XF\Template\Templater->method(Object(XF\Criteria\Page), 'getExtraTemplat...', Array)
#8 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(ThemeHouse\XLink\XF\Template\Templater), Array)
#9 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('notice_edit', Array)
#10 src/XF/Mvc/Renderer/Html.php(48): XF\Template\Template->render()
#11 src/XF/Mvc/Dispatcher.php(458): XF\Mvc\Renderer\Html->renderView('XF:Notice\\Edit', 'admin:notice_ed...', Array)
#12 src/XF/Mvc/Dispatcher.php(440): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(400): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#14 src/XF/Mvc/Dispatcher.php(58): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#15 src/XF/App.php(2184): XF\Mvc\Dispatcher->run()
#16 src/XF.php(391): XF\App->run()
#17 admin.php(13): XF::runApp('XF\\Admin\\App')
#18 {main}
Hello, would you be able to create a ticket on our support portal so that our team can have a look please?
 
I purchased this on day one. At that time, when I promoted the thread, it auto created an article that was instantly live and attributed the article to my account.

I wanted to click a user thread and promote their thread to the front page as an article, keeping the attribution to them. That is, promote my users content in a featured manner leaving them with credit.

I don't have a demo space setup at the moment. Is that the current work flow or what happens if I want to feature a user's thread?

Checking in on this again.
Do you have a demo space available to see the workflow as an admin/mod?
I don't want to install just to find out this basic workflow...

If I promote my users content to the wordpress front page:
1>can I put them under the author?
2> can I edit the article before publishing (it used to not..it just showed up instantly not allowing formatting time)?
 
Checking in on this again.
Do you have a demo space available to see the workflow as an admin/mod?
I don't want to install just to find out this basic workflow...

If I promote my users content to the wordpress front page:
1>can I put them under the author?
2> can I edit the article before publishing (it used to not..it just showed up instantly not allowing formatting time)?
Changing the author is doable within the post editor of WordPress and you can edit the post before or after publishing it. We don't currently have a demo that allows customers to view the demo space an administrator or moderator.
 
If you want to flush your money down the toilet, go for this piece of crap.


They dont have such a thing as support. They just want to take your money and they don't give a **** if you have any issues.

I've been waiting since march 13, and the support guy shows up every few days, send some useless comments and disappears again.


I read all of your documentation and it doesn't work correctly. It had problems since day one.
 
If you want to flush your money down the toilet, go for this piece of crap.


They dont have such a thing as support. They just want to take your money and they don't give a **** if you have any issues.

I've been waiting since march 13, and the support guy shows up every few days, send some useless comments and disappears again.


I read all of your documentation and it doesn't work correctly. It had problems since day one.
Feel free to contact me through PM I'll find a way to get you a resolution. I know we are short staffed with developer time right now. Whether it's a refund or resolution we can schedule a time. Everyone's work schedules are all over the place right now.
 
hello,

When i go in my xenforo ACP -> widget -> widget syncronize, I get the following error message


Code:
ThemeHouse\XLink\APIException: API call to 'Home' failed: API not found under URL or authentication failed in src/addons/ThemeHouse/XLink/RemoteHandler/Traits/APICall.php at line 81

    ThemeHouse\XPress\RemoteHandler\Widget->callAPI() in src/addons/ThemeHouse/XPress/RemoteHandler/Widget.php at line 22
    ThemeHouse\XPress\RemoteHandler\Widget->getWidgetList() in src/addons/ThemeHouse/XLink/Job/SyncWidgets.php at line 69
    ThemeHouse\XLink\Job\SyncWidgets->run() in src/XF/Job/Manager.php at line 253
    XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 195
    XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 111
    XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
    XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 350
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
    XF\App->run() in src/XF.php at line 391
    XF::runApp() in admin.php at line 13

Does anyone have any idea why this might be?
 
What's getting logged to <xf_root>/internal_data/xlink_errors?

Almost one month with this problem I check the xlink_errors

<xf_root>/internal_data/xlink_errors

Full Response:
{"code":"rest_forbidden","message":"Sorry, you are not allowed to do that.","data":{"status":401}}

I am not sure what is for
 
Almost one month with this problem I check the xlink_errors

<xf_root>/internal_data/xlink_errors

Full Response:
{"code":"rest_forbidden","message":"Sorry, you are not allowed to do that.","data":{"status":401}}

I am not sure what is for

Which route is it listing for that? That generally happens when XPress isn't able to authenticate against your WordPress API, potentially because your API calls are going through a proxy server such as Cloudflare, or you have a WordPress plugin block API calls. If you haven't already, setting up an API Password is a good first step.
 
Top Bottom