We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18961 ☆ A M B ☆
    • 237 Posts
    This is a bit confusing, but let me try to explain.

    My client has a site that has a lot of products - thousands. We are using resources (pages) as individual products and then organizing them in containers. The titles of the products are numbers like 1094, 1095, etc. We are auto generating the Resource Alias so if we title it 1094 our Resource Alias is also 1094. All good until we reached the Resource ID of 1094. Now ModX is confused. I'm using GetResource to list the items on a page. If I click on the new product that has let's say a title of 297 with a Resource ID of 1094, it pulls up the product that we Titled and gave a Resource Alias of 1094.

    Obviously, this is a big problem. I guess I never thought the Resource ID and Resource Alias would conflict.

    We can go back and change the Resource Alias of conflicting products, but as we move forward that is going to add a lot of work.

    Is there any way to stop ModX from confusing them? I'm including two screen shots to maybe better explain this.

      Michael Smull
      http://www.bigpixelstudio.com
      twitter: @mdsdesign
      • 3749
      • 24,544 Posts
      I don't doubt your report, but I don't see how it could happen. getResources doesn't search by alias or pagetitle unless you put one of them in its &where property.

      I'd be inclined to suspect that there's more than one [[+id]] placeholder (e.g., a TV called 'id') or there's a faulty output modifier. Can you post the Tpl chunk you're using with getResources and your getResources tag?

        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
        • 4172
        • 5,888 Posts
        on which version are you running?
          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 18961 ☆ A M B ☆
          • 237 Posts
          Sorry. 2.2.6
            Michael Smull
            http://www.bigpixelstudio.com
            twitter: @mdsdesign