Fix a 'Missing: Updated' Error in Google Search on WordPress

Google Search Console reported a bunch of structured data errors in a new WordPress blog I began recently. This was a surprise, because I didn't know I was offering structured data. The WordPress theme I've been using, Twenty Twelve, includes CSS styles in blog posts to support the hAtom microformat, which helps search engines recognize the components of a blog post such as the title, author and tags.

When Google crawled the blog, the Structured Data section of Search Console flagged 20 pages with the error "missing: updated," which indicated the data should have an element called updated that isn't there.

Screen shot of Structured Data report in Google Search Console

I did some digging and found that WordPress bloggers are solving this problem in some complicated ways, like adding a plugin just to filter the structured data out. But I found an easier solution.

The updated style indicates when a blog post was last updated. In every page that displays a blog entry, updated should be in the HTML where the post time is displayed. Here's an example prior to the fix:

<time class="entry-date" datetime="2016-04-02T19:39:49+00:00">April 2, 2016</time></a>

Any blog post can include hAtom structured data by adding class names to the tags that surround an element. The updated class should be added to the time tag, turning the HTML into this:

<time class="entry-date updated" datetime="2016-04-02T19:39:49+00:00">April 2, 2016</time></a>

In the folder for my blog's theme, I found the file I needed to edit to add this fix: functions.php. This file is a collection of PHP functions to enhance the theme and modify WordPress functionality.

In a function called twentytwelve_entry_meta(), I found the line where the blog post's time is displayed. I edited the line to add the reference to updated. Here's the line after the change:

$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date updated" datetime="%3$s">%4$s</time></a>', esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);

I'm still learning about WordPress and not ready to make major changes to a theme's PHP code, but this fix is a minor adjustment to the HTML output, so I thought it would be safe to attempt. The fix was successful: When I test my blog's pages in Google's Structured Data Testing Tool they pass.

The fix I've described works in the Twenty Twelve theme -- and probably some of the other basic themes for WordPress. Because each theme has different HTML, you may find the code that displays the time someplace else.

Fix a 'No HTTP Transports' Error in WordPress

WordPressI recently installed WordPress on this server for a new blog. I've been using homebrew software for years, but I want to see whether I like WordPress enough to switch this blog and others to the platform. I need all of my sites to be usable on mobile devices, a goal that is a long way from being true today. The new blog is far better out of the box on mobile than anything I've created on my own.

In the two weeks I've been running WordPress 4.4.2, I encountered several problems where it could not connect to resources on other Internet sites. I could not install themes or plugins in the web interface because of this error message:

There are no HTTP transports available which can complete the requested request.

I also could not use the Customize page or make the WP to Twitter plugin send messages to Twitter. I could avoid the problem with themes and plugins by installing them on my own, but the Twitter problem had no workaround.

I have PHP configured with Curl, so I didn't expect a problem making HTTP requests to other sites. But WordPress now requires SSL support in Curl. My version of the software lacked SSL. I compile my web server software from source on Linux instead of relying on package managers, so I needed to recompile Curl with SSL support. I thought that would be easy.

After much weeping and gnashing of teeth, here's what I had to do:

  1. Compile and install OpenSSL.
  2. In directories from which I installed past versions of Curl, run the command make uninstall in each one to remove it from the server.
  3. Recompile Curl with the configuration option --with-ssl, which found OpenSSL.
  4. Recompile PHP with the configuration option --with-curl, which found the new SSL-enabled Curl.
  5. Reboot Apache.

The last thing I figured out was Step 2. Before that, when I compiled PHP it found a version of Curl on my server that did not support SSL and used it by mistake. This made WordPress angry.

WordPress is now mostly happy and can post to Twitter successfully. Customize works, as do themes and plugin downloads.

There are easier solutions if you use a package manager and the right versions of these programs are available. But I've been compiling source code by necessity across my LAMP stack for years. There were features I needed that weren't offered in packages.

I anticipate more posts like this one as I kick the tires on WordPress.

Jake Tapper Asks Trump 7 Straight Horse Race Questions

I began watching the Sunday talk shows again last weekend because of Antonin Scalia's death, which propelled the U.S. into an exceptional time in our history. We'll be living with the consequences of how the next Supreme Court appointment is made for a long time.

