Previous Thread
Next Thread
Print Thread
Hop To
#263404 01/14/2020 1:11 PM
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
here is what I am dealing with.
Only one member Carl is a legit subscriber

Thanks we posted on top of each other.
Attachments
Screenshot (25).png Screenshot (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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
I will give that a try.
Thanks again
Attachments
Screenshot (27).png Screenshot (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
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
The hack worked to a point.
Still one left.
Attachments
Screenshot (26).png Screenshot (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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Apr 2004
Posts: 1,945
Likes: 145
UBB.threads Developer
UBB.threads Developer
Joined: Apr 2004
Posts: 1,945
Likes: 145
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
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
1 member likes this: Gizmo
Joined: Jun 2006
Posts: 16,289
Likes: 115
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,289
Likes: 115
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!
Joined: Dec 2003
Posts: 6,560
Likes: 78
Joined: Dec 2003
Posts: 6,560
Likes: 78
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
Joined: Jun 2006
Posts: 16,289
Likes: 115
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,289
Likes: 115
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
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Looking for a forum
by azr - 03/15/2024 11:26 PM
Editing Links in Post
by Outdoorking - 03/15/2024 9:31 AM
Question on barkrowler and the like
by Mors - 02/29/2024 6:51 PM
Member Permissions Help
by domspeak - 02/27/2024 6:31 PM
Forum Privacy Policy
by ECNet - 02/26/2024 11:58 AM
Who's Online Now
2 members (Geoff, domspeak), 353 guests, and 190 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)