So I have been trying to find the option out there to make the default, where all publishing targets are selected. I have the 3 from the below screen shot and doesnt seem to publish everything everywhere unless checked on the Content tab of the item. Thanks for the help.
-
By default everything unchecked means they all are used. Perhaps workflow or publishing restrictions are causing the issue.– Michael WestMay 3, 2022 at 23:24
-
Ok good point I will look, we dont have any workflows setup at the moment in any environment but the publishing restrictions might be the issue, maybe they werent setup correctly in the beginning.– user1566783May 4, 2022 at 21:36
1 Answer
If you have multiple publishing targets then you will see all of them in the publishing window as checkbox items. If you want to set any of these publishing target databases as your default target database, then you can configure it via the DefaultPublishingTargets
setting in web.config
file.
<setting name="DefaultPublishingTargets" value="Internet_uk" />
If you want to mark all of them pre-selected then use the pipe sign. Pipe-separated list of default publishing targets. Groups in this list will be pre-selected in the Publish dialog.
<setting name="DefaultPublishingTargets" value="Internet|Internet_uk|Internet_west" />
For reference, I am adding an image of my project showconfig.aspx
:
Create a patch file to add Publishing Target DB: (for reference I am pasting my patch file code here, you can update accordingly)
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<databases>
<database id="web2" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel">
<param desc="name">$(id)</param>
<icon>Images/database_web.png</icon>
<securityEnabled>false</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>
<eventing defaultProvider="sitecore">
<eventQueueProvider defaultEventQueue="core">
<eventQueue name="web2" 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 defaultStore="core">
<store name="web2" prefix="web2" 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>
</sitecore>
</configuration>
-
So I added the above setting to the sitecore.config on my test site. However when I go in and look at a template file the boxes are still unchecked in there. Does it matter if that is checked or not? So the image I put up above is still showing that way in test. May 4, 2022 at 16:59
-
Can you please verify whether the above setting applied or not? Go to the {sitecore-instance}/sitecore/admin/showconfig.aspx and you can verify. May 5, 2022 at 6:29
-
I have added the pictures above as you can see its internet but doesnt show checked. I was hoping that would be checked before trying any updates. The internet wasnt the issue its the west and UK that are but if it isnt checked with just internet. I did see that the config had "" in the publishing targets before. May 5, 2022 at 17:49
-
I have added an image of my showconfig.aspx and it's displaying with pipe separated, but in your image is displaying only one. And all are by default checked into my publishing window. Let me know if you need a patch file for reference so that you can compare if you are missing something there. May 7, 2022 at 7:58
-
So with your image from above it shows the patch:source, I was just updating my sitecore.config straight in there. Does it need a patch for this, if so could you please give reference to how you used your patch to get yours to show like that. May 10, 2022 at 16:10