You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I still see this issue even in the latest version.
As for the fix: adding the leading backslash doesn't really do much; if a function does not exist in the current namespace, PHP will automatically look for a global function (i.e., one defined by, in our case, WP core).
The problem is that the global function \get_sample_permalink()also doesn't exist. (The error message again including the namespace does not change that fact. The error always includes the namespace; I agree it's confusing.)
The reason, I think, is that core's wp-admin/includes/post.php (where said function is defined) is not always loaded. (It's really part of WP-Admin. I'm guessing the "Activity Dispatcher" is called by WP-Cron, which may load fewer files by default?)
Quick summary
PHP Fatal error: Uncaught Error: Call to undefined function Activitypub\Transformer\get_sample_permalink() in /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/transformer/class-post.php:104
Stack trace:
#0 /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/transformer/class-post.php(91): Activitypub\Transformer\Post->get_url()
#1 [internal function]: Activitypub\Transformer\Post->get_id()
#2 /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/transformer/class-base.php(63): call_user_func()
#3 /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/transformer/class-base.php(82): Activitypub\Transformer\Base->transform_object_properties()
#4 /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/transformer/class-post.php(56): Activitypub\Transformer\Base->to_object()
#5 /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/transformer/class-base.php(95): Activitypub\Transformer\Post->to_object()
#6 /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/class-activity-dispatcher.php(83): Activitypub\Transformer\Base->to_activity()
#7 /srv/data/web/vhosts//htdocs/wp-includes/class-wp-hook.php(324): Activitypub\Activity_Dispatcher::send_activity()
#8 /srv/data/web/vhosts//htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#9 /srv/data/web/vhosts//htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#10 /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/class-activity-dispatcher.php(204): do_action()
#11 /srv/data/web/vhosts//htdocs/wp-includes/class-wp-hook.php(324): Activitypub\Activity_Dispatcher::send_post()
#12 /srv/data/web/vhosts//htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#13 /srv/data/web/vhosts//htdocs/wp-includes/plugin.php(565): WP_Hook->do_action()
#14 /srv/data/web/vhosts//htdocs/wp-cron.php(191): do_action_ref_array()
#15 {main}
thrown in /srv/data/web/vhosts//htdocs/wp-content/plugins/activitypub/includes/transformer/class-post.php on line 104
Steps to reproduce
N/A
What you expected to happen
N/A
What actually happened
Found this error in my PHP errorlog. It's the only one so far...
Impact
One
Available workarounds?
No but the platform is still usable
Logs or notes
No response
The text was updated successfully, but these errors were encountered: