• Hello,

    I have a custom plugin to insert products on my website. In it I enter versions of my products and when I create a new version, when entering the product ids it autocompletes automatically with awesomplete. A few days ago I updated cmb2 and the autocomplete stopped working. Does anyone have the same error and could tell me how to fix it, please? Thank you so much

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    From what version to what version for the update?

    Have you tried going back to the previous version to see if the error persists, or if it goes back to working?

    Any javascript console errors that may be realtead to the autocompleting?

    Thread Starter cberzosabc

    (@cberzosabc)


    Sorry I didn’t give enough information. I update the entired from PHP 7.1.33 to 7.4.33 and the plugin cmb2 from 2.2.2.1 to 2.10.1. I tried to going back to the previous version but it shows critical error on wordpress site.

    With the new update it only receives the first metabox so awesomplete works correctly, but if I add a new metabox, I think it doesn’t receives the new and until I press enter on the new metabox, awesomeplete doesn’t work.

    I can’t I can’t leave it this way because we have many products to add and it means a lot of time.

    The javascript console does not show any errors

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    What about any errors that crop up as you try to use things?

    Is this autocomplete stuff something you did custom or are you using another 3rd party addon for it? Asking because out of box CMB2 doesn’t have anything autocomplete that I can think of.

    Thread Starter cberzosabc

    (@cberzosabc)


    No error appears at any time, it’s just that this autocomplete does not work until the page is refreshed and the metabox has been saved. I use it through awesomplete, but it is something that I have never used and I don’t really understand how it works. Here is the link to the site https://github.com/LeaVerou/awesomplete

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not sure what to suggest here as while I recognize Lea, it’s not our codebase being integrated with CMB2, and apparently no errors in php or javascript are ever showing up.

    Thread Starter cberzosabc

    (@cberzosabc)

    I have already been able to identify the problem.
    The problem is that when I create a new metabox (add_group_field), the DOM does not receive the creation of the dynamic element and, therefore, until I press enter or reload the page, it does not recognize that new section.
    Would you know how to help me solve this problem?

    Thank you

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not really, as that’d still be on Lea’s library to somehow accomplish, since it sounds like you’re trying to use the library on repeater fields that aren’t always immediately displayed. So the idea of suddenly adding a new one causing need to reload the page for it to find, makes sense.

    This is also not me complaining about the autocomplete library as it sounds like it works as a whole, just not in this type of dynamic situation, at least not at the moment.

    Thread Starter cberzosabc

    (@cberzosabc)

    But in the previous version of cmb2 it did work. I have also found another error confirming my suspicion that it does not receive the dynamic elements until the page is reloaded, and that is if I press the button to refresh the wordpress page (without having pressed enter or reloaded the backoffice page) , does not receive the existence of the new fields

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    How previous of a version of CMB2 are we talking about, because 2.10.1 has been our version for 2 years. I don’t know how many updates Lea has pushed out and what changes may be in those new versions that would break things here.

    Beyond that, not sure what to suggest as it’s a separate library being added to work and interact with CMB2, and not the other way around.

    Thread Starter cberzosabc

    (@cberzosabc)

    and is there any other autocomplete for cmb2 other than awesomplete? Additionally, I have been looking for the error and I see that, regardless of awesomplete, when checking in the console, the new cmb2 fields are not received as events until the page is reloaded

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    None that I’m aware of for alternatives to awesomeplete.

    The binding/events are going to be an issue needing handled by the libraries trying to tie in to the fields that CMB2 outputs, so nothing that we can do on CMB2’s end.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Update CMB2’ is closed to new replies.