Previous Thread
Next Thread
Print Thread
Hop To
Subscriptions Question
#263404 01/14/2020 1:11 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
I have a existing forum v7.7.3 upgraded over the years starting with classic.
Trying to resurrect the subscription feature to use.
But having issues with paypal updating the paid status to UBB.

So I decided to clean up subscriptions to start fresh.
However there are a few plans and transactions for around 2012 that will not delete.
In fact in transactions there is not a status to select to edit.
And plans are showing none.
But the database still has entries.

I don't care if the members loose or keep the subscription group at this point.
There are only two valid subscribers that were manually added to the subscriber group .

I found it was never setup correctly as far as the subscription groups never had permissions set and paypal never updated the transaction to paid in UBB..
As far as paypal I think I found the reason.
In paypal , IPN was set to enable with a non existent listener url.

Before I test again I wish to clean it all out. and start fresh.
Since I can't delete in the control panel.

Can I just empty the two tables without issue?
subscriptions
subscription_data


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
Ruben #263405 01/14/2020 2:12 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
Originally Posted by Ruben
I found it was never setup correctly as far as the subscription groups never had permissions set and paypal never updated the transaction to paid in UBB..
As far as paypal I think I found the reason.
In paypal , IPN was set to enable with a non existent listener url.

UBB.threads 7.6.2 fixed multiple PayPal issues
https://www.ubbcentral.com/forums/ubbthreads.php/topics/261663/7-6-2-changelog-discussion

The two major PayPal fixes were:
[UPDATE] PayPal IPN (instant Payment Notification) Verification Postback has been updated to HTTP/1.1 (HTTPS). HTTP/1.0 (HTTP) postbacks will no longer be supported by PayPal as of June 2018.
In June 2018, PayPal dropped support for HTTP/1.0 (HTTP) postbacks. So if you were still using UBB.threads 7.6.1 (and older) after that date, your PayPal transactions would be declined.

AND

Fixed in UBB.threads 7.6.2 were the pages that were never written. UBB.threads 7.6.1 (and older), PayPal would send the user back to a broken/non-existent page. Their subscription transaction would never complete, and would require a forum admin to manually process it. This was for repeating subscriptions. One-time subscriptions forwarded the user back to the main UBB.threads forums page, and never told the user that the process was successful.

There is no need to enable "auto return" (or anything special) on your PayPal account, other than having a PayPal Business account and allowing payments to be accepted.

Prior versions of UBB.threads (7.6.1 and older) required PayPal "auto return" to be enabled since that portion of UBB.threads remained unwritten, and the user would just be dumped in to either a PayPal "thank you" page with zero links on it, or they would be returned to a broken UBB.threads page where they needed to contact the forum admin to manually update the subscription

I believe that setting is located at this link:
https://developer.paypal.com/docs/classic/admin/checkout-settings/#customize-the-checkout-experience

--

As for subscriptions failing to delete, I believe that may be caused because the subscription is still seen as active, aka "incomplete." Find the last status, and change it to "EXPIRE NOW." Then you should be able to "DELETE" it.


If you wanted to modify your database directly, I can offer two options. Both require modification of the ubbt_SUBSCRIPTION_DATA table

1/
Find the USER_ID you want to modify.
Update the following fields:
set SUBSCRIPTION_IS_ACTIVE to 0
set SUBSCRIPTION_END_DATE to 1577836800 (this is 2020-01-01 00:00:00)

or 2/
You can also modify the database directly and remove the undesirable lines from SUBSCRIPTION_DATA.
This will also remove the subscription history (and detail) from the forum user's dashboard and the admin's dashboard. This should be a last resort.

Last edited by isaac; 01/14/2020 2:19 PM.

Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Re: Subscriptions Question
isaac #263406 01/14/2020 2:48 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
First thanks for the extensive post which took you a while.
But in my case as I said they tried several times in the past and deleted some plans and they look like they are orphaned.
Quote
As for subscriptions failing to delete, I believe that may be caused because the subscription is still seen as active, aka "incomplete." Find the last status, and change it to "EXPIRE NOW." Then you should be able to "DELETE" it.
There is not a field to select in transactions to delete., It is blank
Probably due to groups or subscriptions were deleted prior.
That is why I want to clean it up.

I have read that link from a prior post that you looked up.
But in my case it was not auto return that was turned on but IPN notification going to a non valid link with nothing to do with UBB.


As I said I am at ubb V 7.7.3 and just want to wipe it all out due to I can't with the cp interface.
And start fresh
I can deal with the few members that are actual subscribers and fat finger them back in.
I was unsure if the two tables are tied to anything else if I empty them.
It appears that they are not.
Other than some members may loose the group assignment. Which I can deal with manually.