Watching one of the shows today reminded me of how terrible political reporting on television can be.

On CNN's State of the Union, host Jake Tapper asked Donald Trump 10 questions:

  1. Mr. Trump, congratulations on your victory. What do you think this means for the race going forward? Are you unstoppable?
  2. Your campaign manager, Corey Lewandowski, said that you have not gotten the credit you deserve from the party for leading the race. Why do you think that is? Do you think some Republicans still don't take you seriously?
  3. Last week, Senator Rubio said he didn't think a brokered convention would necessarily be a bad thing. Are you concerned at all that party leaders might try to block your nomination at the convention?
  4. Senator Cruz says that you attack him every day because you know he's the only one who can beat you. Is that right?
  5. Governor Jeb Bush dropped out last night. He was once the front-runner, once expected to win the nomination. Many would point to you as the primary reason his campaign sputtered. Do you think, by labeling him low-energy and targeting him so quickly, do you think that's what did him in?
  6. You also took on Jeb's brother President George W. Bush in South Carolina, a state that he won in 2000. And then you won it handily, even though you took on George W. Bush. Do you see Jeb's loss and your victory in South Carolina as a vote on the entire Bush legacy, in a way?
  7. There's a lot of concern, as you know, among Republican Party leaders in Washington about, can you win a general election? Let's talk about demographics for a second. If the next Republican nominee wins the same share of the white vote that Mitt Romney did in 2012 -- that was 59 percent -- that nominee would need to win 30 percent of the non-white vote. Now, with all due respect, sir, a lot of Republican leaders in D.C. struggle to envision you accomplishing this, especially given the fact that there are white supremacist groups and individuals like that who support you, some of whom you have even retweeted.
  8. I want to get some clarification on comments you made this week at the CNN town hall about Obamacare. Take a listen. ... So, sir, what did you mean when you said, "I like the mandate"?
  9. But -- but, just to clarify, you're saying now that you would not support requiring every individual in America to have health insurance? You wouldn't support that?
  10. Last question, sir. We heard from your wife, Melania, last night, which doesn't happen a tremendous amount. Are we going to hear more from her going forward?

By my count that's seven straight horse-race questions that are solely about who's leading and who's trailing, one policy question with a follow-up and then a nice softball question that lets him say something nice about his wife.

Trump is the Republican front-runner and the favorite to win the GOP nomination. There's a great deal of importance in the media getting beyond his vague policy statements to pin him down on actual things he would do as president. Making America Yuge Again is not a concrete policy objective.

Tapper had an opportunity to do this, but he thought the bulk of his time with Trump was better spent with such queries as "Are you unstoppable?"

That's the kind of dumb-ass question a non-journalist would never ask. Political reporters ask them all day long.

The one time Tapper delved into Trump's actual policies on health care and the individual mandate, we got to see that Trump is completely out of his depth. After he took insurance away from millions of Americans by killing ObamaCare, the only things Trump could suggest are to let states compete and offer healthcare savings accounts.

The answer Trump gave was as floundering and repetitive as the Marco Rubio debate answer when he was accused of being robotic. Trump twice repeated that we're going to have great health care if he's president, and three times said people won't be dying in the streets.

Or the sidewalks: "They're not dying on the sidewalks, and they're not dying on the streets if I'm president," he said. "They're just not."

Unless he shoots them, I guess.

The Sunday show reporters should ask candidates as many questions about policy as they do about winning and losing. If they did, it would be clear to millions that Trump's a bag of hair whose ideas never go beyond braggadocious posturing.

My Web Server is Older Than Your Web Server

This post is dedicated to the dedicated server I just shut down. A single Linux box at a server farm in Dallas was for many years the center of my one-man media empire. Over time I moved sites and services off of it, but it remained the home of my weblog Workbench, my 25 computer programming books, a client's business site and an email server for six users. Every month as the billing day approached, I told myself I was going to move everything to another server I own and save myself $69 a month. But I managed to successfully avoid the task until now.

On Wednesday I got up at 6 a.m., two hours earlier than usual. Waking up abnormally early always makes me feel like I'm getting a jump on the rest of the world. Before that mood passes, I dive into something ambitious. That morning felt like the perfect time for a server move.

Eighty six hours later, I am punchy from exhaustion, completely devoid of ambition and remember why I never did this before. But the move is complete!

