Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

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/views.page_title.inc).
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.

Saturday, November 20, 2010

From Palm to Droid - the final move

Finally moved my addresses from my Palm to my Droid today. Some fits and starts, but ultimately got there. Basically I exported the addresses from Palm Desktop to a CSV (http://kb.palm.com/wps/portal/kb/common/article/36288_en.html), then imported the CSV into GMail Contacts (http://mail.google.com/support/bin/answer.py?answer=14024).

The export was easy at first glance. Enter the Address section of Palm Desktop (old version used with Centro, so non-WebOS). Select all contacts in the address list then select Export... from the File menu. You may be prompted to show hidden data which likely, you'll want to do if you're migrating fully from one platform to the other.

With the export was complete, I opened up the CSV in OpenOffice Calc. Of course MS Excel, Google Docs or even Lotus 1-2-3 will do. I found that the data came over without column headers. It may be that there was a selection to include the headers in the export that I missed. In any case, I spent about 15 minutes labeling the columns and doing some necessary cleanup of the data export (moving misaligned/misassigned data into appropriate column, deleting empty columns, etc.).


Saving the cleaned up spreadsheet as separate file, I went back into GMail and followed the contacts import instructions (More Actions - Import Addresses, choose local file, click OK, click Import). Worked like a breeze. I even got a message that duplicate addresses were merged automatically. Woohoo!

Reviewing the uploads, it looks like any fields that weren't recognized or couldn't be mapped directly to an existing contact field were added to the notes field and labeled with the header from the CSV. This happened with most of my addresses. In the CSV street address, city, state, zip, etc were each in their own fields. Likewise, Palm Desktop allowed for multiple addresses (work, home). In the CSV cleanup I'd created separate Home labeled fields and Work labeled fields. In the end it looks like the Home City and Home State, where present, were loaded successfully to the contact's address field. The street address and work address info where present, was dumped to the Notes. Likewise for birthdays (which I'd labeled "Date of Birth) and custom fields.

Wednesday, September 05, 2007

A Special Reminder to ALL Bloggers...

Through our scientific genius, we have made of the world a neighborhood; now through our moral and spiritual genius we must make of it a brotherhood.
- Dr. Martin Luther King

Friday, July 13, 2007

Free Your Mind, and Your iPhone Will Follow: an open letter

I wrote the following in response to an email I just received from freetheiphone.org c/o freepress.net. I applaud their efforts to pressure Apple and the FCC to play fair with the release of the iPhone on a proprietary network. Supposedly we own the telecommunications bandwidth and the companies are just renting, but for the past 6 years at least, it's felt like it's the other way around. As I said, I applaud their work thus far and I urge you to take the time to read up on the issues. But as you'll see below, I implore freepress/freetheiphone both that it's time we made our own game and instead let them play catchup.

Apple will continue to work with proprietary software and make sweetheart deals with whomever they choose as it suits their interests and those of their shareholders. As Microsoft didn't feel the pinch until Linux came along and exposed the naked emperor, Apple will sit on its pedestal meting out its favor to those who prostrate themselves until something puts the magnifier to its nethers and reveals that indeed there is no there there.

I give you, OpenMoko: http://www.openmoko.com/

Take REAL action. Create a fund to hire developers full time to make this a project real working reality - one that works with all GSM/GPRS networks globally, that is not enslaved to iTunes, MusicMatch, or the other media mongers, and that transcends whatever bandwidth the FCC (Federal Communications Cyndicate [sic]) seeks to control.

You must leave the matrix to fight The Matrix. With mindfully dedicated backing Neo1973 (http://www.openmoko.com/products-neo-base-00-stdkit.html) can be that red pill.

I endorse your efforts to reign in the FCC and return them to service of the people, for the people, and by the people. Michael Powell is gone but his ghost yet remains. Exorcise him and the rest of the flunkies from all our airwaves and bandwidth!

As far as Apple and others like them are concerned, corporations are no longer beholden to the people who issue their charters and allow them their 14th amendment "right" to operate as citizens (http://www.thecorporation.org/), Thus, like any torch wielding mob does to unrepentant sociopaths, you've got to hit 'em where it hurts. Hit 'em hard. Then bite it off. I know a mad little window smashing penguin that'd be awful proud.

Yours,
The AFroNaut

Wednesday, July 19, 2006

Let Your Google Calendar Evolve

I successfully added my Evolution (desktop-based) calendar events to my Google calendar with a few very easy steps (see below). To see how to view your Google Calendar from Evolution, check out Johnny Jacob's fantastic tutorial Johnny [Life & Code]: Google Calendar in Evolution. Got me fixin ta git me summa them screenshots an' purty up my page. Geez, Johnny. Make the rest of us look bad, why don't ya!

;-)

  1. Export Selected Evolution Calendar to Disk
    1. In Evolution, under the Calendars button in the left hand navigation frame, highlight and right-mouse click the the name of the calendar you wish to export to google.
    2. From the pop-up menu, select "Save to Disk".
    3. Within the Save dialog window, select the "iCalendar format (.ics)" from the list of file types at the bottom of the window.
    4. Enter a name for your calendar export file. **Be sure to append the file extension (.ics). Evolution will not add it automatically.
    5. Select filesystem location easy for you to remember and click Save As.
  2. Create and/or Select the Google Calendar to Receive Import
    1. In your Google Calendar account, if the calendar you wish to receive the import already exists, skip to the next numbered step. If you do not have a calendar to which you will import the new calendar file (see step 5), follow the appropriate links or help instructions on the Google Calendar site to create your receiving calendar.
    2. Click the "Manage Calendars" link at the bottom of the Calendars nav box in the left-hand navigation column.
    3. Click "Import Calendar" tab (link)under Calendar Settings.
    4. Click "Browse" button next to "Step 1: Select File" field and navigate to the calendar file you created in step 5.
    5. Use the select box in "Step 2: Choose Calendar" to select the Google calendar to which you will import the new file.
    6. Click "Import" button next to "Step 3: Complete Import". If successful, the page will refresh with a message saying "X events were imported into ______ Calendar". (not a direct transcription of actual message, but the gist of it nonetheless.)
  3. Check Your Work
    1. If successful, go to the Calendars box in the left nav and make sure that check box next to the calendar name is checked.
    2. Click the calendar's name and navigate through the calendar to make sure the new "events" have been added. **I've noticed it can take a minute or two for new entries to update. Refreshing the page or switching your calendar view seems to refresh the page and reveal the newly added data.
  4. Comments and Caveats
    • I noticed that the times in my entries shifted back 3 hours. I'm on EDT and the site is hosted in the Pacific timezone. Google's import code is probably adjusting the time displayed to the server's timezones. It's the same data, just assuing that you want to see it in California People Time - CPT ;-)
    • I haven't completely troubleshooted the transfers I've made so far, the items I have checked seem to have come over almost perfectly. There's some occasional wierdness in the formatting or character selection in the Comments section (e.g. a pair of TAB characters from Evolution were converted to lowercase letter "t" on import). Not sure if it's the Evolution export or the Google import that catches the blame for that one.
    • Several events on my exported calendar were recurring (repeating over a given date range daily or weekly). I'm happy to note that they carried over into Google as recurring events. In which case you are able to update or delete one and Google will ask if you wish to do the same for the repeats.
    • Finally, so far so good as far as all fields and event properties (e.g. location, show time as, privacy level...) appear to have carried over from Evolution to Google (individual and repeat events alike).
  5. Additional Testing and Follow-Up
    • Haven't tested this yet, but would really like to know what happens when you update your Evolution calendar, create a new export file, and import the newer file to Google. Does Google prevent double entries for the same event? Will it prompt you to overwrite (or not) the existing event with the event info from the latest copy?
    • I have successfully made changes (e.g. correcting the event times) in the imported events. However, I have not tested uploading an updated event from Evolution to Google. Will Google do a "diff" between the data file and the data on their site? If so, will it choose the authoritative version automatically (which one)? Will it prompt you to choose? Will they give you an option to merge the data from both where possible?
    • Finally, (as if you couldn't tell before) this is a workaround. Despite looking clunky and laborious in all its steps, I was surprised at how relatively quick, easy, and painfree the effort was. (For example: I still haven't managed to sync my WinCE smartphone to Evolution. <Wince!> indeed!).
      That said, the standard protocols and an API for Google Calendar already exist, putting the pieces in place for an update for Evolution popping up in our respective package managers in days, if not weeks. Should I be predicting wrong, then I challenge all the sharp hackers out there to turn away from Unreal Tournament and WoW for 10 minutes and bring your prodidgious grey-matter to bear on what would seem such an academic exercise in coding. Imagine, fifteen minutes of lightwork, and the love, admiration, cell numbers, IMs, MySpace pages... of the world will be yours. Think about it!


As always, Peace & Blessings.
(Now more than ever!)