Last edited by Ruben; 01/14/2020 2:58 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
Ruben #263407 01/14/2020 2:57 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
Control Panel > Subscription Groups
You cannot delete SUBSCRIPTION GROUPS, you can only enable or disable them

BUT...
Control Panel > Groups
You may delete groups from the GROUPS page
Put a checkbox in the DELETE column next to the group you want to delete. Click "Update Groups" button at the bottom. You'll get a notice that if there are currently any users in the group, those users will be moved to the USERS group.

Control Panel > Transactions
Click on the STATUS of the row you want to delete.
In the MANUAL SUBSCRIPTION CHANGE section, change the NEW STATUS from "No Action" to "Delete" if you want to delete this transaction.

[Linked Image]


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Subscriptions Question
isaac #263408 01/14/2020 3:00 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
Originally Posted by Ruben
As I said I am at ubb V 7.7.3 and just want to wipe it all out due to I can't with the cp interface.
And start fresh
I can deal with the few members that are actual subscribers and fat finger them back in.
I was unsure if the two tables are tied to anything else if I empty them.
It appears that they are not.
Other than some members may loose the group assignment. Which I can deal with manually.

The screenshot I posted above, I believe does the same thing as the last part of my reply above it... which was:
Originally Posted by isaac
or 2/
You can also modify the database directly and remove the undesirable lines from SUBSCRIPTION_DATA.
This will also remove the subscription history (and detail) from the forum user's dashboard and the admin's dashboard. This should be a last resort.

Doing this should "batch" accomplish what you're looking to complete thumbsup


Originally Posted by Ruben
First thanks for the extensive post which took you a while.

thank you laugh

Last edited by isaac; 01/14/2020 3:04 PM.

Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Subscriptions Question
Ruben #263409 01/14/2020 3:03 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
here is what I am dealing with.
Only one member Carl is a legit subscriber

Thanks we posted on top of each other.

Attached Files Screenshot (25).pngScreenshot (24).png
Last edited by Ruben; 01/14/2020 3:06 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
Ruben #263410 01/14/2020 3:07 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
Originally Posted by Ruben
here is what I am dealing with.
Only one member Carl is a legit subscriber

I see now. Thanks!

This looks like you'll manually need to enter their URL to modify those single items.

The URLs for doing that are actually simple to create. Here is an example:

https://www. YOUR-WEBSITE .com/forums/admin/edit_user_sub.php?id=9999

Replace "9999" with the invoice # you see listed on the right column. That should bring you to the page where those blank items should have links to.


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Subscriptions Question
Ruben #263411 01/14/2020 3:13 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
I'm quite sure that the STATUS fields were never correctly populated on that forum because the subscription system was missing the unwritten scripts that would add that data. Scripts that have since been added to UBB.threads 7.6.2 and newer.

I'll write up some code and add it to a reply here later today, to display some text if the field is empty. This should create a link thats easy to click on for anyone running in to the bug caused by the broken scripts 7.6.1 and older


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Re: Subscriptions Question
Ruben #263412 01/14/2020 4:37 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
Thanks again for the stellar support.
I have refrained from further testing till I clean them up.
But I still think the paypay IPN setting was the culprit for ubb7.7.3


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
Ruben #263413 01/14/2020 5:41 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
Using a live test not sandbox
Something is not quite correct.
The only way I could get UBB to update was using Instant Payment Notification In paypal.
I used the non spider friendly url which the site is set for friendly urls
The default on the form is non spider friendly
I then had to resend IPN notification to show complete
I have not tested the friendly url Which the site uses.
I got three results in paypal for payment
which one submission shows complete and one shows cancelled and one shows created.
Only the complete item shows a dollar amount. paid. All the others show 0.00 for payment.
The subscribers shows a status in UBB as Signup

Last edited by Ruben; 01/14/2020 5:59 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
isaac #263414 01/14/2020 5:49 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
Originally Posted by isaac
I'll write up some code and add it to a reply here later today, to display some text if the field is empty. This should create a link thats easy to click on for anyone running in to the bug caused by the broken scripts 7.6.1 and older


