You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple Site Alias request returns insufficient error content #73
In setting up some tools to 'bulk-manage' site aliases, it appears that when I make a request to get Info for multiple Site Aliases and one of them doesn't exist, I get a generic, singular, and somewhat malformed result. Examples below:
There were four aliased subdomains on qa.domain.com. The last two aliases have been removed prior to this test.
{
"success": false,
"domain": "..domain.com",
"message": "Domain alias does not exist"
}
The domain element is malformed, and it neither gives me the info that it can get on the existing aliases, nor does it tell me which aliases, if any, do not exist.
I can work around this by making discrete calls to see which fail, but cringe at the wasted overhead and time to set this up.
The addition made in #72 may give a better workaround than using a raw packet-based request, but it still seems like this should work better than it does. I'll see if I can find time to locate where this is happening in the code, but if anyone can point me in the right direction, I don't mind rolling up the proverbial sleeves and taking a whack at it.
Seeing a similar result in bulk deletion as well; if I request for four aliases to be deleted and one does not exist, I get the same result packet with the "success": false. It does delete the three domains that do exist, it just indicates otherwise. Seems like the bulk responses are being broken when not all of the aliases exist.
PHP library has no special method for bulk "get" of site aliases. So please provide here a PHP code snippet instead of an XML request. There are so many ways to do it.
Activity
ivjames commentedon Oct 28, 2019
The addition made in #72 may give a better workaround than using a raw packet-based request, but it still seems like this should work better than it does. I'll see if I can find time to locate where this is happening in the code, but if anyone can point me in the right direction, I don't mind rolling up the proverbial sleeves and taking a whack at it.
ivjames commentedon Oct 28, 2019
Seeing a similar result in bulk deletion as well; if I request for four aliases to be deleted and one does not exist, I get the same result packet with the
"success": false. It does delete the three domains that do exist, it just indicates otherwise. Seems like the bulk responses are being broken when not all of the aliases exist.ivjames commentedon Oct 28, 2019
Also, I just realized that I don't know if this is happening in this lib's handling of the API or if it's in the API itself.
sibprogrammer commentedon Nov 28, 2021
Plesk API works well for such a case:
PHP library has no special method for bulk "get" of site aliases. So please provide here a PHP code snippet instead of an XML request. There are so many ways to do it.