Cornerstone is tripping up MemberPress payments

Hi,

I’ve been getting Wordpress error messages after customers have been trying to make a purchase. The error message is highlighting Cornerstone as the issue. Please advise, thanks:

ArgumentCountError: Too few arguments to function Cornerstone_Element_Front_End::begin_excerpt(), 1 passed in /home/followth/public_html/wp-includes/class-wp-hook.php on line 292 and exactly 2 expected in /home/followth/public_html/wp-content/plugins/cornerstone/includes/classes/elements/class-element-front-end.php:49
Stack trace:
#0 /home/followth/public_html/wp-includes/class-wp-hook.php(292): Cornerstone_Element_Front_End->begin_excerpt('')
#1 /home/followth/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters('', Array)
#2 /home/followth/public_html/wp-content/plugins/gamipress-buddypress-integration/includes/bp-activity.php(479): apply_filters('get_the_excerpt', '')
#3 /home/followth/public_html/wp-content/plugins/gamipress-buddypress-integration/includes/bp-activity.php(246): gamipress_bp_activity_get_post_excerpt(41844)
#4 /home/followth/public_html/wp-includes/class-wp-hook.php(292): gamipress_bp_achievement_activity_details(Array, 1197, 41844, '', 1, Array)
#5 /home/followth/public_html/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array)
#6 /home/followth/public_html/wp-content/plugins/gamipress-buddypress-integration/includes/bp-activity.php(106): apply_filters('gamipress_bp_ac...', Array, 1197, 41844, '', 1, Array)
#7 /home/followth/public_html/wp-includes/class-wp-hook.php(292): gamipress_award_achievement_bp_activity(1197, 41844, '', 1, Array)
#8 /home/followth/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
#9 /home/followth/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#10 /home/followth/public_html/wp-content/plugins/gamipress/includes/rules-engine.php(1240): do_action('gamipress_award...', 1197, 41844, '', 1, Array)
#11 /home/followth/public_html/wp-content/plugins/gamipress/includes/rules-engine.php(52): gamipress_award_achievement_to_user(41844, 1197, false, '', 1, Array)
#12 /home/followth/public_html/wp-content/plugins/gamipress/includes/rules-engine.php(1287): gamipress_maybe_award_achievement_to_user(41844, 1197, '')
#13 /home/followth/public_html/wp-includes/class-wp-hook.php(294): gamipress_maybe_award_additional_achievements_to_user(1197, '41851')
#14 /home/followth/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
#15 /home/followth/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#16 /home/followth/public_html/wp-content/plugins/gamipress/includes/rules-engine.php(1240): do_action('gamipress_award...', 1197, '41851', 'gamipress_regis...', 1, Array)
#17 /home/followth/public_html/wp-content/plugins/gamipress/includes/rules-engine.php(52): gamipress_award_achievement_to_user('41851', 1197, false, 'gamipress_regis...', 1, Array)
#18 /home/followth/public_html/wp-content/plugins/gamipress/includes/triggers.php(489): gamipress_maybe_award_achievement_to_user('41851', 1197, 'gamipress_regis...', 1, Array)
#19 /home/followth/public_html/wp-content/plugins/gamipress/includes/listeners.php(29): gamipress_trigger_event(Array)
#20 /home/followth/public_html/wp-includes/class-wp-hook.php(292): gamipress_register_listener(1197)
#21 /home/followth/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters(NULL, Array)
#22 /home/followth/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#23 /home/followth/public_html/wp-includes/user.php(2119): do_action('user_register', 1197)
#24 /home/followth/public_html/wp-content/plugins/memberpress/app/models/MeprUser.php(603): wp_insert_user(Array)
#25 /home/followth/public_html/wp-content/plugins/memberpress/app/controllers/MeprStripeCtrl.php(139): MeprUser->store()
#26 /home/followth/public_html/wp-content/plugins/memberpress/app/controllers/MeprStripeCtrl.php(54): MeprStripeCtrl->do_confirm_payment()
#27 /home/followth/public_html/wp-includes/class-wp-hook.php(292): MeprStripeCtrl->confirm_payment('')
#28 /home/followth/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array)
#29 /home/followth/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
#30 /home/followth/public_html/wp-admin/admin-ajax.php(202): do_action('wp_ajax_nopriv_...')
#31 {main}

Hi @demonboy,

Thank you for writing in, I don’t see that error has anything to do with payments.

Please do the following:

  • Please make sure everything is up to date, you can refer here for version compatibility.
  • Testing for Plugin Conflict, its possible that there is another plugin conflicting it.
  • Clear and Disabling Cache
  • Switch to parent Theme if you have a child theme, it’s possible that there is customization on your child theme that is causing the issue.

Cheers,

Hi @friech,

I’m afraid this has everything to do with Cornerstone. If I deactivate Cornerstone then the payment gateway works.

Please advise, thanks.

Hello @demonboy,

Could you please update to the latest versions?
Our latest versions are:

  • Pro theme 4.3.3 or
  • X theme 8.3.3
  • Cornerstone 5.3.3
  • WordPress 5.7
  • PHP 7.4

This latest release contains fixes for several issues so be sure to check out the changelog:

After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

If the updates is not helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Please let us know how it goes.

Hi @ruenel

Everything was up to date except PHP, which was 7.3. I have changed this to 7.4, reactivated Cornerstone and the problem persists. I have deactivated Cornerstone for the time being.

I will leave a secure note with my login details.

Hey @demonboy,

Please open up Plugins > Plugin Editor > Cornerstone > includes/classes/elements/class-element-front-end.php in your WordPress backend and edit line 49 as shown in the following screenshot.

$text = '', $post = 0

Since this is a plugin conflict, we can only report this case to our development team. This will be queued for further investigation. For now, commenting out the function that conflicts with the your plugins is the temporary solution but that might make some Cornerstone functions to stop working.

Thanks for reporting.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.