We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Tell me this isn't weird...

    I create a chunk, insert some html text. Said chunk is called in the template. Chunk works as expected.

    A few hours later, part of a day perhaps... Chunk text disappears from the page. Check the call, it's fine. Check the chunk... chunk is gone from the resource tree.

    Ok, maybe I did something stupid and don't remember. I create the chunk again, it works as expected.

    A day later, text is gone again. Chunk is gone. I re-create the chunk (note, duplicate chunk is not indicated upon save), but I forget the h1 portion. Refresh the page calling the chunk, and the original output appears. I realize I forgot the h1, check the chunk and confirm it. Rename the new chunk to be sure it's not in the output. Original output remains with the h1.

    Check database (chunk table is NOT easy to find btw)... only the new renamed chunk exists. Neither of the two prior chunks are there. But the output is somehow finding them (or it... same name).

    Is a troll living in my MODX install?

    And for those who want to get a result on google for "MODX database chunk table", here you go. MODX chunks can be found in the site_htmlsnippets table.

    edit: yes, I cleared the cache manually before posting :~}
      Frogabog- MODX Websites in Portland Oregon
      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
      Having server issues? These guys have MODX Hosting perfected - SkyToaster
    • Is your chunk called cached or uncached?

      site_htmlsnippets is an artifact from the original Etomite CMS when all you had were site_templates, site_content, site_snippets and site_htmlsnippets; the name of the element was changed, but the database table wasn't in order to provide backwards compatibility. Likewise with the "summary" field for resources; it's the "introtext" field in the database. There are also a lot of references to "documents" in MODx code, when that terminology has since been changed to "resources".
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • I'm calling it cached. Although I actually deleted the entire cache and cache directory last night, then created a new cache directory in an attempt to clear everything out.

        If I use this template on another page, the chunk call does nothing, as is expected when calling a chunk that doesn't exist. OK, that makes sense.

        Nothing however explains a chunk disappearing twice. Except trolls.

          Frogabog- MODX Websites in Portland Oregon
          "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
          Having server issues? These guys have MODX Hosting perfected - SkyToaster
          • 3749
          • 24,544 Posts
          I'm not going to tell you it isn't weird, because it is. wink

          I think the first thing to try is going into PhpMyAdmin and repairing all the tables.


          ------------------------------------------------------------------------------------------
          PLEASE, PLEASE specify the version of MODX you are using.
          MODX info for everyone: http://bobsguides.com/modx.html
            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
          • Alright, it was a troll. Looks like a frog who didn't notice one template called a chunk, and the real one calls a TV, while both are static files with similar names.

            l checked the wrong static file and forgot I'd already decided to go with a TV.

            Stupid frog... troll.

            Onto killing more frog trolls who eat Articles and yuck up MIGX.
              Frogabog- MODX Websites in Portland Oregon
              "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
              Having server issues? These guys have MODX Hosting perfected - SkyToaster
              • 3749
              • 24,544 Posts
              That sounds like something I would do. At least you didn't delete one of static files thinking that you had the code in MODX (I've done that). Unless it's still in the cache, it's gone.


              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                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