Project

General

Profile

Actions

Bug #8121

closed

Free lifetime plans display a state of Expired Active

Bug #8121: Free lifetime plans display a state of Expired Active

Added by krileon over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
14 August 2020
Due date:
% Done:

100%

Estimated time:

Description

When subscribing to a free lifetime plan an expiration date is not added to the subscription, which is normal, and causes its status to display as "Expired Active".

https://www.joomlapolis.com/forum/277-cb-paid-subscriptions-support/242777-can-t-seem-to-upgrade-to-newly-created-subscription-plan?start=6

Updated by krileon over 5 years ago Actions #1

Appears to be due to the validity date output. The below is responsible for validity output but it's already outputting an empty string.

IN: components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/views/something.php
ON: Line 118

Updated by krileon over 5 years ago Actions #2

Looks like $viewModel->validity gets altered sometime after line 118 and goes from null to Expired. Can't make any sense of it.

Updated by krileon over 5 years ago Actions #3

Ok, it's a bug in getFormattedValidityRemaining introduced in commit 6b3313ed.

IN: components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/products/usersubscription/cbpaidUsersubscriptionRecord.php
ON: Line 1205

That function expects a database formatted datetime for expiry_date, but free lifetime is providing null causing the if checks to not work correctly. Looks like it just needs to handle null case like other functions in that class.

Updated by krileon over 5 years ago Actions #4

  • Status changed from Assigned to Resolved
  • Assignee changed from beat to krileon
  • % Done changed from 0 to 100

Fixed in MR !205

Few locations weren't handling null expiry date which is the expiry date for lifetime subscriptions.

Updated by beat about 5 years ago Actions #5

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom