• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Cloudflare extension - import / export not working

TomBoB

Silver Pleskian
Username:

TITLE


Cloudflare extension - import / export not working

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk 18.0.56, AlmaLinux 8.8 latest updates

PROBLEM DESCRIPTION

cannot import or export DNS settings using Cloudflare extension

STEPS TO REPRODUCE

have extension installed and connected to Cloudflare account. Attempt to import existing Cloudflare DNS zone. Or attempt to export from Plesk to Cloudflare.

ACTUAL RESULT

error messages.

Export to Cloudflare failed.

PleskExt\CloudflareDns\Query\GetCFZones\Response::__construct(): Argument #4 ($CFNameServers) must be of type array, null given, called in /usr/local/psa/admin/plib/modules/cloudflaredns/library/Query/GetCFZones/Handler.php on line 45


Import from Cloudflare failed.

PleskExt\CloudflareDns\Query\GetCFZones\Response::__construct(): Argument #4 ($CFNameServers) must be of type array, null given, called in /usr/local/psa/admin/plib/modules/cloudflaredns/library/Query/GetCFZones/Handler.php on line 45

EXPECTED RESULT

import / export works

ANY ADDITIONAL INFORMATION

Cannot comment on earlier versions of the extension as we only now started testing it.

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
The error message reads as if name server data is missing somewhere. Is your Cloudflare account correctly configured?
 
We are having the same issue when testing the extension (same config as above) . API looks fine, in terms of config and Plesk side looks good to. Not sure where else to look ! The only thing we haven't done is change the Nameservers at Root as we don't want to until we have a successful export. Cheers for any help :)
 
Hi Peter, have triple check both sides, and all good.

I don't program API etc so can't say I'm an expoert. But looking at the error message purely logically:

PleskExt\CloudflareDns\Query\GetCFZones\Response::__construct(): Argument #4 ($CFNameServers) must be of type array, null given, called in /usr/local/psa/admin/plib/modules/cloudflaredns/library/Query/GetCFZones/Handler.php on line 45

To me that indicates on cloudflare side it expects an array [for $CFNameServers] while whatever Plesks extension hand over is null / blank.

The odd thing is that the official documentation for the extension states that the extension does not sync name servers to cloudflare. So there seems to be some discrepancy.
Plesks DNS has to have NS entries; but the extension (according to documentation) doesn't sync that to Cloudflare [matching "null" being given to Cloudflare], yet Cloudflare expecting an array...

Sorry not a programmer of APIs, but above seems to have a logical mis-step.

EDIT.
 
EDIT:
just a thought. If > Handler.php on line 45 < just uses null, but is supposed to use an array of null values, that would explain it. Purely logically thinking...
 
In PHP, the error means that an undefined variable is supplied as a parameter to a function, hence my idea that input is simply missing.
 
In case it has to do with it: We currently use the DigitalOcean DNS extension to push all DNS settings to those name servers as default behaviour. The Cloudflare extension is now loaded in addition to the DigitalOcean one on one server for testing purposes.
We're testing with a few very unimportant domains. Both show same behaviour, above errors.
Wanted to mention that as it may be an uncommon setup [preparation for potential switch from DO to CF] and there may be a clash between the two extensions.
 
@TomBoB, developers are asking for the configuration in your Cloudflare account for the affected domain. Could you please provide the DNS records on the Cloudflare side and if possible as much additional information on the Cloudflare configuration as possible? Please send it in a private message.
 
If its any help from our side we have nothing in Cloudflare so this error happens when we try and do an initial export into Cloudflare. Configuration of settings in Cloudflare is as described in the Plesk Documentation. ie "Zone:Edit", "DNS:Edit". Integration has completed without error
 
According to developers we'll publish a fix very soon, probably within hours. I'll set this thread to "resolved" as an update of the extension, that will probably be rolled out to everyone using it, should become available within the next 24 hours.
 
Hey @Peter Debik
Is this a similar Error?


Code:
Export to Cloudflare failed.

    PleskExt\CloudflareDns\Query\GetCFZonesByTokenList\Response::__construct(): Argument #4 ($CFNameServers) must be of type array, null given, called in /opt/psa/admin/plib/modules/cloudflaredns/library/Query/GetCFZonesByTokenList/Handler.php on line 37
 
Back
Top