The following command on Linux revealed the date and time a file system was installed on the server's main hard drive:

/sbin/tune2fs -l /dev/hda2 | grep created

The server was born on Friday May 14, 2004, at 7:10:10 a.m.

I submitted the request to shut it down today at 8:52 p.m.

Ray Dureault in 2004 glasses, photo by John Tlumacki of the Boston Globe

During those 4,237 days, the server went from being cutting edge to a museum piece. It has a Celeron P4 processor and just 72 gigabytes of disk space. (Today you can buy a thumb drive with 128 gigabytes for $30.) The operating system it runs is Red Hat Enterprise Linux 3 (Taroon) from 2003. At least five years ago Red Hat stopped taking my update requests, so I had to do my own software upgrades.

I did a lot more than web hosting on the little server that could. As I wrote books about Internet technology, I installed the software and developed sites and web applications on the box. Digging through the server this week looking for things I might want to save, it felt like archaeology. I unearthed layers from the days I was using Movable Type, WordPress, Radio UserLand, Java Server Pages, Blogger and server-side includes. There were programs and scripts I had written in PHP, Java, Python, Perl and Bash.

I won't be letting any more of my servers become senior citizens (one year is equal to 10 in PC years).

Instead, this is the new plan:

1. Only store content on a server that's currently being shown to the public. If I take something down, I will move all of that data offline along with scripts and software that are no longer needed.

2. Jump to a new server every 1-2 years.

This is an overcorrection. I'm replacing too little ambition with too much. But I no longer have to do the two things that were the most difficult: serving email and domain name queries. During this move, I found ways to offload both of those tasks. So all I have to focus on are the web server, database program and any server-side technology that's required.

A server move always improves my sites. I find mistakes and things that were written poorly, like a database login script with a hard-coded IP address in it.

I also like the added security of running on a new Linux box, where security updates are still available and there's less chance a hacker snuck in and installed something nefarious.

In 2026, if I write a blog post about retiring the septuagenarian server that's hosting this blog, consider that a sign my plan failed.

SportsFilter's NFL Pick 'Em Contest

Orlando Sentinel Disappears Column on George Zimmerman

Screen shot of Orlando Sentinel column on George Zimmerman by George Diaz

The Orlando Sentinel has dropped into the memory hole a commentary published Friday evening that called for the community to stand its ground against George Zimmerman. The piece, written by sports columnist George Diaz and titled "Time for Zimmerman to pull a Casey Anthony and vanish," was published at 5:43 p.m. and archived by Google two minutes later. As of 10 a.m. Saturday morning the commentary was gone with no explanation.

Zimmerman, who killed unarmed teen Trayvon Martin in Sanford, Florida, on Feb. 26, 2012, during a physical altercation and was acquitted of second-degree murder a year later, was shot at this week in a road rage incident in Lake Mary but escaped serious injury. The alleged shooter, Matthew Apperson, has been charged with aggravated assault with a deadly weapon.

The Diaz column included a sentence and headline that could be interpreted as advocacy of violence against Zimmerman. After quoting a jury instruction suggesting that Zimmerman could "stand his ground and meet force with force," Diaz wrote, "Perhaps the entire Central Florida community should file a motion to Stand Its Ground against Zimmerman."

The column had the subhead, "Central Florida should stand its ground against George Zimmerman."

Here's the full text of the spiked article:

George Zimmerman is the gift that keeps on giving, but not in a good way. He is a fruitcake way past its expiration date, which should have been right after a jury found him not guilty in the death of Trayvon Martin in the summer of 2013.

Zimmerman should have cashed in his chips that day after winning the lottery in the controversial spectacle of his trial.

By legal standards, the jury got it right based on the evidence that was presented. By the court of public law's accounting, Zimmerman burned up his "Get Out of Jail Free Card."

Most reasonable people have tried to move past the anger, despair and confrontational name-calling. Unfortunately, Zimmerman is not one of them.

The latest incident involving his road-rage dance partner, Matthew Apperson, only amplifies the controversial noise of the George Zimmerman soundtrack.

We've all dabbled in pop psychology when it comes to Zimmerman. Anger issues. Confrontational issues. Misunderstood Community Watchdog issues.

