Thursday, December 14, 2017

com.day.cq.searchpromote.Search ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog - Adobe Search and Promote

com.day.cq.searchpromote.Search ParseError at [row,col]:[1,1] Message: Content is not allowed in prolog - Adobe Search and Promote

I was getting the below exception while searching the documents from Search&Promote in Adobe Experience Manager website.

14.12.2017 17:49:43.040 *ERROR* [10.204.139.58 [1513273782091] GET /content/test/en/search.html HTTP/1.1] com.day.cq.searchpromote.Search ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:596)
        at com.sun.xml.internal.stream.XMLEventReaderImpl.nextEvent(XMLEventReaderImpl.java:83)
        at com.day.cq.searchpromote.xml.result.ResultParser.getNextEvent(ResultParser.java:61)
        at com.day.cq.searchpromote.xml.result.ResultParser.parse(ResultParser.java:48)
        at com.day.cq.searchpromote.Search.parseResults(Search.java:526)
        at com.day.cq.searchpromote.Search.<init>(Search.java:154)
        at com.tr.openweb.ecommerce.sly.search.SearchInitializer.activate(SearchInitializer.java:69)
        at com.tr.openweb.ecommerce.sly.search.SearchBarPage.activate(SearchBarPage.java:19)
        at com.adobe.cq.sightly.WCMUsePojo.init(WCMUsePojo.java:84)
        at org.apache.sling.scripting.sightly.impl.engine.extension.use.JavaUseProvider.provide(JavaUseProvider.java:119)
        at org.apache.sling.scripting.sightly.impl.engine.extension.use.UseRuntimeExtension.call(UseRuntimeExtension.java:84)
        at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:66)
        at org.apache.sling.scripting.sightly.apps.test.components.search.searchBarPage.SightlyJava_searchBarPage.render(SightlyJava_searchBarPage.java:44

I was not able to identify any configuration issues with AEM  or Search&Promote.

It looks to be the issue was caused due to the renaming of existing Search-Promote cloud configuration in AEM, the renaming of the configuration created some internal issue and due that the search was failing with parsing error, the issue got resolved after deleting and recreating the Search-Promote cloud configuration.


IndexConnector prefetch failed - Adobe Search and Promote

IndexConnector prefetch failed - Adobe Search and Promote 

Index Connector can be used to define additional input sources for indexing XML pages or any kind of feed.

The  Index Connector is not enabled in the Search and Promote account by default, the  Index Connector can be only enabled by reaching out to Search and Promote consultant or support team.

Search_and_promote_index_connector

After enabling the Index Connector the regular indexing stopped working with the following exception.

1: 12/14 13:10:14 CST ======== Starting manual crawl of account spxxxxxx. ========
2: 12/14 13:10:14 CST ERROR: IndexConnector prefetch failed.
3: 12/14 13:10:15 CST Starting update of slice list.
4: 12/14 13:10:15 CST Skipping update of slice list - no change since last update.
5: 12/14 13:10:15 CST Refreshing auto-complete word list.
6: 12/14 13:10:15 CST Finished refreshing auto-complete word list.
7: 12/14 13:10:15 CST Creating GS config.
8: 12/14 13:10:15 CST Finished creating GS config.
9: 12/14 13:10:15 CST --------------------------------------------------------------------
10: 12/14 13:10:15 CST *** Crawl Summary ***
11: 12/14 13:10:15 CST Start Time: 12/14/2017 13:10:14 CST
12: 12/14 13:10:15 CST End Time: 12/14/2017 13:10:15 CST
13: 12/14 13:10:15 CST Elapsed Time: 1 second
14: 12/14 13:10:15 CST Pages Crawled: 0 pages
15: 12/14 13:10:15 CST Words/Bytes Indexed: 0 words/ 0 bytes
16: 12/14 13:10:15 CST Depth: 1
17: 12/14 13:10:15 CST Errors: 1
18: 12/14 13:10:15 CST Starting update of slice list.
19: 12/14 13:10:15 CST Skipping update of slice list - no change since last update.
20: 12/14 13:10:15 CST *** Index Summary ***
21: 12/14 13:10:15 CST Total Pages: 278
22: 12/14 13:10:15 CST --------------------------------------------------------------------
23: 12/14 13:10:15 CST ======== Finish manual crawl of account spxxxxx: Aborted. ========

This will be fixed after enabling at least one Index Connector configuration, if the actual Index Connector Configuration can't be created then create a dummy configuration with disabled status that will fix the indexing issue.
S&P_index_connector_configuration

S&P_index_connector_configuration



Monday, December 11, 2017

Different approaches to integrate Adobe Experience Manager(AEM) with Eloqua

Different approaches to integrate Adobe Experience Manager(AEM) with Eloqua


This post will explain the different approaches to integrate Adobe Experience Manager(AEM) with Eloqua to capture the user data.

Eloqua Landing Page:


Define a Landing page in Eloqua with requred form fields and action, redirect the user to the Landing page from AEM whenever required to capture the data.User data will be directly submitted to the Eloqua without any interaction from AEM.

In this approach while defining the Landing page in Eloqua the look and feel of the landing page should be matched with AEM pages look and feel for better user experience.

Refer the following URL to more details on defining a landing page -
https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAA/Help/LandingPages/Tasks/CreatingNewLandingPagesDesignEditor.htm

Submit the data through Eloqua form - Directly to Eloqua Form Action URL:


Define the form in Eloqua with required fields, place the form in a AEM component- change the look and feel accordingly.

Eloqua_form_creation
Select Basic Form option
Eloqua_form_options
Define required fields in the form
Eloqua_form_fields



Saturday, December 9, 2017

How to display the Google Adsense at the bottom of the page in mobile view?

How to display the Google Adsense at the bottom of the page in mobile view?

Sometimes we may required to display the specific ad only in the mobile view at the bottom of the page. This post will explain the approach to display the adsense ads at the bottom of the page in mobile view.

google_adsense_mobile_bottom

 Enable Custom template for Mobile view: 

 Make sure the custom template for the mobile view is selected

mobile_custom_template

 Enable adsense at the bottom of the page in mobile view: 

 Add a HTML/JavaScript widget at the bottom of side bar

widget-sidebar-bottom

 Add the google adsense script in the widget
 Identify the the widget id of the new widget added

widget-configuration


 Save the widget and the Layout arrangement

 Go to Blogger Dashboard > Theme > EDIT HTML

Locate widget with the widget id and add mobile='only' configuration as shown below - this will make sure this widget will be displayed only in mobile view

  <b:widget id='HTML6' locked='false' mobile='only' title='' type='HTML'>
 
mobile-only-widget
 
  Save Theme
 
  This will display the add at the bottom of the blogger mobile view.
  You can how test if the Google Adsense is displaying at the bottom of the blogger mobile view


How to display the Google Adsense between blogger posts in mobile home page view?

How to display the Google Adsense between blogger posts in mobile home page view?

 This post will explain the approach to display the adsense ads between posts in mobile home page view.

adsense_between_posts_mobile_home

 Enable Custom template for Mobile view:

 Make sure the custom template for the mobile view is selected

mobile_custom_template

 Add adsense between posts in mobile home view: 

Go to Blogger Dashboard > Theme > EDIT HTML

 Locate <b:include data='post' name='mobile-index-post'/>

 Replace

 <b:loop values='data:posts' var='post'>
    <b:include data='post' name='mobile-index-post'/>
 </b:loop>
 
  With
 
  <b:loop index='x' values='data:posts' var='post'>
    <b:include data='post' name='mobile-index-post'/>
  <b:if cond='(data:x+1)%2==0'>  
  <!-- Add adsense code here -->  
</b:if>
  </b:loop>
 
  Save Theme
 
  This will display the add after every two posts in the blogger mobile home view - Change the condition based on your requirement
 
  You can how test if the Google Adsense is displaying between the posts in mobile home view.