Joe's Jottings

  • Category Wordmap
  • About Me
  • Writing….

Tag: usermeta

  • A WordPress bug and a quick fix!

    wordpressHere’s a quick hint for anyone who’s had the ‘can’t access empty property’ or ‘unknown property’ error in a WordPress Plugin (or the core WordPress installation) , here’s a quick fix to try before starting to tear your hair out.  The error manifests itself with messages such as ‘Cannot access empty property in … ‘ or some similar wording.  

    As you might gather from the fact that I’m posting this, I experienced it this afternoon whilst doing some maintenance work on anpther Blog… I experienced it in an add-on, so it wasn’t the end of the world, but it has been reported at log on, normal Blog viewing and on installation.

    Anyway…the fix.  basically, the problem is to do with a flakey entry in either the X_usermeta or the X_postmeta tables (where X is the database prefix of your WordPress installation, usually ‘wp’).  To fix the problem, you need to be able to access the database tables with a tool like phpmyadmin.  If you’ve no idea what I’m talking about, then this fix is not for you and you would be best to seek the assistance of a more experienced colleague.

    These two tables store data for various WordPress functions, in the form of ‘name / value pairs’ – each record has a field for what is effectively a variable name and a value.   The ‘name’ field is meta_key in both the tables.  the error is generated when a record has a blank in this field.  To fix the problem, search through the records and locate records with the meta_key field is blank.  Delete these records and that should cure the problem.

    In teh words of Aleksander Meerkat – Simples!

    Here’s a quick hint for anyone who’s had the ‘can’t access empty property’ or ‘unknown property’ error in a WordPress Plugin (or the core WordPress installation) , here’s a quick fix to try before starting to tear your hair out.  The error manifests itself with messages such as ‘Cannot access empty property in … ‘

    Read more

    October 26, 2009

More posts

Personal StuffTechnologyThe MediaPoliticsPersonal Development

Twenty Twenty-Five Legal Pad

Designed with WordPress