How to resolve Adobe Experience Manager(AEM) pointing to Search and Promote(S&P) Stage environment?
Recently i have faced a issues on AEM publisher pointing to Search and Promote(S&P) stage environment irrespective of the environment configuration in OSGI configuration( Adobe Search&Promote Integration )
How to confirm AEM is pointing to S&P stage environment:
Check the content of searchformxml property from /etc/cloudservices/search-promote/>/jcr:content and check the URL
Stage - http://stage.xxxxx.guided.ss-omtrdc.net
Live - http://xxxxx.guided.ss-omtrdc.net
The following steps can be followed as a workaround:
Decode the data if it is already encoded(HTML Decoder) - searchformxml property from /etc/cloudservices/search-promote/>/jcr:content
Remove
Change the following URLs to point to live configuration
//content.atomz.com/xxxxx/stage/autocomplete_data.js to //content.atomz.com/xxxxx/publish/autocomplete_data.js
//content.atomz.com/xxxxx/stage/autocomplete_styles.css to //content.atomz.com/xxxxx/publish/autocomplete_styles.css
Change the action to point to live URL
http://stage.xxxxx.guided.ss-omtrdc.net to http://xxxxx.guided.ss-omtrdc.net
e.g - this will be different based on your S&P configuration
]]>
(function(){var searchTextBoxId='q';var mboxContainerId='tntMBox';var mboxName='searchParamMbox';function removeEventSimple(obj,evt,fn)
{if(obj.removeEventListener)
obj.removeEventListener(evt,fn,false);else if(obj.detachEvent)
obj.detachEvent('on'+evt,fn);}
function addEventSimple(obj,evt,fn)
{if(obj.addEventListener)
obj.addEventListener(evt,fn,false);else if(obj.attachEvent)
obj.attachEvent('on'+evt,fn);}
function setSearchFormMbox()
{mboxDefine(mboxContainerId,mboxName);mboxUpdate('searchParamMbox');removeEventSimple(el,'keydown',setSearchFormMbox);}
var el=document.getElementById(searchTextBoxId);if(el)
addEventSimple(el,'keydown',setSearchFormMbox);})();
]]>
If the same S&P configuration with live option is enabled in any other server then copy and replace the value of searchformxml in /etc/cloudservices/search-promote/>/jcr:content
I have faced this issue in Adobe Experience Manager(AEM) 6.2 version