• Resolved chabekah

    (@chabekah)


    Dear folks,

    Just did an upgrade to WordPress 5.7 this morning and got this error jmigrate deprecation warning in the console:

    jquery-migrate.js?ver=3.3.2:100 JQMIGRATE: jQuery.isFunction() is deprecated

    No-one else appears to have logged this, so I am putting it here. The error seems to be related to the following lines (about line 108) in um-crop.js:

    
     support: {
          canvas: $.isFunction($("<canvas>")[0].getContext)
        },
    

    Deprecation warnings are not show-stoppers of course, but you may like to update this with the hint here:

    https://api.jquery.com/jQuery.isFunction/

    I am using Ultimate Member 2.1.16 which I believe is the latest current version.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @chabekah

    You can try our pre-release version 2.1.17 that has fixes to this issue:
    https://github.com/ultimatemember/ultimatemember/tree/development/2.1.17

    Ensure that you’ve created a full backup of your site before updating it manually.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @chabekah

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved. …Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. ??

    Regards,

    Thread Starter chabekah

    (@chabekah)

    I just installed 2.1.17 and am seeing the same error in the console on my development box:

    
    jquery-migrate.js?ver=3.3.2:69 JQMIGRATE: Migrate is installed with logging active, version 3.3.2
    jquery-migrate.js?ver=3.3.2:100 JQMIGRATE: jQuery.isFunction() is deprecated
    jquery-migrate.js?ver=3.3.2:102 console.trace
    migrateWarn	@	jquery-migrate.js?ver=3.3.2:102
    obj.<computed>	@	jquery-migrate.js?ver=3.3.2:125
    (anonymous)	@	um-crop.js?ver=2.1.17:108
    (anonymous)	@	um-crop.js?ver=2.1.17:10
    (anonymous)	@	um-crop.js?ver=2.1.17:12`
    
    

    And when I look at the code around line 108:

    
    <pre><code>Cropper.prototype = {
        constructor: Cropper,
    
        support: {
          canvas: $.isFunction($(&quot;<canvas>&quot;)[0].getContext)
        },`
    
    </code></pre>
    

    It doesn’t seem to have changed at all.

    • This reply was modified 3 years, 11 months ago by chabekah.
    • This reply was modified 3 years, 11 months ago by chabekah.

    @chabekah

    Did you clear your browser cache and your server caching if being used?

    Thread Starter chabekah

    (@chabekah)

    Since it’s showing actual version numbers in the trace I didn’t think it was a caching issue. But just to be 100% sure, I opened the page again in an incognito browser (chrome & firefox) and am getting the same error.

    Interestingly, when I open the page on our production server (which unfortunately is behind basic auth so you can’t look at), the error is not thrown in the console. However, I can still see the isFunction() code in the relevant file:

    
    https://ourdomain.com/content/plugins/ultimate-member/assets/js/um-crop.min.js?ver=2.1.17
    

    Presumably there must be some env difference meaning that the relevant code is not being called in production, but I can still see isFunction() in the minimised code:

    
    ...M.prototype={constructor:M,support:{canvas:l.isFunction(l("<canvas>")[0].getContext)},...
    

    @chabekah

    Yes you are right these were found in .js files but not in minified .js files.

    `Search strings: $.isFunction
    File types: js

    Search directory ../plugins/ultimate-member
    Number of directories 53
    Total number of strings found 8

    ../plugins/ultimate-member/assets/js/um-jquery-form.js
    853 options.delegation = options.delegation && $.isFunction($.fn.on);

    ../plugins/ultimate-member/assets/js/um-crop.js
    108 canvas: $.isFunction($(“”)[0].getContext)
    1556 if (typeof options === “string” && $.isFunction((fn = data[options])))
    {

    ../plugins/ultimate-member/assets/js/select2/select2.full.js
    3604 if ($.isFunction(this._request.abort))
    {
    6084 if ($.isFunction(containerCssClass))
    {
    6110 if ($.isFunction(containerCss))
    {
    6141 if ($.isFunction(dropdownCssClass))
    {
    6167 if ($.isFunction(dropdownCss))
    {`

    Thread Starter chabekah

    (@chabekah)

    Well, as you can see from my last post, I found isFunction() in a minified um-crop vs 2.1.7 file as well. No doubt it is just a relic and will be removed now. Thanks for getting back to me.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @chabekah

    Sorry for the late response.

    Could you please tell us if you’re still having issues with the latest version 2.1.19?

    feel free to re-open this thread by changing the topic status to “Not Resolved” so that we can get back to you.

    Regards,

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘JQMIGRATE: jQuery.isFunction() is deprecated in um-crop after WP 5.7 upgrade’ is closed to new replies.