Jump to content

Call to a member function marketingEmailOptIn() on null


Recommended Posts

Dear all, 

After I update to 7.10 "host-experts.com" all registrations fail and I get this error: 

Error: Call to a member function marketingEmailOptIn() on null in ـــــــــــــــــــ public_html/control-panel/includes/clientfunctions.php:0
Stack trace:
#0 /home/hostexperts/public_html/control-panel/register.php(0): addClient('test2', 'test2', 'test2', 'test@host-exper...', 'dubai', 'dubai', 'dubai', 'dubai', '12345', 'AE', '+971.12312323', 'Password121', '', '', true, Array, '936de65c-81a7-4...', false, '1')
#1 {main}

 

Can anyone help me with that? or how can i returns to the old version of WHMCS

Kind Regards.

Screen Shot 2020-04-08 at 14.17.16.png

Link to comment
Share on other sites

Hi There,

I've seen this issue when MySQL Strict Mode was enabled on the server and caused issues with the updater performing the required database changes to the schema, resulting in missing columns in various database tables.

As a first step I would suggest checking and ensuring that MySQL Strict Mode is disabled on your server, we have a great guide on how to do this here: https://help.whmcs.com/m/installation/l/678317-disabling-mysql-strict-mode

Once disabled you will likely need to manually apply the required database changes, you should ensure you take a suitable database backup before making any live changes:
 

alter table `tbllog_register` modify `namespace_value` mediumtext COLLATE utf8_unicode_ci NOT NULL;
alter table `tblemailmarketer` add `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `marketing`;
alter table `tblemailmarketer` add `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `created_at`;
alter table `tblclients` add `email_preferences` TEXT COLLATE utf8_unicode_ci DEFAULT NULL AFTER `email_verified`;

 

You can then compare the table schemas to the .sql files under resources/sql/install/ and add any missing fields to the tables in the appropriate places using a tool like PHPMyAdmin.

If you have any problems or issues making these changes, please feel free to raise a support ticket and we can assist.

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi @Anasco,

Dan's steps should get you back up and running. I'd also like to gather some more information about how these columns might have failed to be created.:

1. Did you encounter any errors when applying the 7.10 update?

2. Did you update manually or via Utilities > Update WHMCS?

3. Could you please share some information about your server configuration:

  • Previous sql_mode configuration value:
  • SQL server Type (eg. MySQL, MariaDB):
  • SQL Version:

 

I've not yet been able to replicate an update situation where the tables are not created, even with an sql_mode of STRICT_TRANS_TABLES,NO_ZERO_DATE,NO_ENGINE_SUBSTITUTION.

Input on your server configuration at the time of upgrading will be most appreciated.

Link to comment
Share on other sites

  • WHMCS Support Manager

WHMCS should run fine with Strict Mode enabled. However I've yet to reproduce reproduce this problem with Strict Mode enabled myself, so it's important we gather as much information about the OP's environment  to understand why the  new columns weren't created.

Link to comment
Share on other sites

  • WHMCS John changed the title to Call to a member function marketingEmailOptIn() on null
  • WHMCS Support Manager

Hi @sanechoice,

I've been able to replicate this issue on my end as well when updating from a previos version of WHMCS in which Weebly was activated for selling.

Case #CORE-14516 is now is open with our developers in order to have this reviewed for future releases. Once we resolve cases and push features they are available at our change log, here:

https://changelog.whmcs.com/

This does not appear to impact installations activating Weebly for the firs ttime.

I apologize for the inconvenience, and appreciate your patience as we work to resolve this.

Thanks for taking the time to report your findings.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated