Username:
TITLE
Environment variable for DNS related update events always passes new domain back
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Ubuntu 22.04.2 LTS
Plesk 18.0.59
PROBLEM DESCRIPTION
For most "update" events in the event manager there are "old" and "new " environment variables passed back. However for the events listed below both the "old" and "new " environment variables are always the same, even when with the same action other events do pass different "old" and "new " environment variables back.
STEPS TO REPRODUCE
1) Create a test script to log the passed back environment variables. For testing purposes I used the script below.
2) Add four different types of domains in Plesk to test all four of the events. So in Plesk add
Notice how in the /tmp/event.log (or whichever log file you use) the OLD_DOMAIN_NAME and NEW_DOMAIN_NAME environment variable are the same.
For comparison setup a new event in the event manager for "Default domain (the first domain added to a subscription) updated" and use the same script (from step 1) as command for the event. And rename the subscription domain again in Plesk. Notice how in this case the OLD_DOMAIN_NAME environment variable logged the old domain name, and the NEW_DOMAIN_NAME environment variable logged the new domain name.
ACTUAL RESULT
When a domain is changed (renamed) both the OLD_DOMAIN_NAME and NEW_DOMAIN_NAME environment variable pass back the same (new) domain name.
EXPECTED RESULT
When a domain is changed (renamed) the OLD_DOMAIN_NAME environment variable should pass back the old domain name, and the NEW_DOMAIN_NAME environment variable should pass back the new domain name.
ANY ADDITIONAL INFORMATION
(DID NOT ANSWER QUESTION)
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug
TITLE
Environment variable for DNS related update events always passes new domain back
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
Ubuntu 22.04.2 LTS
Plesk 18.0.59
PROBLEM DESCRIPTION
For most "update" events in the event manager there are "old" and "new " environment variables passed back. However for the events listed below both the "old" and "new " environment variables are always the same, even when with the same action other events do pass different "old" and "new " environment variables back.
- Default domain, DNS zone of domain alias updated
- Default domain, DNS zone updated
- DNS zone of a domain alias updated
- Domain DNS zone updated
STEPS TO REPRODUCE
1) Create a test script to log the passed back environment variables. For testing purposes I used the script below.
Code:
#!/bin/bash
touch /tmp/event.log
echo "Variables: OLD_DOMAIN_NAME: ${OLD_DOMAIN_NAME} NEW_DOMAIN_NAME: ${NEW_DOMAIN_NAME}" >> /tmp/event.log
echo "Variables for alias domains: OLD_DOMAIN_ALIAS_NAME: ${OLD_DOMAIN_ALIAS_NAME} NEW_DOMAIN_ALIAS_NAME: ${NEW_DOMAIN_ALIAS_NAME}" >> /tmp/event.log
2) Add four different types of domains in Plesk to test all four of the events. So in Plesk add
- a subscription domain
- an add-on domain (a domain that shares the webspace with a subscription domain)
- an domain alias to the subscription domain
- an domain alias to the add-on domain
- Default domain, DNS zone of domain alias updated
- Default domain, DNS zone updated
- DNS zone of a domain alias updated
- Domain DNS zone updated
Notice how in the /tmp/event.log (or whichever log file you use) the OLD_DOMAIN_NAME and NEW_DOMAIN_NAME environment variable are the same.
For comparison setup a new event in the event manager for "Default domain (the first domain added to a subscription) updated" and use the same script (from step 1) as command for the event. And rename the subscription domain again in Plesk. Notice how in this case the OLD_DOMAIN_NAME environment variable logged the old domain name, and the NEW_DOMAIN_NAME environment variable logged the new domain name.
ACTUAL RESULT
When a domain is changed (renamed) both the OLD_DOMAIN_NAME and NEW_DOMAIN_NAME environment variable pass back the same (new) domain name.
EXPECTED RESULT
When a domain is changed (renamed) the OLD_DOMAIN_NAME environment variable should pass back the old domain name, and the NEW_DOMAIN_NAME environment variable should pass back the new domain name.
ANY ADDITIONAL INFORMATION
(DID NOT ANSWER QUESTION)
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM
Confirm bug