Whatever. All I know is that I am sick of him. Like that pesky cockroach, Zimmerman is always a step ahead of the big sandal bearing down on him. Annoying little fella, isn't he?

There are those who will whoop it up, celebrating that karma is catching up with a man whose reputation is forever stained with the blood of a dead teenager.

I'd humbly suggest the bad karma is on everyone who lives in Central Florida. Zimmerman won't leave, dooming us to eternal damnation. Our streets aren't safe with Zimmerman behind the wheel. Anybody could get nicked by a stray bullet intended for him. Any woman who is clueless enough to date him seems destined to end up in a contentious, volatile breakup.

Maybe Zimmerman is the unluckiest man in the world. Misunderstood. A Real American Hero.

In three domestic-violence cases over the years, the women involved either refused to cooperate with police or refused to press charges. Most recently, Zimmerman and Apperson added another chapter to their wild history that includes three incidents. Flying glass scrapped Zimmerman's face after Apperson fired a shot. Apperson claims that he had been threatened by Zimmerman. No charges have been filed against either man.

But a basic fact is that the common denominator involving these forms of mayhem is Zimmerman. Innocent or not, he is a magnet for trouble.

So let me offer up a "Get Out of Central Florida Free Card."

Here's a thought: Pull a Casey Anthony. She also wiggled free after standing trial in 2011 for the death of her 2-year-old daughter, Caylee. But at least Anthony had the good sense to jettison herself into a self-imposed Witness Protection Program.

We haven't heard much from her, have we? The "Tot Mom" was reportedly last seen a few days ago, wearing aviator shades and a baseball cap while jogging in West Palm Beach. That's the ticket.

Incognito. Lay low. Out of sight, out of mind.

But no, Zimmerman keeps getting into legal dust-ups -- ex-wife, girlfriends, random strangers. Could we be next?

During Zimmerman's second-degree murder trial, his attorneys told jurors that he feared for his life when Martin, a black 17-year-old, attacked him. The judge in the case included the possibility that Zimmerman "had the right to stand his ground and meet force with force," as part of the jury instructions.

Perhaps the entire Central Florida community should file a motion to Stand Its Ground against Zimmerman.

Does Zimmerman need a notarized statement? An online petition? Do we need to start a Gofundme campaign to help pay for Zimmerman's bus fare?

Zimmerman certainly has our attention. The online data from orlandosentinel.com and other websites reflect his click-bait skills. People dig the stories. But it's mostly freak-show appeal.

Zimmerman is Internet eye-candy with a bitter aftertaste. Can't get enough online? Check in with Nancy Grace tonight for more details.

Dear George: Be Like Casey.

Leave. Now. Forever.

Brad Torgersen's 'Science Fiction Civil War'

Brad Torgersen

Since 2008 I have voted in the Hugo Awards, the science fiction/fantasy honors that have the most prestige. The ballot for this year's awards has been hijacked by three right-wing authors -- Larry Correia, Brad Torgersen and Vox Day -- who ran bloc-voting campaigns that put their nominations all over the ballot to the exclusion of everyone else's. For months, they campaigned for people to vote for their slate of nominees by saying this act would stick it to a secret cabal of "social justice warriors" who had been keeping conservatives like them from winning.

There is no cabal.

Anyone can vote for the Hugos by buying a $40 supporting membership in the next Worldcon. That's what I did seven years ago, and since then I've been nominating works I liked without outside interference from anybody else, just like thousands of other fans.

To give you an idea of how cynical and politically motivated the bloc-voting campaign was, Correia reached out to GamerGate for support in his attack on the Hugos. ("I think GamerGate has been awesome," he declared yesterday on Twitter.)

Rather than cover the entire mess a week later than everybody else, I'll direct you to the blog of Game of Thrones author George R. R. Martin, who has written an excellent series of posts as an author who has participated in the Hugos since the 1960s and loves the institution of Worldcon.

There's a lot about this situation that gets me all het up, but I'm beginning to savor the insane grandiosity of Torgersen (pictured above), a previously obscure SF/F author who led the bloc-voting campaign this year and dubbed it "Sad Puppies 3."

On April 8, Torgersen wrote a blog post on his personal site called "The Science Fiction Civil War" that he later deleted.

