Updating CB 1.9.1 to 4.0.12 and CBSubs 3.0.0 to 4.1.0

7 years 10 months ago #283773 by poml
I agree, it is not good to modify core files. So I can try some more with the subscriptions tab. The problem I have here is that all my merchandise plans do not display on the subscriptions tab. And I have no idea why. They display fine on the registratoin page. Any ideas what I could check to have them displayed on the subscriptions tab?

Thanks for the spoof string functions -- that works pretty well now.

Auto Actions: Today I copied the conditions of all my 42 auto actions. It seems to work fine. I save the autoactions sql table, so if I ever go live I do not have to transfer the conditions again.
Question: We discussed earlier, I now made myself an autoaction that fires when somebody pays one of my merchandise plans. The action is supposed to subscribe the user twice to the same subscription, i.e., 2 years. This works somehow, but it only happens once. So the user gets subscribed one year, but not the second. Any idea why? Manually via the subscriptions tab I can renew multiple times one by one without problem.
And: If the user is renewed by an autoaction, does he get his confirmation emails, too?

I think most of the page is working now, I am arriving at the details more or less. Lucky me, my two custom plugins still work.

My site looked much better with the CBSubs 3.0.0 css. What are the options now? Do I need to re-adjust all the css files for the site?
The topic has been locked.
7 years 10 months ago - 7 years 10 months ago #283784 by poml
In addition to my previous post, some (maybe) important points:

1) Remember my problem with migrating the Autoactions? While porting them one by one by hand I noticed this, maybe important for debugging.
Autoactions were migrated fine apart from conditions. They got lost. In all my conditions I use either "equal to" or "not equal to" in the conditional. Here it comes: All conditionals using "equal to" were NOT migrated, all conditionals using "not equal to" were migrated. What does this tell us?

2) The user is accessing the CB Profile page from the main menue. However, the CBSubs subscriptions page is accessed by a different menu which is displayed sometimes on the side. This seems to create problems. Have you noticed this before? For example it creates the problem of when clicking on a payment page on a payment option, one is not transferred to paypal or the payment slip, but again back to the cbsubs subscription page. Also it is not possible to cancel a payment, and other things.
A temporary solution to this is make the menu link to the CBSubs subscription page an "Exturnal URL" so it is like a submenu of the "official" CB main menu item.

Then the problems go away.

For my SEO links this means:
member-s-corner/my-account (CB menu item) and
member-s-corner/my-account/pluginclass?plugin=cbpaidsubscriptions&do=displayplans (External URL)
instead of, like before,
member-s-corner/my-account (CB menu item) and
my-subscriptions/pluginclass?plugin=cbpaidsubscriptions&do=displayplans (CB menu item)

You will say, BAD, don't link to SEO urls, they break easily. So I just tried the External URL "solution" with the non SEO url
index.php?option=com_comprofiler&view=pluginclass&plugin=cbpaidsubscriptions&do=displayplans
and it seems to work too. I guess that is the best solution.

BUT, the point is, that the official CB menu item "plugin" "cb paid subscriptions" "plan" menu item does not work properly. If you want I can demonstrate.

3) When I purchase a plan and select offline payment, I confirm this and the "payment slip" opens. Here I usually get a warning box:
"A payment invoice exists already: Please check below if it is correct. If not correct, click on the cancel link below, and select your choice again."
Why is that? Where does it come from? Also, there is no "cancel link" on that payment slip page. How can I avoid that?

4) In CBSubs there was a known issue with time zones and DST. In our case this means, we are at +2 (summer) or +1 (winter). And our subscriptions should end on 31.12. 23:59. So in the mysql DB all subscriptions ended at 21:59, because of the +2 (site was set up in summer and subscriptions were saved in UTC). When winter came, suddenly they ended at 22:59. And new subscriptions made in winter ended on 1.1. 0:59 when summertime came. The workaround was: Set an alarm on the phone for the day of the time change and manually change the Joomla time zone from +2 to +3. And after 6 months back from +3 to +2. This worked, but was a pain.
Is this solved? I see now that all subscriptions that were in the DB before at 21:59 hours end now on 22:59. Joomla time zone is now set to +2, and the time change was in March, so during the migration I did not play with the time zones.
Was this situation improved? Should all plans in the DB set to 23:59? Is the time zone change still necessary?