in admin/view_subscriptions.php
FIND:
Code
	if ($active) {

PLACE ABOVE IT:
Code
	$status = ($status) ? $status : "NONE";


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Re: Subscriptions Question
Ruben #263415 01/14/2020 5:57 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
I will give that a try.
Thanks again

Attached Files Screenshot (27).pngScreenshot (26).png
Last edited by Ruben; 01/14/2020 6:19 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
Ruben #263416 01/14/2020 6:16 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
The hack worked to a point.
Still one left.

Attached Files Screenshot (26).pngScreenshot (27).png
Last edited by Ruben; 01/14/2020 6:20 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
Ruben #263417 01/14/2020 6:37 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
I'm not sure which "hack" you mean.

Do you mean the code I posted for fixing the display of incomplete SUBSCRIPTION_STATUS data from versions prior to 7.6.1?

Which "one left" should I be looking at in your screenshot?

A little more detail would help here smile


Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
Re: Subscriptions Question
isaac #263418 01/15/2020 12:39 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
Originally Posted by isaac
Do you mean the code I posted for fixing the display of incomplete SUBSCRIPTION_STATUS data from versions prior to 7.6.1?

Yes

If you look at the database it has 4 rows but in the cp transactions it show 3. I believe the extra one to be EOT status so I will delete from the table.

Last edited by Ruben; 01/15/2020 12:53 PM.

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
Ruben #263419 01/15/2020 1:54 PM
Joined: Apr 2004
Posts: 1,660
Likes: 36
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Apr 2004
Posts: 1,660
Likes: 36
Take a look at the exact query from within the view_subscriptions.php script. Unless there are items missing from your ubbt_SUBSCRIPTIONS database, there really isnt much going on here except requesting "align and show me everything." which just passes along those requested values to the strings for the html template.

the SQL
SQL Query
	SELECT
		t1.SUBSCRIPTION_ID, t2.USER_DISPLAY_NAME, t4.USER_REAL_EMAIL, t3.SUBSCRIPTION_NAME, t1.SUBSCRIPTION_START_DATE,
		t1.SUBSCRIPTION_END_DATE, t1.SUBSCRIPTION_STATUS, t1.SUBSCRIPTION_IS_ACTIVE, t1.SUBSCRIPTION_PAYMENT, t1.USER_ID,
		t3.GROUP_ID
	FROM
		ubbt_SUBSCRIPTION_DATA AS t1,
		ubbt_USERS AS t2,
		ubbt_SUBSCRIPTIONS AS t3,
		ubbt_USER_PROFILE AS t4
	WHERE
		t1.USER_ID = t2.USER_ID AND
		t1.GROUP_ID = t3.GROUP_ID AND
		t1.USER_ID = t4.USER_ID
	ORDER BY t1.SUBSCRIPTION_ID DESC

the naming of the SELECT output items:
Code
list($invoice_no, $userdisplay, $email, $name, $start, $end, $status, $active, $payment, $uid, $group_id)

the smarty template stuff, based on those strings:
Code
	$subs[] = array(
		"invoice_no" => $invoice_no,
		"display_name" => $userdisplay,
		"email" => $email,
		"name" => $name,
		"start" => $start,
		"end" => $end,
		"status" => $status,
		"active" => $active,
		"payment" => $payment,
		"uid" => $uid,
		"group_id" => $group_id,
	);

end of script.

Last edited by isaac; 01/15/2020 2:07 PM.

Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Re: Subscriptions Question
Ruben #263420 01/15/2020 2:02 PM
Joined: Jun 2006
Posts: 15,892
Likes: 7
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,892
Likes: 7
I think that if old subscriptions (prior to the rewriting of the system) exist and are giving you problems, you should just clear out (truncate) the "SUBSCRIPTION_DATA" table via PHPMyAdmin and start fresh; it'd probably be a whole lot faster than trying to troubleshoot a display issue with incomplete user transactions.

Please note that, officially, it is not advised to alter the UBB.threads database as it is extremely easy to make a mistake that cannot be undone, thus destroying the database. Please make a complete backup before making any system alterations as these are ultimately not supported.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: Subscriptions Question
Gizmo #263421 01/15/2020 5:03 PM
Joined: Dec 2003
Posts: 6,103
Likes: 16
Ruben Offline OP
OP Offline
Joined: Dec 2003
Posts: 6,103
Likes: 16
That is what I ended up doing.
As I asked in the topic.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: Subscriptions Question
isaac #263422 01/15/2020 5:26 PM
Joined: Jun 2006
Posts: 15,892
Likes: 7
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 15,892
Likes: 7
I understand you asked that in your OP, but Isaacs initial post outlined that as being an option as step #2 as far as diving into your database (which is generally unsupported officially); to which the direction chosen was troubleshooting what ended up being results from before the system was rewritten.
Originally Posted by isaac
If you wanted to modify your database directly, I can offer two options. Both require modification of the ubbt_SUBSCRIPTION_DATA table

... (skipping #1/advanced troubleshooting involving expiring any active subscriptions)

or 2/
You can also modify the database directly and remove the undesirable lines from SUBSCRIPTION_DATA.
This will also remove the subscription history (and detail) from the forum user's dashboard and the admin's dashboard. This should be a last resort.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
allow photos to a PM?
by Morgan - 04/03/2020 4:24 PM
SFS Login Detection Issue [NotABug]
by Ruben - 03/29/2020 1:16 PM
possible bug?
by Morgan - 03/29/2020 5:18 AM
Who's Online Now
0 members (), 97 guests, and 32 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4