Can't apply DNS Zone templates anymore

shazde

Active Member
May 19, 2014
31
0
56
cPanel Access Level
Root Administrator
We have a plugin that allows our customers to pick different DNS templates and apply them to their domains zones.
This plugin used to work fine for 8 years but has recently stopped working.

The way the plugin works is to first delete the existing zone using API's killdns command and then recreate the zone by providing the template name to adddns command to recreate the zone.

But recently the killdns command does not let us delete the zone with the following error:

> API failure: (XID krg3u6) You cannot remove the domain “xxxxx” because it is still configured for HTTP use on the “xx” account. Remove the domain from the account by deleting the subdomain, addon domain, parked domain, or the linked account. [killdns] version [1]


How can we achieve our objective?
Also is there any documentation about this recently introduced backward compatibility issue?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,597
2,617
363
cPanel Access Level
Root Administrator
Both killdns and adddns are still valid API calls. Here are the modern documentation entries for each of those:


Are you saying the API used to let you remove the zone data without removing the matching Apache entry?
 

shazde

Active Member
May 19, 2014
31
0
56
cPanel Access Level
Root Administrator
Both killdns and adddns are still valid API calls. Here are the modern documentation entries for each of those:


Are you saying the API used to let you remove the zone data without removing the matching Apache entry?
Yes, the API would let us delete the zone and then we could recreate it. Our code hasn't changed for 8 years, but it does not work now.
And we can't recreate the zone either as it now says the zone already exists.

What we desperately need is to be able to apply a zone template through API on an existing zone or an option to delete the zone even when there are matching apache entries.
I can't find that option.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
16,597
2,617
363
cPanel Access Level
Root Administrator
I have a couple thoughts - you mention a plugin, so I'm assuming that's something you created on your end and not something from a third-party, correct? You mention the plugin hasn't been updated in 8 years, but I'm wondering if you had to make any tweaks for EA4 changes when that was released?

If you execute only the killdns portion of your plugin tool, will that be enough to replicate the error? I'd like to be able to isolate the error you're receiving to a particular API call in order to narrow this down a bit more.