Skip to Content Skip to Menu

Upgrade possibilities after expiration

  • MJBruno
  • MJBruno
  • OFFLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
11 years 3 months ago - 11 years 3 months ago #232412 by MJBruno
Hi all,

My CBsubs configuration has two plans; a one-year subscription and a three-year subscription.
There are no free plans within the website. We only have guests or members.

Our settings in Global - Registration Settings:
Allow Free Registered Users (without subscriptions): No
Create Subscriptions also for free lifetime plans: No
(yes, we get the error).

In the Display - Expiration tab I did not change any fields.

As soon as a plan expires (I created a 5min plan as a test), the user gets an email. However, as soon as the user tries to login in the website, it gets a blank page with 'Invalid Token' and the upgrade possibilities (another year, or three year subscription) are not shown. Instead, I get the message that the user has been blocked. In the backend, the user has been automatically disabled under user management.

I would like to force my members after expiration to extend and pay their membership and make sure they cant navigate on the website without this upgrade.

To clarify: this is because I have an event booking component which gives members a 20% discount. After expiration, it should not be possible to navigate with an expired account to the event section and still benefit from the 'registered status' to get the discount.

Anyone who can help me with this?

CB Subs 3.0 GPL
CB 1.9
Joomla 3.1.5
PHP 5.3.9

Thanks in advance!
Last edit: 11 years 3 months ago by MJBruno.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 years 2 months ago #232672 by krileon
Replied by krileon on topic Upgrade possibilities after expiration
It should already be behaving this way. On login attempt it'll block their account and present them with the renewal/upgrade page or at least it should. However, I have no idea what the "Invalid Token" thing is an it's possible you've something installed that could be conflicting with this behavior. Ensure debug mode and maximum error reporting (both very vital) are set within Joomla global configuration then attempt to login and see if the error exposes further.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • MJBruno
  • MJBruno
  • OFFLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
11 years 2 weeks ago - 11 years 2 weeks ago #236195 by MJBruno
Replied by MJBruno on topic Upgrade possibilities after expiration
Hi Kyle,

Thanks for your reply. Since my website is working without any problems, except for the renewal function after expiration, I did not follow up. However, time flies, and in a few months the first memberships will expire, and I would like to present them the renewal possibilites.
I followed your instructions and got a bunch of text with an error report

Notice: Trying to get property of non-object in
<span>/</span>home<span>/</span>wfs/sites/s710/www.eagen.org/web/components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/libraries/cbpaidUserExtension.php on line 387


For the full report, see attachment 1. As soon as I proceed using the link in the debug text, I have to login again and the account gets blocked. No renewal page is displayed. I have no idea what to do now...
After changing a few parameters, the above error also got showed with debug turned off..

In the attachment, I've added the full Debug message report and the cbpaidUserExtension.php file. No idea what's wrong.....

Any ideas? Thanks a million for your help.

Edit: Attachment not working, so I upload the report and .php file: speedy.sh/2PEZY/CBPaid-Debug-Message
Last edit: 11 years 2 weeks ago by MJBruno.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 years 2 weeks ago #236243 by krileon
Replied by krileon on topic Upgrade possibilities after expiration
Please apply the below quickfix and see if the error resolves. This should only happen when it's trying to change a users usergroup when they are not logged in as it's looking for a user object in their session that doesn't exist.

IN: /components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/libraries/cbpaidUserExtension.php
ON: Line 387
FROM:
Code:
if ( $jUser->id == $user->id ) {
TO:
Code:
if ( $jUser && ( $jUser->id == $user->id ) ) {

Not sure if this will have anything to do with renewals though, but should clear up that error at least.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • MJBruno
  • MJBruno
  • OFFLINE
  • Posts: 9
  • Thanks: 0
  • Karma: 0
11 years 2 weeks ago - 11 years 2 weeks ago #236255 by MJBruno
Replied by MJBruno on topic Upgrade possibilities after expiration
Did not do the trick... (error on line 387 solved). However, the problem is not..

As soon as I try to login with an enabled, unblocked user with an expired subscription, I see an url directing to the upgrade page for just 1 sec and then it redirects me automatically to the login page again with the message 'Please login first'. In the User Management in the CB backend, the user status changes automatically to disabled (as it should). The renewal page is just not shown. I've allowed renewal for all my plans.
Then, when I try to login again with the same credentials, I get the message 'Error
Login denied! Your account has either been blocked or you have not activated it yet.'' (which of course makes sense). Debug mode does not reveal any errors.

Any ideas?

Thanks for your help!
Last edit: 11 years 2 weeks ago by MJBruno.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
11 years 2 weeks ago #236302 by krileon
Replied by krileon on topic Upgrade possibilities after expiration

Did not do the trick... (error on line 387 solved). However, the problem is not..

Right, the purpose was to fix the error as the error could have been the cause. This confirms it's not the cause, but the error needed fixed none the less.

As soon as I try to login with an enabled, unblocked user with an expired subscription, I see an url directing to the upgrade page for just 1 sec and then it redirects me automatically to the login page again with the message 'Please login first'.

This means you have an access issue somewhere. You need to ensure you've a public and published Joomla menu link to CBs profile page. If it's redirecting you to login then you are missing that link. Also check within CBSubs > Settings > Display > Expiration and ensure all the URLs under "Expiration and restricted access redirects" are blank.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum