We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13306
    • 19 Posts
    Hi,

    Could you tell me if it’s possible to reset (or set manually) the resource document ID’s? (ie, the parenthesised number for each document)

    I’m creating a set of resources to use with wayfinder and wayfinder links to the resource ID, but I’ve already created and deleted several pages through the cms. I currently have only three resources in my site tree, but they have ID’s 1, 14 and 15 (as a child of 14).

    I don’t want to have to reference e.g. ID 14 from wayfinder, where i have only three resources total. Is there some way to reindex my resources without resorting to a manual edit of my mysql db?

    Thanks very much in advance.
      • 4310
      • 2,310 Posts
      Is there some way to reindex my resources without resorting to a manual edit of my mysql db?
      Short answer is no, there is no other method.
      Also if you do use PHPMyAdmin be aware that parent/child relationships and TV values will get messed up.
        • 13306
        • 19 Posts
        Quote from: bunk58 at Mar 03, 2010, 02:06 AM

        ...TV values will get messed up.
        I’ve edited my ID and parent fields manually in the table ’modx_site_content’ and everything still seems to work properly. I haven’t used any TV’s yet - hopefully i won’t run into any problems.

        Thank you for that.
          • 3749
          • 24,544 Posts
          I you have any links from one doc to another and used MODx link tags for them (as you should), they’re all wrong now. That’s just one reason why it’s a good idea to just live with the IDs as they are.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 13306
            • 19 Posts
            Quote from: BobRay at Mar 03, 2010, 02:15 PM

            I you have any links from one doc to another and used MODx link tags for them (as you should), they’re all wrong now.
            Hi

            Thanks for the reply.

            If it’s no trouble, could you give me the default table and field names these link tags are stored in?

            I should have mentioned - this is a brand new website. The pages I created and deleted were just tests - it’d be no great loss to me if I had to clear the database completely and I dont have any page to page links at the moment.


            Ps:
            I’ve found I can reset the auto_incrememnt value for modx_site_content (it’s under operations in phymyadmin). So if i delete all pages on the site through the CMS to start fresh, i can reset this value to 1. Is that a safer method?