Support » Fixing WordPress » [Plugin: OpenID] Javascript undefined

  • 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



Viewing 11 replies - 1 through 11 (of 11 total)
  • The same problem!

    @davehope: Are you running a custom theme?

    @antair: what theme are you using?

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

    Yep, custom theme.

    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.

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

    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.

    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.

    @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!

    @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

    WP-Openid 3.3 fixes the problems. Hurray!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: OpenID] Javascript undefined’ is closed to new replies.