Set multiple values as selected when the page loads

Hi.
I’m not familiar with select2, however even after reading the doc I am unable to solve my issue.

I have this code injected in a scriptBlock:

<?= $this->Html->scriptBlock('
    $(document).ready(function() {
        $(".select2-srvs").select2();
        $(".select2-urls").select2();
[...]
    });
', ['block' => 'footer-js']); ?>

And I have these two corresponding fields in my page :

<div class="form-group">
    <label for="name"><?= __('Serveur(s) hébergeant tout ou partie de la plateforme') ?></label>
        <?= $this->Form->control('servers._ids', ['required' => false, 'label' => false, 'multiple' => true, 'type' => 'select', 'class' => 'form-control select2-servers', 'data-placeholder' => 'Ex. "hostname"']) ?>
</div>
<div class="form-group">
    <label for="name"><?= __('URL(s) associées à tout ou partie de la plateforme') ?></label>
        <?= $this->Form->control('urls._ids', ['required' => false, 'label' => false, 'multiple' => true, 'type' => 'select', 'class' => 'form-control select2-urls', 'data-placeholder' => 'Ex. "https://my.url.com"']) ?>
</div> 

I have URLs associated with my “Platform” the same way as the servers however they are not displayed. From what I understood from the doc

$(".select2-srvs").select2();

shouldn’t even display the servers… ?

It seems the select2-selection__choice method is seaching for the primary keys attached to my URLs and doesn’t find them ?

A possible workaround is something like :

$(".select2-urls").val(["4"]);

however I want to get the corresponding attached URLs, not one I declare arbitrary.

I working over someone else’s work which explains my lack of knowledge, however I’ll give my best to provide necessary info to solve the issue.

Regards,

EDIT : Was an issue with my Controller, and had nothing to do with select…
Ticket Solved.