twitter facebook Instagram googleplus googleplus linkedin Xbox Live foursquare Email RSS

A WordPress Site Reports “This Request Is Not Valid Error” in Microsoft Word? Try This….

Recently I’ve been working on a site that required me to put the entire developmental site behind a maintenance mode site. Our maintenance mode plugin of choice is WP Maintenance Mode, as it allows me to control both the front end, styling it beautifully, whilst still continuing the development of the site.

However, when reporting on the development, we were hitting an issue with the site, in that links to the site were causing errors when being clicked on in Microsoft Word. This was the error we received:-

503-error

After investigation, the error is due to the Maintenance Mode plugin returning a “503: Service Unavailable” error. Whilst the site appears up to users, the header returns tell software that the site isn’t up, causing errors.

Thankfully, there’s an easy fix. Within your theme’s function file (or better yet in your own plugin), put in the following code:-

This returns a “200: OK” header, which means links can be clicked on in Word.

Hope that helps anybody! If you have any questions, or any way to improve the code, please let me know in the comments.

He’s Hardcore (Contributor)

So yes, I know I’ve been terrible at posting here. Been incredibly busy (good busy!) over the last month or so. I’ve a few ideas for a post, but I thought I’d give a quick post on something that I’m excited to announce.

Last night, WordPress 3.9 dropped. A fairly large update to WordPress with a bunch of new features. You can read about these features in a post I wrote for the FireCask blog. But the cool thing for me? I’m in the credits.

wordpress three point nine

This is the first time I contributed to WordPress, so I’m delighted to have made it in the credits, even if it lead to a massive refresh of my WordPress Profile Page (I should link to it in the header). So yes, massively chuffed. Hope it continues!

So yes,  my code is helping run 20% of the internet. Scary, but chuffed.

A massive thank you to WP Contributor Day for getting me started on Contributing to WordPress (you can read about my day contributing here). If you want to contribute to WordPress, connect with the community, and have a lot of pizza and beer doing so, I suggest attending one.

 

WP Flipclock Released!

So today I’m delighted to announce the release of WP Flipclock!

This plugin is quite simple, as it adds a flipping clock to your site. So for example. Upto now you have been reading this post for this long:-

There are options where you can set it to be a count up/down clock, and from a specific date. You can also specify if you count down from days, minutes or hours.

It’s very simple, and needed it for a theme I was making, so thought I’d release the plugin out to the open as well!

Read the launch notes for how to implement it into your site, and if you like the plugin, give us a good review on WordPress.org. If you don’t and can think of another feature, check out the project on Github.

This plugin uses the Flipclock.js library from ObjectiveHTML.

Three Point Zero

So today, I turn 30 years old.

I have a hard time dealing with “not being 20 something” (yes, I know I need to change the footer), so much so that I consume a not exactly miniscule amount of youth water in an attempt to stave off the inevitable passage of time.

In short I probably shouldn’t complain about my entry into my fourth decade of existence. I achieved a lot. From the usual lot of growing up, getting a career and a savings plan that isn’t dreadful to the more interesting of going to Oktoberfest, travelling the world, to becoming a professional wrestler, and also writing a fricking book, I suppose I can look back on my 20s as being generally lovely.

So here’s to my thirties. May you be as kind and generous to me as the 20s were.

Also if anybody fancies getting Hulk Hogan or a celebrity that I actually know to retweet this blog, that’d be super. Thanks!

The First WP Contributor Day in Manchester

So the weekend just gone I attended the first ever WP Contributor Day in Manchester. It seemed like the perfect opportunity to get started and more involved in the community that exists behind WordPress, and when the opportunity arose for a day of coding and contributing, in my adopted home town of Manchester, I jumped at the chance.

I’ve been keen for about the last 6-8 months for contributing to WordPress. But – like most – I just didn’t know where to begin. I’ve a local set up and am okay with version control systems, but that’s about it. I also know I can code okay, but wasn’t sure what sort of level of knowledge was needed, and whether I’d be completely out of my depth.

After a brief talk explaining all the ways in which people could contribute to WordPress from Jenny Wong, a talk by Graham Armfield on the accessibility team and an introduction on how to set up a local Vagrant based system from Mike Little, we then grouped off. Sadly my overconfidence in my set up did show as I was still a little lost, so after struggling for a little while with running commands from on my set up I bit the bullet and decided to join the team who were still installing Vagrant. I caught up and I was finally ready to go.

Well, after lunch.

So after lunch, I thought I should walk before running, and sat down, browsing the Core Trac for WordPress and finding a few patches to test. One of the first ones that took my eye was this one. It seemed like an easy one to test and correct if need be. After 20 minutes of replicating the problem locally, and then testing the patch fixed the issue, I commented and made my first contribution to WordPress, which was promptly Instagrammed. Boom! Job done, and I had a warm feeling inside me that I helped somebody out.

wp-contributor-day-2

I cooled down the warm feeling with a “first contribution beer”, and then browsed for something else. Ticket 27039 was great, but it was a theme. I kinda felt like I cheated a bit so thought I’d look at a bug in the core I could test. Ticket 23988 provided this – an enhancement in the page that lets people know the comments that an edited comment applies to. A quick test and I could confirm the patch working as such, so another comment and another beer (can you see a trend here?).

That’s all about testing patches, but what about writing one? Ticket 25295 provided that first go – a suggestion that wasn’t patched where additional classes could be added to captions of images. Following a quick read of the guidelines on coding standards I knocked up some code that expanded the shortcode to include a “class” element, and submitted it for hopeful approval. From reading the discussion there’s a good chance the ticket will not make it into the main release, but if it does and if anybody wants to work on it, then hopefully I’ve given them a start.

After one more confirmation of a patch working (26758), we headed for a wrap up, before going to the pub to socialise and discuss the day.

Days like the WP Contributor Day in Manchester was exactly what I needed to get my leg up and started in contributing to WordPress. It was great, and everybody was so helpful. So a big thank you to Jenny & Mike for organising it, and I’m probably heading to the second one all being well. And so should you.