WP User Frontend
[resolved] Few plugins stop loading js files after update (12 posts)

  1. mgrmn
    Posted 2 years ago #

    I justed updated WP FRONTED and a few plugins of my own, and SHARE A HOLIC stopped working, for as far i could see, it causes them to stop loading the necesary JS files, when activated.


  2. Tareq Hasan
    Plugin Author

    Posted 2 years ago #

    Whats your site url?

  3. clarkec
    Posted 2 years ago #

    Hi Tareq

    I have the same problem. My website is http://www.ashingtonvillage.co.uk.

    After an update the other day there seems to be a problem on pages without any WP User Frontend shortcodes on as well as pages with it on.

    I use Revolution Slider on my site and this no longer works.

    By a process of elimination (activating and de-activating plugins) I discovered that it was WP User Frontend causing the problem.

    Javascript stops with the error:
    Uncaught TypeError: Cannot read property 'currentStyle' of null

    The file the error is found in seems to be:

    Can you help?

    PS: your plugin states that it was last updated 15,878 days ago which I make a shade over 43 years.

  4. mgrmn
    Posted 2 years ago #

    Temporary fix, deinstall the new version, install old one

  5. jay_BL
    Posted 2 years ago #

    Temporary fix add this to your footer.php:

    <?php $pagename = get_query_var('pagename'); ?>
    <?php if(strtolower($pagename) != '<strong>post-article</strong>' && strtolower($pagename) != '<strong>edit-article</strong>'):  ?>
    <div id="wpuf-ft-upload-container" style="display: none !important;">
            <div id="wpuf-ft-upload-filelist"></div>
            <a href="#">Upload Image</a>
            <div id="p17u2jd5ks117i1otj1pei1kge1psd0_html5_container" class="plupload html5" style="position: absolute; background-color: transparent; width: 103px; height: 36px; overflow: hidden; z-index: -1; opacity: 0; top: 0px; left: 137px; background-position: initial initial; background-repeat: initial initial;"><input id="p17u2jd5ks117i1otj1pei1kge1psd0_html5" style="font-size: 999px; position: absolute; width: 100%; height: 100%;" type="file" accept="" multiple="multiple"></div>
    <?php endif; ?>

    [Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum's parser.]

    Replace "edit-article" and "post-articles" with your page names..

  6. jay_BL
    Posted 2 years ago #

    @Tareq Hasan

    The problem is caused in the wordpress version 3.5.2 because the plupload scripts are loaded on all pages. Adding error checking to see if the plupload container exits in your wpuf.js should fix the issue...

  7. Tareq Hasan
    Plugin Author

    Posted 2 years ago #

    As WP 3.6 is coming with a function has_shortcode() which I am using a same function with that name, so decided to remove that logic. Thats why plupload is added to every page and it's breaking things up. I am going to push a new update and it should fix the problem.

  8. Tareq Hasan
    Plugin Author

    Posted 2 years ago #

    Guys, can you check now with version 1.2.3?

  9. mgrmn
    Posted 2 years ago #

    I believe all is good, havent checked all yet, but no plugin conflicts / ajax conflicts


  10. Luís Peralta
    Posted 2 years ago #

    The edit-profile page, when the user isn't logged (which will show the message for him to login) stills fires this JS error.

  11. writegnj
    Posted 2 years ago #

    Same issue on add post page. when the user isn't logged JS erroe pops up but it does not when user logged in. Any update on this issue?

  12. gr1zzly
    Posted 2 years ago #

    + 1 for "Uncaught TypeError: Cannot read property 'currentStyle' of null" JavaScript error relating to WPUF loading with plupload.

    Specifically I am seeing this error on the 'edit' page, I am using WPUF v1.2.3.

    The strange thing is that when I click "Add another" to upload another attachment the popup file window does appear, and appears (uhuh) to work -- and so therefore I assume 'plupload' is working.

    The trouble is it appears to have killed the post_content editor's "Add media" button -- clicking this now does nothing!

    I found the following lurking in my html head, but I can't seem to find out where this is being loaded from (i.e. where it is being enqueued or attached to an action hook such as 'wp_head'?!)

    var wpuf_attachment = {"nonce":"dba594863a","number":"6","attachment_enabled":"1","plupload":{"runtimes":"html5,flash,html4","browse_button":"wpuf-attachment-upload-pickfiles","container":"wpuf-attachment-upload-container","file_data_name":"wpuf_attachment_file","max_file_size":"2097152b","url":"http:\/\/local.snip-domain.co.uk\/wp-admin\/admin-ajax.php?action=wpuf_attach_upload&nonce=8ff3a39f9b","flash_swf_url":"http:\/\/local.snip-domain.co.uk\/wp-includes\/js\/plupload\/plupload.flash.swf","filters":[{"title":"Allowed Files","extensions":"*"}],"multipart":true,"urlstream_upload":true}};
    /* ]]> */

    ...is this relevant?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP User Frontend
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic