How To Change / Reset CMS Page IDs? »  Show posts from    to     

Icy Phoenix


Old Support Topics - How To Change / Reset CMS Page IDs?



scorpsportal [ Sat 07 Jan, 2012 10:38 ]
Post subject: How To Change / Reset CMS Page IDs?
Hi all,

I'd like to know how to change CMS Page IDs, and (most importantly) how to reset the counter for it.

I made a couple of CMS Pages, tried things out, and deleted them, but then, when I add another page, the CMS Page ID continues with whichever highest number it used to be, and keeps counting from there, finally resulting in something like this:

cmspageidproblem

As you can see, the CMS Page IDs read: 1, 2, 4, 6, 21, and 22. I'd like to have the Page IDs run chronologically, 1, 2, 3, ... etc. Now, whether or not I delete the last two pages, every time I add a new page, it will give it page ID 23 and higher. Editing the database record 'cms_layout' doesn't really do the trick - sure, I can change the existing page IDs, but 1. adding a new page will still result in a high ID number, meaning I would have to change it every time, and 2. clicking on 'Duplicate Blocks' when editing that particular CMS page will result in an error.

What can I do?


Informpro [ Sat 07 Jan, 2012 23:24 ]
Post subject: Re: How To Change/reset CMS Page IDs?
Hi !

If my memory is good, the field is in auto increment. There's no solution to reset an AUTO_INCREMENT field, only this trick : delete it and re-add (as a Primary Key AUTO_INCREMENT). Do a save of the table before and don't forget to clear the cache, that should work.


scorpsportal [ Sun 08 Jan, 2012 17:40 ]
Post subject: Re: How To Change/reset CMS Page IDs?
Thanks, it was very helpful!


Mighty Gorgon [ Sun 08 Jan, 2012 19:58 ]
Post subject: Re: How To Change/reset CMS Page IDs?
You may alternatively try to assign a name to your pages, so they will be independent from the ID.

For example, you have a page called "Commodore 64 Emulator": if you assign c64_emulator.php as a filename you will then be able to reach that page by typing c64_emulator.php in your browser, without needing to remember the ID of the page.

Just a suggestion...




Powered by Icy Phoenix