• When i try to create an email address I receive this error.

    WordPress version: Version 6.5.3
    PhP version php 8.0

    Fatal error: Uncaught TypeError: json_decode() expects parameter 1 to be string, null given in
    /wp-content/plugins/wf-cpanel-email-accounts/includes/UAPI.php:126 Stack trace: #0
    /wp-content/plugins/wf-cpanel-email-accounts/includes/UAPI.php(126): json_decode(NULL) #1
    /wp-content/plugins/wf-cpanel-email-accounts/includes/UAPI.php(419): WebFacing\cPanel\UAPI::result(‘Email’, ‘add_pop’, Array, true) #2
    /wp-content/plugins/wf-cpanel-email-accounts/includes/NewEmail.php(960): WebFacing\cPanel\UAPI::add_account(‘testalbaemail@e…’, ‘Ahdkakjfh123’) #3
    /wp-content/plugins/wf-cpanel-email-accounts/includes/NewEmail.php(35): WebFacing\cPanel\Email\NewEmail::save() #4 /wp-includes/class-wp-hook.php(324): WebFacing\cPanel\Email\NewEmail::WebFacing\cPanel\Email{closure}(”) #5
    /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #6
    /wp-content/plugins/wf-cpanel-email-accounts/includes/UAPI.php on line 126

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Knut Sparhell

    (@knutsp)

    Hello, and thank yiu for reporting this here.

    It seems the ‘add_pop’ method returns null from cPanel, either because ‘shell_exec’ in PHP fails, or the ‘add_pop’ method is not available in your cPanel configuration and UAPI. Either way, this should not fatal, so I will try to add better protection in unexpected situations. It now only chacks that cPanel initially report the ‘popaccts’ (Email Accounts) feataure is available.

    So I could need a copy of your Tools – Site Health – Info debug public data (copy to clipboard), then (maybe) extract the section “### wf-cpanel-email-accounts ###” and paste the contents here. Thanks in advance.

    Thread Starter edmir311

    (@edmir311)

    When i try to open info debug.

    Fatal error: Uncaught TypeError: substr() expects parameter 1 to be string, null given in
    /public_html/wp-content/plugins/wf-cpanel-email-accounts/includes/SiteHealth.php:139 Stack trace: #0
    public_html/wp-content/plugins/wf-cpanel-email-accounts/includes/SiteHealth.php(139): substr(NULL, 0, -2) #1
    public_html/wp-includes/class-wp-hook.php(324): WebFacing\cPanel\Email\SiteHealth::WebFacing\cPanel\Email{closure}(Array) #2
    public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #3
    /public_html/wp-admin/includes/class-wp-debug-data.php(1471): apply_filters(‘debug_informati…’, Array) #4
    public_html/wp-admin/site-health-info.php(36): WP_Debug_Data::debug_data() #5
    public_html/wp-admin/includes/class-wp-site-health.php(68): require_once(‘/home/fb6a335/p…’) #6
    public_html/wp-includes/class-wp-hook.php(324): WP_Site_Health->show_site_health_tab(‘debug’) #7 /public_html/wp-includes/c in public_html/wp-content/plugins/wf-cpanel-email-accounts/includes/SiteHealth.php on line 139

    Plugin Author Knut Sparhell

    (@knutsp)

    Hmm, are any feature the plugin offers working? Can you visit cPanel Email (Alle Email Adresses) in your wp-admin?

    1. It seeems your site is actually hosted on cPanel. I can see that on https://albaemail.com:2083/
    2. After logging in, are there applets to manage Email accounts and/or Forwarders? cPanel Version (see Sever Information)?
    3. If you create an app token there, and (temporarily) add
      const WF_CPANEL_API_TOKEN = 'paste-your-api-token';
      to your wp-config.php, do that help? (If so, shell_exec PHP function is crippeled or disabled in an odd way the plugin could not detect before using it. But the plugin can work without it, view the Manage Tokens submenu page. If you add a new token there, you can remove the temp config line above.)

    If the above does not help, and it’s of no use, just uninstall it for now and check back later.

    I will, however, in the next release, try to further protect against possible fatals, emit an decent error message, and let it go on doing nothing. But that will probably not help you, unless we can sort out what’s happening, and if this can be expected in a healthy cPanel and PHP based hosting environment.

    Plugin Author Knut Sparhell

    (@knutsp)

    I have now identified that some servers return null for UAPI functions that are removed, or not yet implemeted, in the actual version.

    Please try version 5.2.9 and see if it helps.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal error when trying to create an new email address’ is closed to new replies.