SMFHacks.com
Modifications/Themes => Modifications Talk => Topic started by: [chrisB] 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.
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.
-
On the wordpress side try editing bridge.php
Find
class_WP_SMFBridge (
Before it add
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.
-
Like this?
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...
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.
-
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';
-
Sorry, but where should it go? I tried to search for it but I couldn't find the line.
-
Replace the old code I gave you to add
class_WP_SMFBridge (
Before it add
-
Same error;
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)
-
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.
-
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.
-
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.
-
I doubt it from the error. Because that is more of an SMF thing than wordpress.
-
Yes, logging in via WordPress seems broken as well as signing out.
-
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?
-
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.
-
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:
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?
-
Haven't had any time.
Session.php is on wordpress side would require research to see how that file was used before and what to do in the future
https://www.google.com/search?client=firefox-b-1-d&q=File+session.php+is+%3Cstrong%3Edeprecated%3C%2Fstrong%3E+since+version+4.7.0+with+no+alternative+available.
-
Haven't had any time.
Session.php is on wordpress side would require research to see how that file was used before and what to do in the future
https://www.google.com/search?client=firefox-b-1-d&q=File+session.php+is+%3Cstrong%3Edeprecated%3C%2Fstrong%3E+since+version+4.7.0+with+no+alternative+available.
https://en-gb.wordpress.org/plugins/wp-native-php-sessions/
This seemed to fix the issue.
I could login with WordPress and on SMF I would be signed in. I could logout of any area and re-sign in without problems.
However, when I changed the PHP version from 7.2 to 7.4 it stopped logging in via WordPress.
Unless I struck lucky, or something.
I can't get WordPress to sign SMF in now though.