Posts by: Andy Moyle

Finding bad code in a WordPress Install

  |   By  |  0 Comments

A premium WordPress plugin client was having some trouble with their site. Some of my Javascript had stopped working because of a javascript error from another plugin/theme. Unfortunately their javascript wasn’t enqueued and I was struggling to find how it had got there. I only had site access and no FTP or shell to search. […]

Continue reading...

Spam free contact form

  |   By  |  0 Comments

I have recently updated my Never Loose Contact form plugin for WordPress websites. I originally wrote it because I wanted a simple Spam proof contact form that saved the messages to a database, in case the emails went AWOL. In it’s first few iterations it blocked contact form messages with more than 2 hyperlinks in […]

Continue reading...

Enabling the block editor for custom post types correctly

  |   By  |  0 Comments

While updating a WordPress plugin recently I wanted to enable the block editor for a custom post type. Strangely, it is not automatic.After a quick Google, I discovered I needed to add ‘show_in_rest’=>true and ‘supports’=>array(‘editor’) to the arguments for the register_post_type function. All well and good, but no title field appears at the top of […]

Continue reading...

Watch out for SQL injection hackers

  |   By  |  0 Comments

Watch out for SQL injection attacks

I got an error on a booking system for a conference I was trying to book into this week. I happen to live in a town that has an apostrophe in the name and it crashed the booking system and worse gave the query in the error on screen. OopsThe error message made it clear […]

Continue reading...

MySQL dates can’t be 0000-00-00

  |   By  |  0 Comments

After a recent upgrade, some of my MySQL queries stopped working – where it was a DATE column with a default already set to 0000-00-00. That’s not allowed for MySQL v5.7.11 and above. Not simple to change because the error keeps occuring. Here’s how I got round it UPDATE table SET column= “1000-01-01” WHERE column<“1000-01-01”; […]

Continue reading...

White Sceen of death on Cordova iOS but not browser

  |   By  |  0 Comments

Found the error!

Today I was getting a white screen when trying to simulate my latest Cordova App on iOS using XCode 11. The debug messages weren’t helpful. NSURLConnection finished with error – code -1100 2019-11-03 18:41:25.312124+0000 Plumbers Mate[9951:3513187] Finished load of: file:///Users/Andy/Library/Developer/CoreSimulator/Devices/6B89E196-7C29-4879-A5C3-1749D1063D16/data/Containers/Bundle/Application/76725DD0-4577-4BC9-8192-0E6A92394C9D/Plumbers%20Mate.app/www/index.html I spent ages Googling “NSURLConnection finished with error – code -1100” to discover it was […]

Continue reading...