2

I've created a new Publishing Target and associated database, but I've run into an issue that I can't seem to solve. The new target, "review", is present but won't populate on Publish. On performing a full Site Republish, it shows no errors but simply returns:

Job started: Publish to 'review'
Items created: 0
Items deleted: 0
Items updated: 0
Items skipped: 2
Job ended: Publish to 'review' (units processed: 2)

(Doing a Republish on the Home node with sub-items/related included is the same except it reports skipping 57 items)

This is configuration file for adding the DB. The DB itself was created as a copy of Web. Inspecting the review database directly after the publish there are just 11 rows in the dbo.Items table (down from the 1000+ that were present before attempting a publish):

<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:security="http://www.sitecore.net/xmlconfig/security/">
    <sitecore>
        <eventing>
            <eventQueueProvider>
                <eventQueue name="review" patch:after="eventQueue[@name='web']" type="Sitecore.Data.Eventing.$(database)EventQueue, Sitecore.Kernel">
                    <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)"/>
                    <param ref="PropertyStoreProvider/store[@name='$(name)']"/>
                </eventQueue>               
            </eventQueueProvider>
        </eventing>
        <PropertyStoreProvider>
            <store name="review" patch:after="store[@name='web']" prefix="review" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.$(database)PropertyStore, Sitecore.Kernel">
                <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
                <param resolve="true" type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" />
                <param resolve="true" type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" />
            </store>        
        </PropertyStoreProvider>
        <databases>
            <!-- review -->
            <database id="review" patch:after="database[@id='web']" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel" role:require="Standalone or ContentManagement or ContentDelivery">
                <param desc="name">$(id)</param>
                <icon>Images/database_web.png</icon>
                <securityEnabled security:require="Sitecore">true</securityEnabled>
                <securityEnabled security:require="None">false</securityEnabled>
                <dataProviders hint="list:AddDataProvider">
                    <dataProvider type="Sitecore.Data.DataProviders.CompositeDataProvider, Sitecore.Kernel">
                        <param desc="readOnlyDataProviders" hint="list">
                            <protobufItems type="Sitecore.Data.DataProviders.ReadOnly.Protobuf.ProtobufDataProvider, Sitecore.Kernel">
                                <filePaths hint="list">
                                    <filePath>$(dataFolder)/items/$(id)</filePath>
                                    <modulesFilePath>/sitecore modules/items/$(id)</modulesFilePath>
                                </filePaths>
                            </protobufItems>
                        </param>
                        <param desc="headProvider">
                            <dataProvider ref="dataProviders/main" param1="$(id)">
                                <disableGroup>publishing</disableGroup>
                                <prefetch hint="raw:AddPrefetch">
                                    <sc.include file="/App_Config/Prefetch/Common.config" />
                                    <sc.include file="/App_Config/Prefetch/Webdb.config" />
                                </prefetch>
                            </dataProvider>
                        </param>
                    </dataProvider>
                </dataProviders>
                <PropertyStore ref="PropertyStoreProvider/store[@name='$(id)']" />
                <remoteEvents.EventQueue>
                    <obj ref="eventing/eventQueueProvider/eventQueue[@name='$(id)']" />
                </remoteEvents.EventQueue>
                <archives hint="raw:AddArchive">
                    <archive name="archive" />
                    <archive name="recyclebin" />
                </archives>
                <cacheSizes hint="setting">
                    <data>100MB</data>
                    <items>50MB</items>
                    <paths>2500KB</paths>
                    <itempaths>50MB</itempaths>
                    <standardValues>2500KB</standardValues>
                </cacheSizes>
                <BlobStorage hint="raw:AddBlobStorage">
                    <providers default="classic">
                        <provider name="classic" type="Sitecore.Data.Blobs.ClassicSqlBlobProvider, Sitecore.Kernel">
                            <param desc="databaseName">$(id)</param>
                        </provider>
                    </providers>
                </BlobStorage>
            </database>
        </databases>        
    </sitecore>
</configuration>

Publishing Log:

5244 12:35:13 INFO  [Recovery]: Setting default publish recovery strategy.
5244 12:35:13 INFO  [Recovery]: Publish Recovery Enabled - False
5244 12:35:13 INFO  [Recovery]: Publish Recovery Strategy - DatabasePublishRecoveryStrategy
5244 12:35:13 INFO  Settings.Publishing.CheckSecurity:False
5244 12:35:13 INFO  Settings.Publishing.CompareRevisions:True
5244 12:35:13 INFO  Settings.Publishing.DisableDatabaseCaches:False
5244 12:35:13 INFO  Settings.Publishing.ExecuteInManagedThreadPool:False
5244 12:35:13 INFO  Settings.Publishing.LogInterval:0
5244 12:35:13 INFO  Settings.Publishing.MaxDegreeOfParallelism:1
5244 12:35:13 INFO  Settings.Publishing.PublishDialogPollingInterval:500
5244 12:35:13 INFO  Settings.Publishing.PublishEmptyItems:False
5244 12:35:13 INFO  Settings.Publishing.PublishingInstance:[REDACTED]
5244 12:35:13 INFO  Settings.Publishing.RequireTargetDeleteRightWhenCheckingSecurity:True
5244 12:35:13 INFO  Settings.Publishing.StatusUpdateInterval:00:00:02
5244 12:35:13 INFO  Settings.Publishing.ThreadPriority:BelowNormal
5244 12:35:13 INFO  Settings.Publishing.TimeBeforeStatusExpires:02:00:00
4820 12:40:37 INFO  [Publishing]: Starting to process 1 publishing options
4820 12:40:37 INFO  [PublishOptions]: root:null, language:en, targets:Review, database:review, mode:Full, smart:True children:True, related:True
5340 12:40:37 INFO  SitePublish detected. PublishContext was overridden with DisableDatabaseCaches=True.
5340 12:40:37 INFO  Starting [Publishing] - AddItemsToQueue
5340 12:40:37 INFO  Finished [Publishing] - AddItemsToQueue in 0 ms
5340 12:40:37 INFO  Starting [Publishing] - ProcessQueue
5340 12:40:37 INFO  Finished [Publishing] - ProcessQueue in 66 ms
5340 12:40:37 INFO  Publish Mode : Smart
5340 12:40:37 INFO  Created : 0
5340 12:40:37 INFO  Updated : 0
5340 12:40:37 INFO  Deleted : 0
5340 12:40:37 INFO  Skipped : 2