5) I see there is an option to show a cb tab based on Joomla ACL. Is this a new feature? When was that introduced?

6) Here is something I cannot solve. It worked fine before the migration. If I go to the backend to RSForm and I click on a form to edit I get this:
Fatal error: Class 'CBuser' not found in [...]/administrator/components/com_rsform/helpers/rsform.php(568) : eval()'d code on line 3
I looked at the code and I find that one field in RSForm has some CB code. Interestingly it works on the front end, but when I open the backend form to edit it gives above error message. The critical lines are:
global $_CB_framework, $_CB_database, $ueConfig, $mainframe, $_SERVER;
$cbUser =& CBuser::getInstance( $_CB_framework->myId() );
Is that not good code?
Do I need to add something like this?
global $_PLUGINS;

if ( ( ! file_exists( JPATH_SITE . '/libraries/CBLib/CBLib/Core/CBLib.php' ) ) || ( ! file_exists( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' ) ) ) {
	echo 'CB not installed'; return;
}

include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );

Yes, It seems I need to add this so it works with CBSubs 4.1.0:
include_once( JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php' );
The topic has been locked.
7 years 10 months ago #283796 by krileon

I agree, it is not good to modify core files. So I can try some more with the subscriptions tab. The problem I have here is that all my merchandise plans do not display on the subscriptions tab. And I have no idea why. They display fine on the registratoin page. Any ideas what I could check to have them displayed on the subscriptions tab?

Ensure they're set to allow upgrades otherwise they won't display while logged in.

My site looked much better with the CBSubs 3.0.0 css. What are the options now? Do I need to re-adjust all the css files for the site?

CBSubs uses core CB Bootstrap for styling now. I highly don't agree that 3.x looked better, but suppose that's a matter of opinion. Yes, you'll need to restyle it if you want it styled differently.

1) Remember my problem with migrating the Autoactions? While porting them one by one by hand I noticed this, maybe important for debugging.
Autoactions were migrated fine apart from conditions. They got lost. In all my conditions I use either "equal to" or "not equal to" in the conditional. Here it comes: All conditionals using "equal to" were NOT migrated, all conditionals using "not equal to" were migrated. What does this tell us?

There's an IF check in the migration code causing that. Have fixed the check for next nightly, thank you.

2) The user is accessing the CB Profile page from the main menue. However, the CBSubs subscriptions page is accessed by a different menu which is displayed sometimes on the side. This seems to create problems. Have you noticed this before? For example it creates the problem of when clicking on a payment page on a payment option, one is not transferred to paypal or the payment slip, but again back to the cbsubs subscription page. Also it is not possible to cancel a payment, and other things.

To properly and internally link to a plugin component view you need to select Community Builder > Plugin menutype then select CB Paid Subscriptions from the Plugin parameter dropdown.

BUT, the point is, that the official CB menu item "plugin" "cb paid subscriptions" "plan" menu item does not work properly. If you want I can demonstrate.

You'll need to provide step by step to reproduce as it's working fine here on Joomlapolis, our demosite, and locally. So I'm unsure what issue exactly you're having, sorry.

4) In CBSubs there was a known issue with time zones and DST. In our case this means, we are at +2 (summer) or +1 (winter). And our subscriptions should end on 31.12. 23:59. So in the mysql DB all subscriptions ended at 21:59, because of the +2 (site was set up in summer and subscriptions were saved in UTC). When winter came, suddenly they ended at 22:59. And new subscriptions made in winter ended on 1.1. 0:59 when summertime came. The workaround was: Set an alarm on the phone for the day of the time change and manually change the Joomla time zone from +2 to +3. And after 6 months back from +3 to +2. This worked, but was a pain.
Is this solved? I see now that all subscriptions that were in the DB before at 21:59 hours end now on 22:59. Joomla time zone is now set to +2, and the time change was in March, so during the migration I did not play with the time zones.
Was this situation improved? Should all plans in the DB set to 23:59? Is the time zone change still necessary?

