Add Entry Button Not Shown When Overriding Entry Sources We're putting together a site where there is regional content managed by regional editors. I want to override the sources to only list entries from regions they are allocated to. I also want to group them by region rather than having entries for all their regions in one list.

All was going well until I tried to remove the default Craft sources by clearing the $sources array at the start. This has resulted in the New Entry button no longer being displayed.

This is my function at the moment:

public function modifyEntrySources(&amp;$sources, $context)
{
    if ($context == 'index')
    {
        if ($this-&gt;regionalEd)
        {
            $sources = [];
            foreach ($this-&gt;regions as $region)
            {
                $sources[] = ['heading' =&gt; $region['title']];
                $sources['news:'.$region['id']] = [
                    'label'       =&gt; 'News',
                    'criteria'    =&gt; ['relatedTo' =&gt; $region['id'], 'section' =&gt; 'news', 'editable' =&gt; true],
                    'data'        =&gt; array('type' =&gt; SectionType::Channel, 'handle' =&gt; 'news'),
                    'defaultSort' =&gt; array('postDate', 'desc'),
                ];
                $sources['notifications:'.$region['id']] = [
                    'label'       =&gt; 'Notifications',
                    'criteria'    =&gt; ['relatedTo' =&gt; $region['id'], 'section' =&gt; 'notifications', 'editable' =&gt; true],
                    'data'        =&gt; array('type' =&gt; SectionType::Channel, 'handle' =&gt; 'notifications'),
                    'defaultSort' =&gt; array('postDate', 'desc'),
                ];
            }
        }
    }
}


Is there something I need to add/remove, (other than the $sources = []; line!), to allow the New Entry button to be displayed?
The New Entry button is not being displayed as Craft is not seeing my sources as containing publishable entries.

The Craft JS object contains a list of publishableSections which is checked by craft.js using this.getSourceByKey('section:'+section.id). Since my sources use a custom key value they are not included in this list.

So I have resolved the problem by adding my own New Entry button.