ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How Does EE Figure Out The Next Entry ID to store when publishing?

October 02, 2012 2:15pm

Subscribe [2]
  • #1 / Oct 02, 2012 2:15pm

    Jeremy Bise

    77 posts

    So basically I’ve screwed up and am now trying to recover.  The short of it is—I manually imported some rows in exp_channel_data and now when I go to publish a new entry, I’m getting MySQL errors about duplicate keys.  I’m trying to figure out how I can make EE start assigning out higher entry_ids to new entries so I can just move on.  I know what I tried to do may have “voided my warranty” in a manner of speaking, but if there is help, I’d appreciate it.

  • #2 / Oct 02, 2012 2:22pm

    Jeremy Bise

    77 posts

    This is v2.4.0 - Build: date 20120123 by the way.

  • #3 / Oct 02, 2012 2:48pm

    mark186282

    290 posts

    did you also import the matching row in exp_channel_titles?

    EE uses mysql’s auto-increment function to create the entry ID… but it gets that from the exp_channel_titles table, then uses that to assign the entry_id in the exp_channel_data table.


    make sure you have a 1 to 1 match in your titles and data tables, and if that is not the problem… report back and we’ll sort out the details

  • #4 / Oct 02, 2012 2:55pm

    Jeremy Bise

    77 posts

    Ah ha! I had not done anything in that titles table, so getting that caught up did the trick.  Thank you so much!

  • #5 / Oct 03, 2012 5:16pm

    Dan Decker

    7338 posts

    WOW.

    Nice one Mark. Thanks for the assist!

    Jeremy, I’m glad to see you are back on track.

    Is there anything else I can assist you with?

  • #6 / Oct 03, 2012 5:18pm

    Jeremy Bise

    77 posts

    Nope, I’m good.  Close her out.  😊  Many thanks.

  • #7 / Oct 04, 2012 3:09pm

    Dan Decker

    7338 posts

    Excellent!

    If you need anything else, please let us know!

    Cheers,

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases