BadgeOS is a plugin to WordPress that allows you to easily create badges and set up the steps and achievements users take to earn them. Badges are Mozilla OBI compatible and sharable via Credly.
Including shortcode [badgeos_achievement id="n"] into a learndash quiz's graduation content causes the quiz to result in a PHP Fatal error: Allowed memory size of 268435456 bytes exhausted.
Steps to Reproduce
Create a new achievement, with the following info:
In the Required Steps section:
Require: LearnDash Activity
LearnDash Trigger: Passed Quiz
Quiz: [Name of quiz where the achievement will be displayed]
Add the [badgeos_achievement id="n"] shortcode to the learndash quiz referenced in step 1. (content or graduation content area)
[Swap n in shortcode with the published badge/achievement id created in step 1]
Actual result:
Quiz is not displayed due to PHP fatal error (Allowed memory size of 268435456 bytes exhausted)
This only happen when using the individual achievement shortcode.
example:
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 851968 bytes) in ...\learndash-demo\wp-includes\class.wp-scripts.php on line 437
/quizzes/position-dynamics/ - Allowed memory size of 268435456 bytes exhausted (tried to allocate 851968 bytes) in ..\learndash-demo\wp-includes\class.wp-scripts.php on line 437
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 290816 bytes) in ..\learndash-demo\wp-includes\functions.php on line 3729
Expected result:
Quiz should work as expected and show the appropriate badge when expected.
Product Versions
PHP: 7.2.3
BadgeOS: 1.4.11
BadgeOS LearnDash Add-On: 1.0.2
LearnDash LMS: 2.5.6
WordPress: 4.9.5
Additional Information
I increased the php memory limit upto 512MB which also resulted with the same issue.
The site is a simple dev site using the learndash demo site as a base, with the badgeOS plugins replacing the WPachievements plugin, which I've deleted from the site.
Description
Including shortcode [badgeos_achievement id="n"] into a learndash quiz's graduation content causes the quiz to result in a PHP Fatal error: Allowed memory size of 268435456 bytes exhausted.
Steps to Reproduce
Create a new achievement, with the following info: In the Required Steps section: Require: LearnDash Activity LearnDash Trigger: Passed Quiz Quiz: [Name of quiz where the achievement will be displayed]
Add the [badgeos_achievement id="n"] shortcode to the learndash quiz referenced in step 1. (content or graduation content area) [Swap n in shortcode with the published badge/achievement id created in step 1]
Actual result: Quiz is not displayed due to PHP fatal error (Allowed memory size of 268435456 bytes exhausted) This only happen when using the individual achievement shortcode. example:
Expected result: Quiz should work as expected and show the appropriate badge when expected.
Product Versions
Additional Information
I increased the php memory limit upto 512MB which also resulted with the same issue. The site is a simple dev site using the learndash demo site as a base, with the badgeOS plugins replacing the WPachievements plugin, which I've deleted from the site.
Other plugins have been deactivated, other than: