• Resolved websitu

    (@websitu)


    Hi

    I am using your plugin with GeoDirectory and experienced an issue with being able to move boxes into different positions. I reported the issue in the support forum and one of the developers responded – The details are shown below the chevrons.

    It was suggested that this issue was brought to you attention.

    Thank You

    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>.

    I have checked and found that there is a conflict with select2 jQuery plugin between GeoDirectory & BuddyPress Xprofile Custom Field Types plugins.

    “BuddyPress Xprofile Custom Field Types” plugin overwrites the select2 JavaScript included by GeoDirectory. GeoDirectory includes full version (with additional features) of select2 where as “BuddyPress Xprofile Custom Field Types” plugin includes only basic version (with basic features) of select2. BP XProfile plugin uses older version select2 v4.0.2 and GeoDirectory uses select2 v4.0.5.

    Please ask “BuddyPress Xprofile Custom Field Types” plugin developer to update select2 JavaScript file in their plugin and also ask them to use full version of select2.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi websitu,
    Thank you for reporting.

    Yes, the plugin contains an older version of select2 library. I will update in next 2 days and reply back.

    I am not able to make sense of this line though

    
    BuddyPress Xprofile Custom Field Types” plugin overwrites the select2 JavaScript included by GeoDirectory
    

    If they want, they can unregister and register the select js. The only reason it might be getting overwritten is they might be using the same handle as us and our script registration might be happening after theirs.

    Regards
    Brajesh

    Thread Starter websitu

    (@websitu)

    Thank You Brajesh – I’ll report back after the update

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Thank you for the patience.

    I have updated the plugin with the latest release.

    Please do let me know if it works for you or not? If the GeoDirectory support needs any clarification regarding how I enqueue the script, Please do let me know. I will be glad to assist.

    Regards
    Brajesh

    Thread Starter websitu

    (@websitu)

    Hi Brajesh

    I updated your plugin however still experiencing the same issue. I contacted Geodirectory support and the response is shown below. Thank You for your assistance in this matter

    Hi,

    It is still loading bp-xprofile-custom-field-types/assets/vendors/select2/select2.min.js?ver=4.0.2 on GD CPT custom field settings page.

    Updated BuddyPress Xprofile Custom Field Types plugin still loading the basic version of select2 and it results in JavaScript Error: “No select2/compat/dropdownCss”. Please ask him to load full version of select2.

    Plugin Author Brajesh Singh

    (@sbrajesh)

    Hi Wesitu,
    Thank you for the details. Can you please point me to the geodirectory plugin page? Is it available on wp.org?

    I am not sure why the Geo directory team can not enqueue their own version of select2. They can either register their handle at higher priority of deregister and register their own. Both approach will work fine.

    I am not including the full because this plugin does not need the full version. Please see the difference and recommendation on select2 site
    https://select2.org/getting-started/builds-and-modules

    Here is what they say about selec2.full.js

    You should only use this build if you need the additional features from Select2, like the compatibility modules or recommended includes like jquery.mousewheel

    We don’t need it and that’s why we don’t include it.

    Also, It does not seem they are interested in solving it, so I will point my usage here

    https://github.com/buddydev/bp-xprofile-custom-field-types/blob/master/src/bootstrap/class-assets-loader.php#L43

    We do register the “select2” handle but only load the script conditionally on front end user registration, user profile edit on front end and user profile edit inside the dashboard.

    If the script is being loaded on their post type from our code it simply means we have a conflict on the name of handle and since they need the full js, they can easily solve it by registering their script early.

    Please let me know their response. I am hoping that they can register early and resolve it.

    Regards
    Brajesh

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Select 2’ is closed to new replies.