Select2 4.0.1

Select2 4.0.1

zajczajc Posts: 67Questions: 10Answers: 2

Editor 1.5.4. Select2 4.0.1 is not working fine with the latest Select2 plugin.
If we try to for example edit row, Select2 type of field doesn't show the saved value just the placeholder.
The plugin works fine with Select2 version 4.0.0.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,489Questions: 1Answers: 10,468 Site admin

    Thanks for letting me know about this. I've just pushed an update out for the plug-in. Could you try it out and let me know how you get on with it.

    Thanks,
    Allan

  • zajczajc Posts: 67Questions: 10Answers: 2

    Your fix solves only the error Uninitialized string offset: 0 in php/lib/Editor/Join.php on line 682 when you submit the form with the empty fileds but the main problem is still the same. When you edit the record it doesn't display the saved values instead the placeholder is shown (label="" value="").

  • allanallan Posts: 63,489Questions: 1Answers: 10,468 Site admin

    Can you give me a link to the page showing the issue please? My local page with Select2 4.0.1 appears to be working okay, but it isn't using all of the options. I'd like to see how you have it configured.

    Allan

  • zajczajc Posts: 67Questions: 10Answers: 2
    edited January 2016
  • allanallan Posts: 63,489Questions: 1Answers: 10,468 Site admin

    I'm getting "Authentication required" at the moment.

    Allan

  • zajczajc Posts: 67Questions: 10Answers: 2
    edited January 2016

    I have changed the URL. Please refresh my message.

  • allanallan Posts: 63,489Questions: 1Answers: 10,468 Site admin
    Answer ✓

    Thanks for the update.

    In the set function in the plug-in could you change:

            conf._input.select2( 'val', val );
    

    to be:

            conf._input.val( val );
    

    I believe that should fix the issue - although I'm surprised about this given there is no mention of it in the Select2 release notes.

    Allan

  • zajczajc Posts: 67Questions: 10Answers: 2

    This fix the issue :)

This discussion has been closed.