Here's the text of that post, which offers a fantastic glimpse into the preening self-regard that inspired him to lead a culture war against a much-loved SF/F award that fans of all political beliefs have nurtured since 1953:

A personal note, from a guy who has been trying hard of late to recapture some of the sense-of-wonder he felt for science fiction, when he was a boy.

The cannon have been fired. There's no doubting it now. Decades of simmering tension are being unleashed in an emotional struggle for the future of the field. The Hugo award is just a thing; a mere football. These divisions go far beyond a silver rocketship. They are drawn along political lines -- liberal, and conservative; progressive, and libertarian -- as well as along artistic lines -- taste, expression, and the desire for meaning. If one side has announced angry shock that Sumter got shelled, it's because that side had the luxury of ignoring the other side. At least until now. The grays have thrown off their teeth-grit veneer of second-class citizenship, and the blues are rallying to the status quo. Voices long quiet, have erupted with the yell of rebellion. And there is every sign in the world that the blues will stop at nothing to put down the grays.

I remember when I used to think science fiction was this happy, fraternal place. If there were disagreements, they were small things, and no adult would let them stand in the way of a rousing all-for-one-and-one-for-all cheer. A round on the house for everybody, ladies and gentlemen! Hip-hip-hooray!

I believe there may have been a time when the reality at least approached this naive impression -- an idea planted in my imagination, and fueled by the dreams of ambitious youth.

Now I am no longer green. This year finds me a veteran. I have seen the quiet hate in the eyes of so many colleagues. For each other. For the other guys. For the people beyond the next rise of mountains. It is a hate bred by a thousand slights and prejudices, snobberies and injustices and cuts which have bled quietly into the night. You see it every time one professional's celebration is conducted so as to kick sand in the face of another professional. The fans -- volunteers from the common parts of every locale -- line up along the fence rows and rock walls, nervously checking their cartridge boxes, and wondering when they can get a chance to lick the enemy.

Many people never thought it would come to this.

Now that we're in it, I have to ask: how could it not have come to this?

You can only paper over cracks in the foundation so many times, before the foundation falls apart.

The silhouette of Larry Correia stands on a lonely knoll, his beard jutting proudly like Robert E. Lee's -- or is it Ulysses S. Grant's?

The judgments of history -- far removed from the sound of the guns and the bloody casualties laying like cord wood across the fields and in the gullies and meadows -- will have to judge which "side" in this fight is the blue, and which is the gray.

I knew the moment I took up the flag for Sad Puppies 3, that I was sacrificing forever any chance of ever being a Hugo award winner. There would be no forgiveness. Not from the traditionalists who jealously guard their trophy and consider all complaints against it to be heresy. But I was resolved. As an object of merit, the thing had fallen into question for me -- along with so much of the rosy history I thought I understood, before I was published.

Now there is only the war. A war which nobody wants, and yet nobody can avoid. All the rancor and chaffing and preening distaste for "those who are not like us" ... flooding forth in a wave of bitter rage that is enabled from behind the immunity and protection of ten thousand keyboards.

I have the sense that this thing is going to change us all in some way, forever -- those of us who make some part of our lives in this country called science fiction. Now splintered and divided.

What's left for a man now is to do what his heart, and God, tell him is right.

And it will be up to the future to decide if I am a hero, or a villain. Perhaps I am both?

I will either be Phil Sheridan, or A.P. Hill. George Henry Thomas, or Stonewall Jackson.

If I hope for anything -- when all of this is over -- it's that the Hugo means something again, and that the blind spots, biases, prejudices, and petty shadowing are reduced, if not erased. So that other people who come to it in the future, won't find it the way we found it -- before the fighting turned hot.

Most folks will stay home. Many already bitterly resent the conflict. Damn all flags.

When the survivors are old and all the generals long dead, they may ask, "Was it worth it?"

Lord, I sure hope so.

Torgersen and Correia, who have cultivated an enormous sense of personal aggrievement about alleged anti-conservative bias in the Hugo Awards, were both nominated by Worldcon voters to the John W. Campbell Award for Best New Writer in the last four years. That's the highest compliment that we pay to new writers and often a springboard to a successful career in SF/F.

But neither of them won. Correia lost to Lev Grossman in 2011 and Torgersen to E. Lily Yu in 2012.

So to them, I guess "THIS MEANS WAR!"