Skip to Content Skip to Menu

[SOLVED] Promotions: PHP 8 error when creating new

1 year 6 months ago - 1 year 6 months ago #331380 by zippys in trouble
[SOLVED] Promotions: PHP 8 error when creating new was created by zippys in trouble
Hello Team CB!

I am having an issue with PHP 8 & 8.1 when I try and create a new promotion.  I receive this error:

array_unshift(): Argument #1 ($array) must be of type array, null given

It is working fine when I switch back to PHP 7.4.

My Joomla version is 3.10.11 and CB and all it's plugins are up to date.

I've searched the forums for that error message but cannot find any results of others having similar problem.

It is not holding me back in developing my site, as I can still work with PHP 7.4, but would like to continue using newer PHP version in the future.

Is this a known problem?

Thanks and all the best,

Rik
Last edit: 1 year 6 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
1 year 6 months ago #331387 by krileon
Replied by krileon on topic Promotions: PHP 8 error when creating new
Please be sure you've latest build releases installed either through CBs install from web or our downloads page below.

www.joomlapolis.com/downloads

Most PHP 8.1 issues should already be addressed. If issue persists please enable debug mode and error reporting in Joomla global configuration, retry, and provide the full error output as there isn't much I can do without the callstack to see where the error is coming from.


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.

1 year 6 months ago #331392 by zippys in trouble
Replied by zippys in trouble on topic Promotions: PHP 8 error when creating new
Hi Kyle,

all CB plugins are the latest ones using the plugin manager and updating from web.

I enabled max / dev error reporting in Joomla.  It seems to break Joomla 3.10 when using PHP 8 / 8.1, so it could maybe be a Joomla issue and not CB related.

I will try an install of Joomla 4 with CB Subs and promotions, and see how I get along with PHP 8/8.1.

Thanks again for your help,

Rik

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 68625
  • Thanks: 9109
  • Karma: 1434
1 year 6 months ago #331393 by krileon
Replied by krileon on topic Promotions: PHP 8 error when creating new
I do not recommend using PHP 8.1 on Joomla 3. It will throw a very large amount of deprecation notices and possibly some errors as they're discovered and fixed by Joomla contributors. Probably best to stay on 7.4 for Joomla 3. Joomla 4 however is 8.1 ready.


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: zippys in trouble

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

1 year 6 months ago #331396 by zippys in trouble
Replied by zippys in trouble on topic Promotions: PHP 8 error when creating new
Ha! Yes, Joomla 3.1 threw lots of depreciated errors with error reporting on.

I have tested a new Joomla 4 install with CB, CB Subs, promotions etc and all using newest versions and I think I found the answer to my problem with J! 3.1 and PHP 8.1.

When I went to create a promotion in Joomla 4 / CBSubs, it gave me an SQL error this time when trying to create promotion.. after Googling the error, I saw a post with Beat mentioning that CB Promotions needs CBSubs Tax installed also.  I installed this in Joomla 4, and all fixed.  So I went back to my Joomla 3.1 site, installed CBSubs Tax, changed website to use PHP 8.1 and it works - no PHP array error when creating new promotion!  Strangely CB promotions worked without CBSubs Tax installed when using PHP 7.4.  But it works now, so this is solved (for me!)

I will continue to experiment in J! 4 while i finish some projects in J! 3.

Thanks for your help Kyle,

Rik

 
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn