• Resolved pace

    (@bbrun)


    Hi there,

    I’ve been trying to solve a suddenly appeared problem for some time to no avail. I suddenly can’t create new category for no apparent reason. I can create 1 category but after that whenever I tried to create a new one, I got the message

    “Could not insert term into the database”

    And the 1 category I created only has a “view” link, no “Edit”, “Quick Edit” or “Delete”. When I have mouse hover over it, it does not show an id #.

    Researching online and the only one solution that seemed helpful to me was running a plugin called DB Optomize, which is outdated. Then I found your plugin, which is well rated and downloaded. But after running it, it did not help.

    I’m wondering if you can shed some light on this problem for me since I’ve been stuck on this for 2 days still have no idea how to out of this.

    I apologize this is my very first wrodpress site and don’t really know much of the technical stuff. And my site is currently localhosted by installing Bitnami Windows version of WordPress on my notebook

    Thank you so much!

    .

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter pace

    (@bbrun)

    Don’t know if this matters but thought I should add this to the original post.

    On https://www.reddit.com/r/Wordpress/comments/5iroaa/could_not_insert_term_into_the_database
    it advised 3 things to do:

    1) go to phpmyadmin then in Structure make sure AI is checked. Mine was not checked so i checked it, then tried to create a new category but now returned a message, “some error occurred. Please reload the page.” I reloaded and the same message came back.

    2) “stop playing in PhpMyAdmin and remove it from your server.” I have no idea what this is about.

    3) in Operations, set the number for auto-increment to be higher than your highest term_id. After I set the number and click on Save, an error message showed up at the bottom,

    “Notice in .\tbl_operations.php#155 Undefined index: row_format

    Backtrace”

    Hope all this makes some sense to you so can shed some light on my problem. Thank you.

    Plugin Contributor cageehv

    (@cageehv)

    Hey pace,

    You can fix it by changing the IDs in the wp_terms, wp_termmeta and wp_term_taxonomy tables. Set the type of the IDs to ‘auto increment’.

    Success!

    peace,
    Rolf

    Thread Starter pace

    (@bbrun)

    Hi Rolf,

    Thank you so much for the solution. It actually works, after struggling for 2 days.
    But to be sure it won’t backfire again, can you please advise:

    when I was on wp_termmeta and wp_term_taxonomy tables, if I click on Structure, I’ll see meta_id and term-taxonomy_id respectively as the first item on the list. I already changed both to A_I.

    But there is another term_id under both meta_id and term-taxonomy_id, do I need to change those 2 term_id’s to A_I too?

    I have not changed them yet and so far I can already create new categories and menus.

    Another question is can I know the cause of this problem in the first place so that i know what to watch out for form this point on.

    Thank you so much again !

    Pace

    Plugin Contributor cageehv

    (@cageehv)

    Hey Pace,

    No, you only should change the FIRST field of all three tables.
    Leave the other IDs unchanged.

    peace,
    Rolf

    Thread Starter pace

    (@bbrun)

    Hey Rolf,

    I won’t change then. A big THANKS again. I can now finally move on with my website after two days’ frustration.

    Peace and Joy ??

    Hello,

    I have the exact same issue. Would someone be so kind as to give a step by step guide to achieve this. Unfortunately the advise given above means very little to me as I’m a compile novice.

    “You can fix it by changing the IDs in the wp_terms, wp_termmeta and wp_term_taxonomy tables. Set the type of the IDs to ‘auto increment’

    Im using the Sydney Pro theme on WP.

    Many thanks!

    Peter

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘“Could not insert term into the database”’ is closed to new replies.