Facebook  Twitter 

SMFHacks.com

+-

SMFHacks.com

+- User Information

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Forum Stats

Members
Total Members: 4252
Latest: Jwatson_785
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 43228
Total Topics: 7514
Most Online Today: 113
Most Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Members: 0
Guests: 87
Total: 87

Author Topic: Errors with SMF2WPBridge  (Read 2521 times)

0 Members and 1 Guest are viewing this topic.

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Errors with SMF2WPBridge
« on: November 29, 2022, 06:49:13 am »
I have tried various versions of WordPress 5.6.10/6.1.1 with SMF 2.1.3, but I always encounter an issue when logging out of WordPress.

Code: [Select]
call_user_func_array() expects parameter 1 to be a valid callback, function 'rest_cookie_collect_status' not found or invalid function name.
Would you also consider a pro (paid) version of this plugin? It would be nice to see some added features such as user group assignment. I don't think people would mind paying a fair fee for more advanced features, plus it enables you to spend your valuable time on the resources Just an idea.. I'm really keen on using SMF for my site.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16422
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #1 on: November 29, 2022, 09:00:39 am »
On the wordpress side try editing bridge.php
Find
Code: [Select]
class_WP_SMFBridge (

Before it add
Code: [Select]
define( 'WP_SMF_BRIDGE_PLUGIN', __FILE__ );

define( 'WP_SMF_BRIDGE_PLUGIN_DIR', untrailingslashit( dirname( WP_SMF_BRIDGE_PLUGIN ) ) );

require_once WP_SMF_BRIDGE_PLUGIN_DIR . '/includes/rest-api.php';


In terms of a paid plugin, there is not enough of a market for it to spend time on. That goes for all SMF paid plugins at this point the peak was back in 2007 to 2010.
« Last Edit: November 29, 2022, 10:00:10 am by SMFHacks »
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #2 on: November 29, 2022, 09:30:35 am »
Like this?
Quote
define( 'WP_SMF_BRIDGE_PLUGIN', __FILE__ );
define( 'WP_SMF_BRIDGE_PLUGIN_DIR', untrailingslashit( dirname( WP_SMF_BRIDGE_PLUGIN ) ) );
require_once WP_SMF_BRIDGE_PLUGIN_DIR . '/includes/rest-api.php';
class WP_SMFBridge {

After I try to save, I get...
Code: [Select]
Your PHP code changes were rolled back due to an error on line 14 of file wp-content/plugins/WP2SMFBridge/bridge.php. Please fix and try saving again.

require_once(): Failed opening required 'wp-content/plugins/WP2SMFBridge/includes/rest-api.php' (include_path='.:/opt/alt/php74/usr/share/pear')

Thank you, I admire your contributions towards SMF.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16422
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #3 on: November 29, 2022, 09:43:32 am »
Never mind that didn't do what I wanted it to do.

You can try just adding this line but it looks like it is included already

require ABSPATH . WPINC . '/rest-api.php';
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #4 on: November 29, 2022, 09:51:24 am »
Sorry, but where should it go? I tried to search for it but I couldn't find the line.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16422
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #5 on: November 29, 2022, 10:00:23 am »
Replace the old code I gave you to add
Code: [Select]
class_WP_SMFBridge (

Before it add
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #6 on: November 29, 2022, 10:05:10 am »
Same error;

Code: [Select]
Your PHP code changes were rolled back due to an error on line 34 of file wp-includes/rest-api.php. Please fix and try saving again.

Cannot redeclare register_rest_route() (previously declared in wp-includes/rest-api.php:34)

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16422
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #7 on: November 29, 2022, 10:07:54 am »
Guess it didn't work.
The original guy who made is at  https://github.com/xchwarze/WP2SMFBridge but he no longer updates it.
I just updated it to with some SMF fixes.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #8 on: November 29, 2022, 10:16:59 am »
I can appreciate that, if you happen to have any time would you be willing to look into it? I can provide you access to my test site (in case you don't use WordPress).

It's a real shame about the WordPress author.

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #9 on: November 29, 2022, 12:18:32 pm »
Reading the Github page, this is the first time I read:
[qoute]Uncheck "Enable local storage of cookies" and "Use subdomain independent cookie" in SMF. You can turn it off from Admin -> Configuration -> Server Settings -> Cookies and Sessions[/quote]

Could this be the reason? I enabled use subdomain indiependent cookie but messed up being able to login at all.

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16422
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #10 on: November 29, 2022, 12:21:25 pm »
I doubt it from the error. Because that is more of an SMF thing than wordpress.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Agree Agree x 1 View List

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #11 on: November 29, 2022, 04:30:26 pm »
Yes, logging in via WordPress seems broken as well as signing out.

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #12 on: December 04, 2022, 10:18:47 am »
I'm trying to get the WordPress updated, I have a question if you don't mind.

How does the bridge handle member registration?

Do users register via WordPress and the bridge should send over that users' information into SMF?

Offline SMFHacks

  • Administrator
  • Hero Member
  • *****
  • Posts: 16422
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #13 on: December 04, 2022, 11:28:57 am »
If they register on Wordpress it should then auto register in SMF as well.
And vice versa as long as you have both plugins/mods installed.
Get your Forum Ranked! at https://www.forumrankings.net - find out how your forum compares with others!

Like What I do? Support me at https://www.patreon.com/vbgamer45/
Agree Agree x 1 View List

Offline [chrisB]

  • Member
  • *
  • Posts: 33
    • View Profile
Re: Errors with SMF2WPBridge
« Reply #14 on: December 22, 2022, 05:27:10 pm »
With PHP version 7.2 the script is a lot more stable and, in fact, works quite well with WordPress 6.1.1 - only issue is that WordPress signing in has no barring on the SMF side.

It produces this error:
Quote
16384: File session.php is <strong>deprecated</strong> since version 4.7.0 with no alternative available.

I apologise for my persistence with this; I am trying to just sort my migrating site out and tinkering with things is about the best I can do without asking questions. I honestly don't mean to be a nuisance or a pain. 😊

I'm still hoping the script can be updated but in the meantime, would you happen to have any suggestions regarding this error?

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
14529 Views
Last post December 04, 2007, 09:27:54 pm
by SMFHacks
0 Replies
7281 Views
Last post April 03, 2008, 11:36:09 am
by weightman
Many errors...

Started by vkot Bugs

6 Replies
9412 Views
Last post April 21, 2013, 08:18:14 am
by SMFHacks
22 Replies
4892 Views
Last post April 28, 2020, 05:04:54 am
by js
1 Replies
1319 Views
Last post September 30, 2021, 02:07:34 pm
by SMFHacks

+- Recent Topics

an idea for new mod (( content type with different display )) by SMFHacks
February 27, 2024, 01:36:27 pm

[Mod] RSS Feed Poster by SMFHacks
February 27, 2024, 11:57:18 am

find duplicate pictures by fvlog19
February 14, 2024, 02:22:40 pm

Error uploading video. by SMFHacks
February 08, 2024, 02:04:16 pm

Request for admin notification by davejo
February 06, 2024, 09:02:12 am

Gallery icon as last added image by fvlog19
February 01, 2024, 01:04:56 pm

User Gallery Feature: move / bulk move images by SMFHacks
January 30, 2024, 05:48:25 pm

In the future it may be for smf 2.1.x? by smithloo
January 30, 2024, 12:55:34 am

Clipboard image support for the editor by SMFHacks
January 29, 2024, 11:22:17 am

Release date? by SMFHacks
January 26, 2024, 02:00:45 pm

Powered by EzPortal