Sunday, March 04, 2012

Drupal 7 + OpenID: First Attempt

So it worked, but with caveats. Here's what worked:
  • associating exiting account with Google profile for OpenID (e.g.
  • logging into existing account using Google profile OpenID
  • OpenID Selector module for logging into existing account
Here are the caveat:
New logins using OpenID did not create new account. My attempts to login were met with the message:
Complete the registration by filling out the form below.
Unfortunately, for said form...and for me, no form below to be found. I am using a custom theme, to which I've added a custom (very simple) maintenance page template. So at this point, I'm trying to figure out what variables and custom functions I need to add to get the registration working. No luck yet (and marginal incentive as there's other more pressing stuff to finish), but here are some links I'll be checking out when I have a moment:

Thursday, March 01, 2012

Drupal 7 Notice: undefined index node workflow_tokens()

Was getting the following messages on my Drupal 7 site:
Notice: Trying to get property of non-object in workflow_tokens() (line 189 of /var/www/drupal/sites7/all/modules/contrib/workflow/workflow.module).

Notice: Undefined index: node in workflow_tokens() (line 188 of /var/www/drupal/sites7/all/modules/contrib/workflow/workflow.module).
First I tried updating the workflow status for all the content I'd created for the site (about 12 nodes of sample content) to publish. Still saw the error, then remembered that earlier, I was getting notices from the Page Title module:
Notice: Trying to get property of non-object in views_page_title_pattern_alter() (line 47 of /var/www/drupal/sites7/all/modules/contrib/page_title/modules/
I redefined the default for the page title settings to use the content page title token rather than the node title. Then defined the titles (using the node title token) for the custom nodes I'd defined on my site. This seemed to resolve the workflow_tokens notices.
Lookinig at the code it seems like the node argument required for the workflow_tokens function was not properly defined by the time lines 188 and 189 were reached in the processing. Not sure why this was occurring or how the Page Title module was impacting the function so if anyone can shed some light on that it could be helpful down the line.