• Resolved g45lewis

    (@g45lewis)


    From WordPress 3.4.10.1 I exported a production version of a blog that I then deleted (ie, the blog had reached the end of its usefulness).

    I now want to import the SQL into wordpress on localhost so I can use selected posts in a new blog. When I tried this with the latest version (3.5), I get ERROR 1054 referring to link_category in the table wp_links. I then went to the wordpress download release archive and downloaded version 3.4.1. Same 1054 error.

    What release archive should I use to avoid this problem?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter g45lewis

    (@g45lewis)

    Here’s another way to ask the same question. What is the latest version of WordPress that includes the data column link_category in the table wp_links?

    I’m happy to research this question myself, but I have no idea where to start searching. But I’ll bet that an answer is readily available, given the impressive documentation available for WordPress. So, even if you don’t know the answer to my very specific question, if you could point me in the right direction, I would appreciate it.

    Thread Starter g45lewis

    (@g45lewis)

    Points of clarification. The version 3.4.10.1 refers to phpMyAdmin SQL Dump. The export was done on Sep 11, 2012.

    Thread Starter g45lewis

    (@g45lewis)

    Update: So I resorted to brute force and installed wordpress versions 3.4, 3.3, 3.2, 3.1, and 3.0 in succession. None of these versions seem to contain the column link_category in the wp_links table (unless I’m doing something wrong reinitializing between installs).

    So then I made a back-up copy of the sql Export and edited it to remove link_category from the INSERT statement for wp_links. I also removed the values for link_category from the VALUES clause in the INSERT. There were only 7 rows to INSERT, so no big deal.

    This resolved the error for wp_links. But when running the sql, I again got a 1054 error, but this time for the data column post_category in the table wp_posts. This affected about a thousand rows, so my manual edit workaround is no longer an option.

    Help! I am stuck. Nobody has responded to this series of requests for assistance. Am I to assume that an export I created in Sep 2012 is so obsolete that it cannot be restored in Jan 2013? What exactly were the WordPress folks thinking when they dropped link_category and post_category from wp_links and wp_posts? Wasn’t it clear that this would be a big GOTCHA for people like me with a time delay between export and restore? As for the other alternative of restoring to a version of wordpress that does contain the two data columns, I’ve not been able to find such a version.

    Help would be very much appreciated!! Thanks.

    Thread Starter g45lewis

    (@g45lewis)

    Time to close this series as resolved (sort of). I did a web search on 1054 errors in wordpress and found a suggestion that phpmyadmin could be used to insert the data columns link_category and post_category in the tables wp_links and wp_posts respectively.

    This did fix the problem. My exported SQL ran successfully. In case others have the same problem, I’ll provide a few details.

    In phpmyadmin, choose the database of concern. You’ll see a list of tables. Choose wp_links (or wp_posts). By default you’ll be in the Browse tab. Choose the Structure tab. Immediately below the list of data columns, you’ll have the opportunity to insert a new data column. By default the option At the End of Table is selected. Instead choose the After option. Then select from the drop-down menu the data column that will precede the new data column. For wp_links this is wp_target. For wp_posts this is wp_title. Select the Go button, which takes you to a new screen where you can fill in details about the new data column. Use the following as a guide:
    link_category bigint(20) NOT NULL DEFAULT ‘0’
    post_category int(4) NOT NULL DEFAULT ‘0’

    Comment: This worked, but it is a kludgy solution. I’m not sure I really understand what link_category and post_category were intented to do. When doing a manual upgrade to a new wordpress version, there is one point where a wordpress utility will upgrade the database if that’s needed. This utility likely contains logic which would make it possible to upgrade an Export. That would be such a cleaner solution. Just run your sql export through a wordpress utility that upgrades it to work with the latest version of wordpress. Then 1054 errors would disappear. And none of the silliness of using phpmyadmin to manually insert missing data columns would be necessary.

    I am marking this issue as closed. But it is obviously an issue that I think wordpress folks should put on their bullet list to fix. Right now the export/restore process is broken.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘ERROR 1054: Unknown column 'link_category'’ is closed to new replies.