I wish to notify some php warnings that shows up in the debug.log file when domain mapping plugin is installed.
The warnings are the following:
[14-Sep-2016 12:20:08 UTC] PHP Notice: Undefined index: scheme in /home/.../public_html/wp-content/plugins/domain-mapping/classes/Domainmap/Module/Mapping.php on line 655 [14-Sep-2016 12:20:08 UTC] PHP Notice: Undefined index: host in /home/.../public_html/wp-content/plugins/domain-mapping/classes/Domainmap/Module/Mapping.php on line 655
Steps to reproduce the error:
1. register a custom post type and set the
2. Create or Edit any post of this custom post type: everytime the edit screen load, these warnings appear on the debug log files.
The problem is located inside the hook function
post_preview_link_from_original_domain_to_mapped_domain of the Mapping.php file.
This function is linked to the wordpress hook 'preview_post_link'.
Problably the url parameter passed in side this function is empty when a post type is registered with the publicly_queryable set to false.
If you change this property to true, these warnings disappear.
Hope it can help.
P.S. Tested with wordpress 4.6.1 in network mode + domain mapping 22.214.171.124.