CBSubs stores in UTC and runs its calculations off UTC now. All usages should plan according to that. Datetimes are offset locally for display purposes only.

5) I see there is an option to show a cb tab based on Joomla ACL. Is this a new feature? When was that introduced?

Yes, it used to be usergroup based and is now properly view access level based.

6) Here is something I cannot solve. It worked fine before the migration. If I go to the backend to RSForm and I click on a form to edit I get this:
Fatal error: Class 'CBuser' not found in [...]/administrator/components/com_rsform/helpers/rsform.php(568) : eval()'d code on line 3
I looked at the code and I find that one field in RSForm has some CB code. Interestingly it works on the front end, but when I open the backend form to edit it gives above error message. The critical lines are:

Is that not good code?
Do I need to add something like this?

You've only loaded the framework. You need to load various APIs for usage. Typically just calling the below after the framework will be enough.

cbimport( 'cb.html' );



This topic is getting a bit out of hand. Please start new topics if you should have any further issues or questions.


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.
The topic has been locked.
7 years 10 months ago #283806 by poml
Hi, thanks for help. I can start new topics of course, I did not want to spam your forum. For me it's all about my migration. Other users might find some useful info anyhow via the search.

About the step by step instructions: I can configure my site so that the error occurs and then give you step by step instructions what to do. How about this?

My plans are set to allow upgrades, still they don't show. I have no idea why.

Any comment on the above points you did not address? Point 3) for example and the Autoaction with the two actions?
The topic has been locked.
7 years 10 months ago #283829 by krileon

About the step by step instructions: I can configure my site so that the error occurs and then give you step by step instructions what to do. How about this?

Yes, that would be very helpful in tracking down what's going wrong.

My plans are set to allow upgrades, still they don't show. I have no idea why.

Please PM backend super administrator login credentials for the exact install that they are not showing and will take a look.

3) When I purchase a plan and select offline payment, I confirm this and the "payment slip" opens. Here I usually get a warning box:
"A payment invoice exists already: Please check below if it is correct. If not correct, click on the cancel link below, and select your choice again."
Why is that? Where does it come from? Also, there is no "cancel link" on that payment slip page. How can I avoid that?

You backed out of a basket. When you do this CBSubs will restore that basket on re-visit. There's no feature to turn off the cancel functionality, but I suppose it could be hidden due to its parameter being empty within CBSubs > Settings > Display > Baskets > Cancel subscription link text; the default value is "Cancel payment and subscription".


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.
The topic has been locked.
7 years 10 months ago #283841 by poml

Yes, that would be very helpful in tracking down what's going wrong.

It seems to be very simple:
Log in as a test user. In my case this user has no active subscription, only:
Guest login
Lifetime Subscription Active
On the right hand side menu select "my subscriptions".
Then select regular membership. Click upgrade/donate.
On the payment options page click offline.
You will be redirected to the subscriptions page -- this is the error.

Please PM backend super administrator login credentials for the exact install that they are not showing and will take a look.

Done. I deactivated some of my custom plugins, so they don't interfere with CBSubs.
Note: I think I can see the plans (according to the user's access level) as an admin on the backend when I edit a user's profile and select the subscription tab. But not on the frontend.

You backed out of a basket.

No, I don't think so. Here are the step by step instructions:
Log out.
Go to Join us (to left).
Select Regular membership.
Put in some address and details.
Submit.
Select "offline" as payment option.
Confirm.
You will see: "A payment invoice exists already: Please check below if it is correct. If not correct, click on the cancel link below, and select your choice again."
I think this is out of place, no basket cancelled. And still, on that payment slip there is no "cancel link below".
The topic has been locked.
Moderators: beatnantkrileon
Time to create page: 0.292 seconds

Facebook Twitter LinkedIn