gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
181 stars 135 forks source link

Course Restrictions Dates Not Printing in Notice #1993

Closed chrisbadgett closed 2 years ago

chrisbadgett commented 2 years ago

Reproduction Steps

Add Course Enrollment and Time Period dates to course restrictions.

Expected Behavior

Dates would be visible on front end in notice.

Actual Behavior

Dates not visible Business_Budgeting_–_My_Academy-2

Edit_Course_‹_My_Academy_—_WordPress

Error Messages / Logs


### System and Environment Information

<details>
<summary>System Report</summary>

<!-- Paste your System Report between the three backticks below this line -->

Wordpress

Home Url: https://web-dev2.myliftersite.com Site Url: https://web-dev2.myliftersite.com Login Url: https://web-dev2.myliftersite.com/wp-login.php Version: 5.8.3 Debug Mode: No Debug Log: No Debug Display: Yes Locale: en_US Multisite: No Page For Posts: Blog (#2029) [https://web-dev2.myliftersite.com/blog/] Page On Front: Home (#1015) [https://web-dev2.myliftersite.com/] Permalink Structure: /%postname%/ Show On Front: page Wp Cron: Yes

Settings

Version: 5.7.0 Db Version: 5.7.0 Course Catalog: Courses (#2202) [https://web-dev2.myliftersite.com/courses/] Membership Catalog: Membership Catalog (#2129) [https://web-dev2.myliftersite.com/memberships/] Student Dashboard: Dashboard (#2131) [https://web-dev2.myliftersite.com/dashboard/] Checkout Page: Purchase (#2130) [https://web-dev2.myliftersite.com/purchase/] Course Catalog Per Page: 30 Course Catalog Sorting: menu_order,ASC Membership Catalog Per Page: 9 Membership Catalog Sorting: menu_order Site Membership: Not Set Courses Endpoint: my-courses Edit Endpoint: edit-account Lost Password Endpoint: lost-password Vouchers Endpoint: redeem-voucher Autogenerate Username: no Password Strength Meter: no Minimum Password Strength: Terms Required: no Terms Page: Not Set Checkout Names: Checkout Address: Checkout Phone: Checkout Email Confirmation: no Open Registration: no Registration Names: Registration Address: Registration Phone: Registration Voucher: Registration Email Confirmation: no Account Names: Account Address: Account Phone: Account Email Confirmation: no Confirmation Endpoint: confirm-payment Force Ssl Checkout: no Country: US Currency: USD Currency Position: left Thousand Separator: , Decimal Separator: . Decimals: 2 Trim Zero Decimals: no Recurring Payments: yes Email From Address: team+sandbox@lifterlms.com Email From Name: A LifterLMS Sandbox Email Footer Text: Email Header Image: Cert Bg Width: 800 Cert Bg Height: 616 Cert Legacy Compat: no

Constants

LLMS_REMOVE_ALL_DATA: undefined LLMS_REST_DISABLE: undefined LLMS_SITE_FEATURE_RECURRING_PAYMENTS: undefined LLMS_SITE_IS_CLONE: undefined

Gateways

PayPal: Disabled PayPal Test Mode: Disabled PayPal Logging: PayPal Order: 1 Stripe: Enabled Stripe Test Mode: Enabled Stripe Logging: no Stripe Order: 1 Manual: Enabled Manual Logging: Manual Order: 1

Server

Mysql Version: 5.7.37 Php Curl: Yes Php Default Timezone: UTC Php Fsockopen: Yes Php Max Input Vars: 5000 Php Max Upload Size: 512 MB Php Memory Limit: 256M Php Post Max Size: 1024M Php Soap: Yes Php Suhosin: No Php Time Limt: 30 Php Version: 7.3.33 Software: Apache/2.4.52 (Unix) OpenSSL/1.1.1 Wp Memory Limit: 256M

Browser

HTTP USER AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36

Theme

Name: Kadence Version: 1.1.14 Themeuri: https://www.kadencewp.com/kadence-theme/ Authoruri: https://www.kadencewp.com/ Template: Child Theme: No Llms Support: No

Plugins

bbPress: 2.6.9 Embed Any Document: 2.7.1 Kadence Blocks – Gutenberg Blocks for Page Builder Features: 2.2.3 LifterLMS: 5.7.0 LifterLMS Advanced Quizzes: 1.1.1 LifterLMS Advanced Videos: 1.0.0-beta.17 LifterLMS Assignments: 1.1.13 LifterLMS Custom Fields: 2.0.2 LifterLMS Groups: 1.0.0-beta.17 LifterLMS MailChimp Add-on: 3.2.0 LifterLMS Ninja Forms: 1.1.1 LifterLMS PayPal Gateway: 1.3.0 LifterLMS PDFs: 1.0.0 LifterLMS Private Areas: 1.1.5 LifterLMS Social Learning: 1.4.0 LifterLMS Stripe Payment Gateway: 5.4.0 Ninja Forms: 3.6.7 User Switching: 1.5.8

Integrations

BbPress: Yes BuddyPress: No LifterLMS Groups: Yes LifterLMS Ninja Forms: Yes LifterLMS MailChimp: No LifterLMS Private Areas: Yes LifterLMS Social Learning: Yes Videos: Vimeo: No Videos: Wistia: Yes Videos: YouTube: No

Template Overrides

course/lesson-preview.php (ver: 5.7.0): /srv/users/manager/apps/web-dev2/public/wp-content/themes/kadence/lifterlms/ (ver: 4.4.0) course/syllabus.php (ver: 4.4.0): /srv/users/manager/apps/web-dev2/public/wp-content/themes/kadence/lifterlms/ (ver: 4.4.0)



</details>

This issue has be recreated:
+ [ ] Locally
+ [ x] On a staging site
+ [ ] On a production website
+ [ x] With only LifterLMS and a default theme

### Browser, Device, and Operating System Information

+ Browser name and version
+ Operating System name and version
+ Device name and version (if applicable)
eri-trabiccolo commented 2 years ago

@chrisbadgett Is that a cloned course? If so the issue, most likely, is this one: https://github.com/gocodebox/lifterlms/issues/1212

eri-trabiccolo commented 2 years ago

yeah @chrisbadgett I verified it's the same issue. Basically, if you look in the various restriction messages you'll see something like: Enrollment in this course opens on [lifterlms_course_info id="2253" key="enrollment_start_date"]. where that id="2253" should be id="2793", the current course id, but, because of the bug in #1212, it retains the id of the course from which the clone generated.

chrisbadgett commented 2 years ago

It was a cloned course. That makes sense @eri-trabiccolo. Thanks!