cancel
Showing results for 
Search instead for 
Did you mean: 

merge share config customisations with other overrides

mxc
Confirmed Champ
Confirmed Champ
Hi there,

Is there a way to have one's share customisations merged with the default or other overrides in the share-custom-config.xml file? I have tried using the attribute replace="false" but the default aspects are still overridden when adding a custom aspect.

thanks

3 REPLIES 3

afaust
Legendary Innovator
Legendary Innovator
Hello,

when using replace="false", the default aspects shouuld not be overriden if you put your custom aspects in <aspects> / <visible>. If you put your aspects in <addable> or <removeable> instead, they will override the default ones due to the fact that these are only defined to be identical to <visible> if left empty.

In case you correctly put them in <visible> there is also the possibility of another customization / add-on module messing up your configuration to consider. Any add-on may have a share-config-custom.xml and include a configuration with replace="true" to override the default aspects. Nobody should actually put anything like that in their add-on, but unfortunately not everyone is aware they can mess up someones Share badly with it…

Regards
Axel

mxc
Confirmed Champ
Confirmed Champ
Hi Axel,

Thanks for the info. I am running in a test environment so I there are no other addons running. Your email message is not formatting properly on my chrome browser and I think I am missing some of your text. I have setup the overrides in my addon-modules.xml file as follows:


                <config evaluator="string-compare" condition="DocumentLibrary" replace="false">
                    <aspects>
                        <visible>
                            <aspect name="b:docTemplate" />
                            <aspect name="b:dockable" />
                            <aspect name="b:dockableAdv" />
                        </visible>
                        <addable>
                        </addable>
                        <removeable>
                        </removeable>
                    </aspects>               
                </config>


With the above when I try and add an aspect the defaults are no longer showing. Any pointers appreciated.

afaust
Legendary Innovator
Legendary Innovator
Hello,

that configuration looks fine. You say you've put this into addone-modules.xml - I assume this is an extension XML file where that stuff is in the <configurations> area.
Just for sports, have you tried putting that configuration into a regular *config-custom.xml file? If this configuration works there and not in the <configurations> block, this may be a bug…

Regards
Axel