• Resolved controvi

    (@controvi)


    Hello,

    I would like to know some more information about the dependencies of wpdiscuz on jquery.
    Last weekend we found out that the website comments weren’t working.
    After some debugging I figured out that there was no javascript loading at all from the plugin.

    When I searched for the reason it started to look more and more like the plugin wasn’t loading because it had a dependency on jquery

    What we have on our website is the following.
    We want to load all javascript in the footer including jquery.
    As wordpress thinks jquery is very important, it doens’nt matter if I tell it to be in the footer and just puts it in the header.
    So we deregistered jquery and hardcoded it in the footer.

    When I returned it to the queue wpdiscuz started working agian.

    It seems that by removing the jquery from the registered scripts the dependency is gone and wpdiscuz doesn’t load its javascripts.

    I would like to know if this assesement is correct and if there is anything to do about it our if you can build in a selection to tell the plugin to look for the registered or use a custom script.

    THanks for your time and hope to hear from you soon.

    Kind regards,
    Jeroen

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m having the same issue.

    Plugin Support gVectors Support

    (@gvectorssupport)

    Dear users,

    The reason is, that you try to load jquery after wpDiscuz script, so it doesn’t work.
    You should load, jquery before scripts, please change the order of scripts loading.

    Thread Starter controvi

    (@controvi)

    Ok well that somewhat looks like an answer.
    I can derive from your comment that indeed all the javascript code for the plugin is loaded in the header by default.

    What I don’t really understand is why you would put plugin scripts in the header while it is known that more and more websites are putting the javascript all in the footer.
    Besides that it is now a best practice to have you website header so much as javascript free.

    For a plugin as big and popular as this I would think you guys would be jumping on this so webdevs can enjoy the advantages of up-to-date code fitting to current standards and best practices.

    So again.
    Is the following true?

    I quote myself:
    “It seems that by removing the jquery from the registered scripts the dependency is gone and wpdiscuz doesn’t load its javascripts.

    I would like to know if this assesement is correct and if there is anything to do about it our if you can build in a selection to tell the plugin to look for the registered or use a custom script.”

    Thread Starter controvi

    (@controvi)

    I have been trying to get everything to the bottom by force and it seems to have worked finally.
    Hope that this keeps working.

    Still curious about the question just don’t need a solution right now.
    Taking to much time already.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Forced dependencies’ is closed to new replies.