Facebook 

SMFHacks.com - Celebrating 20 Years!

+-

SMFHacks.com

+- User Information

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

+- Forum Stats

Members
Total Members: 4339
Latest: GroupNebula563
New This Month: 1
New This Week: 0
New Today: 0
Stats
Total Posts: 44288
Total Topics: 7674
Most Online Today: 653
Most Online Ever: 27044
(May 30, 2026, 09:10:16 pm)
Users Online
Members: 0
Guests: 304
Total: 304

Author Topic: [Mod]ActivityPub Federation for SMF 2.1  (Read 8303 times)

0 Members and 0 Guests are viewing this topic.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #15 on: »
Any errors in the error_log for this or anything you can see
Code: [Select]
So the current failure appears to be occurring after activitypub_create_object_from_message() returns, likely in the subsequent Create/Announce activity construction or delivery/queuing code.
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/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #16 on: »
The only one that was natively throwing errors were likes. After I installed, likes weren’t saving and it was tossing errors in the log (I didn’t save those, sorry.)

What I figured out was that the ActivityPub hook in Subs-ActivityPub.php was directly accessing $obj->_content and $obj->_type, but those properties are protected in my version of Likes.php. Likes provides the public get() method for accessing them.

I changed:

Code: [Select]
$content_id = $obj->_content;
$content_type = $obj->_type;

to:

Code: [Select]
$content_id = $obj->get('content');
$content_type = $obj->get('type');

That seems to have fixed it.

Posting wasn’t throwing any actual errors, Acrivitypub was just showing 0 posts. I entered logging lines into the mod pages to try and figure out where it was tripping up.

My logs showed that the ActivityPub hook runs immediately after db_insert, while topicOptions['id'] is still 0. The immediate message lookup consequently returned the new message with id_topic=0, and the first test produced:

Code: [Select]
object lookup rows=0
On a later test, the object lookup succeeded and activitypub_serialize_note() returned a non-empty array, so the serializer itself appears to be working.

The relevant sequence for the failing post was:

Code: [Select]
after db_insert msg_id=981446
topicOptions[id]=0
immediate message found ... id_topic=0
calling object creator with msg ID=981446
object lookup rows=0
object return type=boolean
object empty=YES

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #17 on: »
Great feedback updated with the previously mentioned issues.

Their is a new hook registered at install time, so their existing installation won't pick it up from a file update alone. Reinstall the mod, or register the hook once on their live board,
  e.g. via a quick script:
Code: [Select]
  add_integration_function('integrate_create_topic', 'activitypub_create_topic', true, '$sourcedir/Subs-ActivityPub.php', false);
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/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #18 on: »
Cool! I won't have time to test again until next week, but I'll let you know how the update goes.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #19 on: »
Current version is missing .well-known directory.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #20 on: »
Fixed bad habit of trying to skip files that start with a period.
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/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #21 on: »
Installed newest version, had to edit the install.xml again to get the admin area. I can only see the toggle to use my account on ActivityPub on admin account, and when I open permissions I generate errors 2: Undefined array key "permissionname_activitypub_admin" and 2: Undefined array key "permissiongroup_activitypub"

Posts seem to be logging on SMF's end, haven't tried to access from a Lemmy client yet.

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #22 on: »
What change did you make for the edit?
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/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #23 on: »
The same one from earlier:

Code: [Select]
db_extend('packages');

if (!isset($smcFunc['db_create_table']))
die('ActivityPub installer: db_create_table is NOT available');

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #24 on: »
hmm i thought i added
db_extend('packages');
 to install.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/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #25 on: »
I’m also not able to find my forum from Lemmy. My webhost had Cloudflare on the domain: I’m wondering if that’s the issue?

I tried !board@forumaddress and got 404
« Last Edit: August 22, 2026, 08:14:19 pm by Moobythegoldensock »

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #26 on: »
Do you have a link to Lemmy want to do some more testing.
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/

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #27 on: »
Sure:

https://isgodimaginary.com/forum?action=activitypub;sa=actor;type=board;id=1

I’m assuming I’d search for !religion@isgodimaginary.com from Lemmy?

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #28 on: »
Hey! It may be worthwhile to implement /.well-known/nodeinfo endpoints so that, for instance, the forum can be easily searched for on ActivityPub directories. For example: https://lemmy.world/.well-known/nodeinfo and https://lemmy.world/nodeinfo/2.1 (not all fields need to be populated, just the ones you can with existing SMF data)

Re: [Mod]ActivityPub Federation for SMF 2.1
« Reply #29 on: »
Interesting that is something I will need to research more.
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/

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
6320 Views
Last post April 20, 2010, 09:31:15 am
by SMFHacks
2 Replies
6092 Views
Last post December 13, 2010, 05:11:03 pm
by G1
1 Replies
4524 Views
Last post August 28, 2011, 07:01:45 pm
by SMFHacks
1 Replies
7378 Views
Last post May 25, 2017, 01:15:53 pm
by shuban
0 Replies
13711 Views
Last post March 16, 2026, 08:16:18 pm
by SMFHacks

+- Recent Topics

Downloads Pro 7.0 Released by SMFHacks
October 07, 2026, 07:35:30 pm

[Mod]ActivityPub Federation for SMF 2.1 by SMFHacks
October 01, 2026, 05:03:45 pm

Newsletter Pro 4.0 Released by SMFHacks
September 23, 2026, 08:08:24 pm

Can't remove or restore any item from the recycle bin by SMFHacks
September 22, 2026, 11:01:51 am

MCP Server for SMF 2.1 - let Claude, ChatGPT or Cursor run your admin chores by SMFHacks
September 12, 2026, 02:50:45 pm

Suggestions for improvements to Ultimate Shoutbox & Chatroom by davejo
September 02, 2026, 01:35:09 am

Automatic Sorting of Categories by Kiwi
August 31, 2026, 12:36:09 am

' appears as ' in Most Viewed (and Recent Items ?) by SMFHacks
August 22, 2026, 11:01:56 pm

[Mod]Block Proxy VPN On Registration by Alistair
August 21, 2026, 12:36:09 pm

SMFHacks error messages by pete
August 16, 2026, 02:43:37 pm

Powered by EzPortal