WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: OpenID] Javascript undefined (12 posts)

  1. DaveHope
    Member
    Posted 5 years ago #

    Running wordpress 2.8 and OpenID 3.2.2 The js files don't seem to get added to the page.

    The JS in the footer does, but not the actual js or css files. Other plugins don't exhibit the same problem.

    If you're interested, the URL to my site is http://davehope.co.uk/

    Thanks,

    Dave

  2. antair
    Member
    Posted 5 years ago #

    The same problem!

  3. factoryjoe
    Member
    Posted 5 years ago #

    @DaveHope: Are you running a custom theme?

    @antair: what theme are you using?

  4. DaveHope
    Member
    Posted 5 years ago #

    @factorjoe Yes. My header.php file does call wp_head() though, which is where I guess it'd get hooked?

  5. antair
    Member
    Posted 5 years ago #

    Yep, custom theme.

  6. blt4
    Member
    Posted 5 years ago #

    Same thing here. Using iNove theme.

    Digging in a little, I can see that the wp_enqueue_script is being called from the wp_head action, which, according to the wp_enqueue_script function reference, will not work. This appears to be why openid.min.js is not being loaded, and thus we are getting undefined functions.

    WordPress suggests calling wp_enqueue_script form an init function.

  7. davidcollantes
    Member
    Posted 4 years ago #

    @blt4, all that is very good to know... Now, did you find a fix? And if so, care to post it back? Thanks mate!

  8. blt4
    Member
    Posted 4 years ago #

    Nope. After I posted, I forgot about this issue hoping the OpenID plugin would be updated. I guess that isn't going to be the case so if I have time I'll look for a fix.

  9. brianwhite
    Member
    Posted 4 years ago #

    You have to use the "get_header" hook since is_single() and is admin() aren't available in "init". BTW: is_singular() should be used instead of is_single() so the OpenID html and JavaScript functions are added to pages too. Also jquery.xpath is not compatible with the latest version of jQuery that is included with WP 2.8 (and conflicts with many other plugins) so you need to remove that and update openid.js too.

    I made these and a few other changes (including removing some dead PHP code and CSS) and I've got this plugin running under WordPress 2.8 with what seems to be full functionality. Ultimately, I updated 5 PHP files 2 JavaScript files and 2 CSS files. I would be glad to post my changes for everyone but there doesn't seem to be a way to attach a zip file. If anyone still uses this plugin and is interested I'll upload them someplace and post a link.

  10. davidcollantes
    Member
    Posted 4 years ago #

    @brianwhite, could you please zip and upload somewhere the changed files? I would really like to get this working, as it seems the developers are busy on better and greater things. Thanks!

  11. DaveHope
    Member
    Posted 4 years ago #

    @brianwhite Like davidcollantes I'm interested in the fixes. If you can e-mail them to me I'll host the changes for everyone to download.

    dave at dave hope dot co dot uk

  12. davidcollantes
    Member
    Posted 4 years ago #

    WP-Openid 3.3 fixes the problems. Hurray!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags