Blog

Blog/

Fix missing wp_termmeta table

By | October 3rd, 2016|Code, MySQL|

So recently discovered my install of WP was running slower and seemingly slower as of late, pretty much maybe since version 4.3.x somewhere, possibly 4.4.x either way. It wasn’t until recently I was digging through my logs for other reasons, and I noticed a massive amount of entries similar to the below error (although much wordier I just truncated it for the sake of demonstration.

mod_fcgid: stderr: WordPress database error Table 'blah.wp_termmeta' doesn't exist for query SELECT.....

The problem is or was rather, that no method of attempting to repair and or rebuild the table fixed the issue. Using WordPress built in method of putting the following in your wp-config.php file and then going to your-domain.com/wp-admin/maint/repair.php to attempt to fix the problem would tell me the table is missing, and failed to repair it or rebuild it.

define('WP_ALLOW_REPAIR', true);

Going into MySQL directly through phpMyAdmin also failed to fix it.

So what I ended up doing was going to the WordPress master .sql and finding the bit that was specifically the table to be created, and attempted to use that. Which also failed at first, but did end up working in the end.

Even though I can not proof 100% that the issue was related to a naming convention of some sort without actually digging into the files more. I was able to figure out that for whatever reason my table prefix was the issue in creating the table. When I used my custom prefix no method worked for repairing or creating the table. But when I used WP’s stock prefix, instantly it worked. Then all I did was go in and alter my tables name to match the prefix I use.

I am putting this out there just incase anyone else runs into the same issue. I know there are a handful of posts about this already but none of them mention anything about the prefix possibly being the issue.

CREATE TABLE `wp_termmeta` ( `meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `term_id` bigint(20) unsigned NOT NULL DEFAULT '0', `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `meta_value` longtext COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`meta_id`), KEY `term_id` (`term_id`), KEY `meta_key` (`meta_key`(191)) ) ENGINE=InnoDB AUTO_INCREMENT=3255 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

An additional step I took prior to using the stock prefix although feel it has no bearing on the outcome but worth mentioning is I went out and installed the “WordPress Beta Developer” plugin and opt into the nightly build beta version, and upgraded to that as well.

HTTP Response Status Codes: Cheat Sheet: AJAX, RESTFul responses

By | April 11th, 2016|JavaScript, PHP|

When building a front-end to an app, site, or whatever have you. It’s likely good to build it up with standards everyone practices. Assuming that there is an off chance you want to expose your API’s to the world eventually, and even if not, its just good practice. Below is a just a simple cheat sheet of http response status codes and why they are often used

(more…)

ToneSync couldn’t find your iTunes directory, file was expceted to be in ~/Music/iTunes/

By | January 7th, 2016|Random|

Who doesn’t love getting vague but menacing messages from applications where the Authors of said application fail to offer support beyond a forum no one actually monitors. Well I don’t which leads me to more often than I’d like to admit being frustrated. More so when it’s an app that I’ve grown to like and it just fails due to either updating your operating system or the app itself. That said I find myself sometimes diagnosing issues trying to figure it out on my own. Which with the rare exception through heavy use of Google I find answers that lead me to a solution overall. Unfortunately this is one of those times that I couldn’t find answers. I did however find the opposite, many people seeming to have the same exact issue. Which now leads me to meat of this post. I have an iPhone and like many other owners of iPhone’s I like to customize my device beyond the limits Apple will allow me to do outright at least. Meaning ringtones for example I have a few hoops to jump through, you are here so you know what I mean if your reading this post. My preferred app for Tones and Wallpapers it Zedge, and its accompanying desktop sync tool ToneSync. To which has worked flawlessly for me for as long as I can remember, until today. So what is the issue? When I opened ToneSync I was faced with an error:
ToneSync couldn’t find your iTunes directory, file was expceted to be in ~/Music/iTunes/
ToneSync Error

ToneSync Error

To which beyond that the app failed to load, and depending on which OS you use you have to kill the app now hung in the background. In Windows your standard control alt delete should suffice. In OS X, you will have to open your “Activity Monitor” and search for “ToneSync” (I am a Mac user so this will demonstrate how to do that.) Hit your “Command” key and the Spacebar to trigger “Spotlight Search” and type “Activity Monitor” into it then select it when it shows up. Otherwise you can find it in your “Applications > Utilities” directory. Once that’s open as previously mentioned search for ToneSync  
OS X Activity Monitor

OS X Activity Monitor

Highlight Zedge ToneSync then select the little icon at the top left (right under the red, yellow, green buttons) that looks like a stop sign with an “X” in it, it will ask you to confirm quitting the application to which you can force it or gracefully quit it. Either does the job, graceful is the suggested use unless it refuses to close.  
OS X Activity Monitor Confirmation Dialog

OS X Activity Monitor Confirmation Dialog

  Ok… So that’s annoying isn’t it, well now that the app is closed we should be able to reopen it, but do not do that yet, you’ll just end up back at square one. So we made it this far, next we have to address the actual issue. The problem is that sometime in one of the various iTunes updates I presume. A feature was created to Enable/Disable Sharing of your iTunes Library with external applications. This itself is the issue. When Zedge throws its error vague as it is, its trying to tell you it can’t find specifically iTunes Music Library.xml in your ~/Music/iTunes/ directory.  Nor will it find this file there until you Enable the feature I mentioned.   To enable the feature I mentioned you need to go ahead and open iTunes, open iTunes Preferences panel, go to the Advanced tab and make sure the checkbox for Share iTunes Library XML with other applications is checked (enabled)
iTunes  Preference Dialog

iTunes Preference Dialog

  Once your done doing that, hit OK and then proceed to reopen Zedge ToneSync to find it working again finally.

Google Chrome clear/reset DNS Cache

By | August 3rd, 2014|Random|

It didn’t occur to me until recently, and its less likely anyone will really ever have a need for clearing the DNS Cache in Google Chrome. But if your like me and you just recently updated nameservers for your domain (maybe even more then once in a 24 hour period). Then you might notice despite all your attempts to clear the history, cookies, and all else. Even restarting your browser. Or even more extreme, flushing your OS’s DNS and your router’s (if you have a router). Despite all that the domain in question just fails to open in the browser. Well, today after a little digging I have found that Chrome has its own built in internal DNS Cache mechanism. That said to access this built in DNS Cache to clear it out you need to access it like one of the many hidden gems Chrome or anything Google for that matter built in. You have to go to the following URL. chrome://net-internals/#dns Once you’re in there all you need to do is look under the first table for a button that has text to the effect of “Clear host Cache”. Clear that, restart he browser and you should hopefully pending other upper level DNS / Hosting issues are blocking you, be able to finally access that site.

Mac / OS X Keyboard Symbols

By | April 28th, 2014|Random|

I’ve been using Mac / Apple products for going on 4 years. And to this day.. I still never remember the random symbols they use to define shortcuts, and which is which physical key on the keyboard. So I am making myself a cheat sheet, and a cheat sheet for all of you to use. Enjoy (more…)

Slowly saying goodbye godaddy..

By | December 17th, 2013|Rant|

Well kids.. its time to finally break away from GoDaddy. I have been saying it for a while. But today I get off the preverbal pot. I will no longer be renewing my domains through godaddy, Ill just be transferring them out to the new registrar as they near expiration. To which some of you may ask why wait. Well, if you had 80+ domains you’d drag it out a bit too. (more…)

Starship Size comparison

By | September 27th, 2013|Random|

This is a mind blowing artist rendition of many different starships from various movies, tv series, etc. In a side by side comparison of one another. Of which from what I gather the artist updates from time to time. I’d love to have this in the form of a poster on my wall somewhere. This is great!

(more…)

Internet Explorer (IE) 6, 7, 8, 9, 10, 11 on Mac for Web Developers and those shackled to IE

By | September 27th, 2013|Code, htaccess, HTML, JavaScript, jQuery, MySQL, PHP|

 

Well finally figure a legal way out to testing all my browser needs on my projects while saving on my electric bill. All without having to also format various machines and update them per the needs at the time. Through the use of my good old friend VirtualBox I can now have various flavors of Windows from XP up. Containing versions of Internet Explorer 6 and up (currently up to the dev version of 11). (more…)