• Resolved Andyt8

    (@andyt8)


    Hello,

    I use your plugin to show the latest tweets. It work for me execpt one problem.

    I use the plugin Download Manager 5.3.0 from “W3 Eden” on a page to produce a download portal for some free and internal stuff. I use your plugin as widget.

    If the widget is enabled, the download don’t start because of a script error. I see a coming overlay, but it fail to load successful.

    If I disable the widget and use the Download button on the upper left corner, I see the overlay and after enter password, the Download starts.

    It seems to me there are troubles with the rollover. Please for help.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter Andyt8

    (@andyt8)

    Additional information from the developer of Download Manager:

    >>>
    The reason is that plugin somehow removing jQuery and as a result, the modal/popup is not working.
    <<<

    Maybe that help?

    Plugin Author Martin Tod

    (@mpntod)

    Rotating Tweets uses jQuery to rotate – and it’s still rotating – and jQuery is still in the HTML, so jQuery is not removed and it doesn’t look broken not broken.

    The error message in the console when I click on a download link is:

    Uncaught TypeError: jQuery(...).modal is not a function
        at showModal (?__wpdmlo=652:342)
        at HTMLDocument.<anonymous> (?__wpdmlo=652:338)
        at i (jquery.js:2)
        at Object.fireWith [as resolveWith] (jquery.js:2)
        at Function.ready (jquery.js:2)
        at HTMLDocument.J (jquery.js:2)
    

    I’ll see if I can see what’s causing it.

    Thread Starter Andyt8

    (@andyt8)

    Thanks for your response. Yes thats the problem. Is it possible, that there are different jQuery? Maybe Rotating Tweets use a different one and therefore there is some missing function for Download Manager.

    I’m not a developer, but I know it work if I disable the plugin or only remove Rotating Tweets from Widget.

    Plugin Author Martin Tod

    (@mpntod)

    The issue is that jQuery is being loaded twice on the pop-up iFrame generated by Download Manager – once by Download Manager (as far as I can tell – via hard-coding – which is generally not a good idea) and once by Rotating Tweets (which uses the ‘official’ WordPress wp_enqueue_script method for displaying jQuery and is triggered via a wp_footer() call).

    There are three ways to fix this that I can think of:

    • Download Manager loads jQuery and other scripts into the iFrame using the standard WordPress methods, ie. wp_enqueue_script()
    • Download Manager removes the 2nd loading of jQuery from the footer on iFrame pages – by adding something like this (though only on the pages where the jQuery load is hard-coded – or they’ll break loads of other plug-ins):
      function wpdm_dequeue_jquery() {
      	wp_dequeue_script( 'jquery' );
      }
      add_action( 'wp_enqueue_scripts', 'wpdm_dequeue_jquery', 100 );
      

      It may take a bit of experimentation to get the add_action() setting right.

    • Rotating Tweets detects that Download Manager is present and that it’s on a Download Manager iFrame and decides not to load jQuery (which is doable – but the other two methods will ensure that Download Manager plays nicely with loads of other plug-ins, not just Rotating Tweets).
    Thread Starter Andyt8

    (@andyt8)

    Wow! Thanks for your response. I will forward it to the developer of Download Manager and give feedback…

    Thread Starter Andyt8

    (@andyt8)

    Short info…

    The problem is still there. I got the information from the developer that it isn’t from the Download Manager function for loading JQuery. According to a description to change the Download Manager code it should be completly disabled – I mean the loading of JQuery by Download Manager. It changed nothing – so the problem still occour.

    I will do further research. Besides that, I’ll try to integrate a workaround with Download Manager.

    Regarding the execution with the three possible ways to load JQuery… – the Download Manager code looks completely different.

    Thread Starter Andyt8

    (@andyt8)

    Thank you for your help. The problem no longer occurs because I changed the plugin (for downloads).

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Troubles with Download Manager’ is closed to new replies.