Feedback
Did this article resolve your question/issue?

   

Article

Azure Search content links improperly generated with reindex

« Go Back

Information

 
TitleAzure Search content links improperly generated with reindex
URL Nameazure-search-content-links-improperly-generated-with-reindex
Article Number000202726
EnvironmentProduct: Sitefinity
Version:11.x, 12.x, 13.x
OS: All supported OS versions
Database: All supported Microsoft SQL Server versions
Question/Problem Description
Using a custom provider for dynamic module provides the functionality of changing the URL format of the content. Publishing content and searching for it works as expected.
When using  "Administration > Search Indexes" and push reindex. The search index gets created but now the content links are not properly generated anymore with the items. The provider for the items is no longer the custom provider, its the default provider.
Steps to Reproduce
Clarifying Information
The custom provider was created based on Sitefinity documentation, change the URL format of hierarchical dynamic modules Sitefinity documentation, change the url format of hierarchical dynamic modules https://www.progress.com/documentation/sitefinity-cms/for-developers-change-the-url-format-of-hierarchical-dynamic-modules 
Error Message
Defect/Enhancement Number
Cause
The custom provider has parameter applicationName with value /DynamicModule instead of having a unique applicationName. /DynamicModule is used by the built-in default provider for all modules built with Sitefinity module builder.
Resolution
To solve the problem the applicationName of custom provider has to be changed.
This involves the set of steps:

1. Administration -> Settings -> Advanced -> DynamicModules->Providers, locate Canter provider and change its Parameter->applicationName from /DynamicModule to canterProviderName (or any other, I use this for a sample)

Add an additional parameter to the Canter provider -> Paramters click on "Create New" and add:

key: moduleName
value: Products

and Save changes.

2. Restart the site (note its mandatory to restart after changing the applicationName)
3. When the site comes back online execute a query against the site database. The query uses 'sampleProviderName', change it if you have chosen another applicationName
DECLARE @NewAppName AS VARCHAR(100)='sampleProviderName'

update sf_dynamic_content
set application_name = @NewAppName
where base_id IN (select base_id from products_assortment)

update sf_dynamic_content
set application_name = @NewAppName
where base_id IN (select base_id from products_variation)

update sf_dynamic_content
set application_name = @NewAppName
where base_id IN (select base_id from products_responsibleseller)

update sf_language_data
set app_name = @NewAppName
where id IN (select id from sf_dynmc_cntnt_sf_lnguage_data
where base_id IN (select base_id from products_assortment))

update sf_language_data
set app_name = @NewAppName
where id IN (select id from sf_dynmc_cntnt_sf_lnguage_data
where base_id IN (select base_id from products_variation))

update sf_language_data
set app_name = @NewAppName
where id IN (select id from sf_dynmc_cntnt_sf_lnguage_data
where base_id IN (select base_id from products_responsibleseller))

update sf_url_data
set app_name = 'canterProviderName'
where content_id IN (select base_id from products_assortment)

update sf_url_data
set app_name = @NewAppName
where content_id IN (select base_id from products_variation)

update sf_url_data
set app_name = @NewAppName
where content_id IN (select base_id from products_responsibleseller)

4. Restart the site.
5. After the site is back online reindexing the search index will preserve the Canter provider as provider for
Workaround
Notes
Last Modified Date6/29/2021 2:31 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.