Any and all help gratefully received!

2 Answers 2

2

It looks like configuration issue only and I've noticed a few issues with your patch config that might be causing issues.

< param ref="dataApis/dataApi[@name='SqlServer']" param1="$(name)"/>

You need to change it to <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />

type="Sitecore.Data.Eventing.SqlServerEventQueue, Sitecore.Kernel"

It should be like type="Sitecore.Data.Properties.$(database)PropertyStore, Sitecore.Kernel"

Remove this and try.

< securityEnabled security:require="None">false

You can try the below clean configuration.

<?xml version="1.0" encoding="utf-8" ?>
 <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
     <sitecore>
         <eventing defaultProvider="sitecore">
            <eventQueueProvider>
                <eventQueue name="review" patch:after="eventQueue[@name='web']" type="Sitecore.Data.Eventing.$(database)EventQueue, Sitecore.Kernel">
                     <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
                     <param hint="" ref="PropertyStoreProvider/store[@name='$(name)']" />
                </eventQueue>
            </eventQueueProvider>
         </eventing>
         <PropertyStoreProvider>
             <store name="review" patch:after="store[@name='web']" prefix="review" getValueWithoutPrefix="true" singleInstance="true" type="Sitecore.Data.Properties.$(database)PropertyStore, Sitecore.Kernel">
                  <param ref="dataApis/dataApi[@name='$(database)']" param1="$(name)" />
                  <param resolve="true" type="Sitecore.Abstractions.BaseEventManager, Sitecore.Kernel" />
                  <param resolve="true" type="Sitecore.Abstractions.BaseCacheManager, Sitecore.Kernel" />
             </store>
         </PropertyStoreProvider>
         <databases>
         <!-- review-->
             <database id="review" patch:after="database[@id='web']" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel">
                 <param desc="name">$(id)</param>
                 <icon>Images/database_web.png</icon>
                 <securityEnabled>true</securityEnabled>
                 <dataProviders hint="list:AddDataProvider">
                     <dataProvider ref="dataProviders/main" param1="$(id)">
                         <disableGroup>publishing</disableGroup>
                         <prefetch hint="raw:AddPrefetch">
                              <sc.include file="/App_Config/Prefetch/Common.config" />
                              <sc.include file="/App_Config/Prefetch/Webdb.config" />
                         </prefetch>
                     </dataProvider>
                 </dataProviders>
                <PropertyStore ref="PropertyStoreProvider/store[@name='$(id)']" />
                    <remoteEvents.EventQueue>
                        <obj ref="eventing/eventQueueProvider/eventQueue[@name='$(id)']" />
                    </remoteEvents.EventQueue>
                    <archives hint="raw:AddArchive">
                        <archive name="archive" />
                        <archive name="recyclebin" />
                    </archives>
                    <cacheSizes hint="setting">
                         <data>100MB</data>
                         <items>50MB</items>
                         <paths>2500KB</paths>
                         <itempaths>50MB</itempaths>
                         <standardValues>2500KB</standardValues>
                    </cacheSizes>
              </database>
         </databases> 
     </sitecore>
 </configuration>

Also if publishing not working for the review database you can validate that the review publishing target item is selected in the publishing section.

enter image description here

Hope it helps!

For more details and step by step implementation Refer: Adding New Publishing Targets In Sitecore

https://aldrichdev.wordpress.com/2015/11/17/sitecore-publish-skips-items/

https://blog.martinmiles.net/post/item-not-published-troubleshooting

4
  • Thanks a lot for your reply! Unfortunately, still no joy with the modified configuration. Though 'SqlServer' shouldn't have been hardcoded, $(database) still resolves to that in the created config, so the results end up the same.
    – e_c
    Mar 19, 2023 at 11:17
  • It could be a workflow/publishing restriction issue too. try this blog.martinmiles.net/post/item-not-published-troubleshooting Mar 19, 2023 at 11:35
  • Thanks for the extra suggestions. It does seem to be at least partially related to the Publishing Targets on the items - there are none where only Internet is selected and default behaviour is SUPPOSED to be to then allow all targets, but it does seem explicitly checking both targets will allow some items to publish. It's inconsistent though, so still does not leave the review DB in a useable state. But it's progress at least
    – e_c
    Mar 20, 2023 at 10:52
  • It proved to be some missing .dat files, which are required for Sitecore 10.x onwards. sitecore.stackexchange.com/a/34401/4742
    – e_c
    Mar 21, 2023 at 12:17
2

The answer proved to particular to Sitecore 10.2 (My mistake was I had been looking at a 9.3 guide).

https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-manager/create-a-publishing-target.html

Key steps in the above article are:

  1. In the App_Data\items\ folder, make a copy of the Web folder.

  2. Rename the copy of the folder and the .dat file inside it. Use the database name for the folder (for example, web_preview) and use the database name within the file name, so it is similar to items.web_preview.dat).

Once those files were created the new target began working as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.