Skip to Content Skip to Menu

Subscriptions import: "Error 1048: Parent plan cannot be null"

  • e6003
  • e6003
  • ONLINE
  • Posts: 6
  • Thanks: 0
  • Karma: 0
21 hours 3 minutes ago #340474 by e6003
I'm trying to import my user subscriptions from an old Joomla 3.10.12/CB 2.9.3+build.2024.10.02.18.57.11.f6795ce5a/CB Subs 4.6.1+build.2023.02.02.15.37.52.48532f2ea to a new Joomla 4.4.11-dev/2.10.0+build.2025.02.10.18.59.11.b0d14120b/4.8.0+build.2025.02.03.17.52.54.76d74952e site. I have manually recreated all my subscriptions plans (such as site registration only, 1 year, 2 year...) and created a CSV with the appropriate format to import the users' subs from the old site, such as:

1,11,A,2020-01-01 01:00:00
2,11,A,2020-01-01 01:00:00
3,11,A,2020-01-01 01:00:00
4,11,A,2020-01-01 01:00:00
7,3,A,2024-05-21 01:00:00

(ie userid, planid, status, subscription date)

When I try to import this into my new site via CB/Paid Subs/Import I get "An error has occurred - 1048 Column 'parent plan' cannot be null". What am I doing wrong?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48883
  • Thanks: 8356
  • Karma: 1450
19 hours 45 minutes ago #340477 by krileon
Do you have an empty line at the beginning or end of the file? It parses line by line so be sure there are no empty lines.


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 following user(s) said Thank You: e6003

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

  • e6003
  • e6003
  • ONLINE
  • Posts: 6
  • Thanks: 0
  • Karma: 0
19 hours 33 minutes ago #340479 by e6003
I just double checked. No blank lines anywhere in the file including top and bottom. The original file was UTF-8 encoded and I tried re-saving it from Windows Notepad as ANSI but it made no difference - same error.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48883
  • Thanks: 8356
  • Karma: 1450
19 hours 8 minutes ago #340482 by krileon
Try running the database fix tools in CB > Tools and applying any database fixes it recommends. Not sure why that column is erroring as the default value for it for new rows in subscription objects is 0. Will review the import code to see if there's a bug in it.


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.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48883
  • Thanks: 8356
  • Karma: 1450
19 hours 5 minutes ago #340483 by krileon
Are you trying to import a subscription to a plan that's a child of another plan? That might be the issue. You'd need to first import the parent plan then the child plan. You should be able to do that with 2 rows per user. 1 being the parent plan and 1 being the child plan.


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 following user(s) said Thank You: e6003

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

  • e6003
  • e6003
  • ONLINE
  • Posts: 6
  • Thanks: 0
  • Karma: 0
19 hours 2 minutes ago #340485 by e6003
Thanks. Checked CB database/user fields database/plugins database/users database - all are fine with no errors detected.

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

Moderators: beatnantkrileon
Powered by Kunena Forum