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

    I did the tutorial to manage Event-Resources with MIGXdb:
    http://rtfm.modx.com/display/ADDON/MIGXdb.Manage+Events-Resources+in+a+CMP+with+help+of+MIGXdb

    Everything works fine.
    But now I recognized, that the cache doesn't refresh when I edit an event.
    As I can see in the code the default modx-processors for resource create/update get triggered.
    But why is my cache not getting regenerated?

    Any ideas?

    Thanks,
    janein

    This question has been answered by Bruno17. See the first response.

    • discuss.answer
      • 4172
      • 5,888 Posts
      you will need a field in your form with name 'syncsite' and a value of 1

      this can be a checkbox- or also a hidden- TVtype
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 41647
        • 49 Posts
        Thank you, that worked perfectly fine! smiley
        I had the feeling that it would be something like this, but I couldn't find it in the db...
          • 4172
          • 5,888 Posts
          /**
           * Updates a resource.
           *
           * @param string $pagetitle The page title.
           * @param string $content The HTML content. Used in conjunction with $ta.
           * @param integer $template (optional) The modTemplate to use with this
           * resource. Defaults to 0, or a blank template.
           * @param integer $parent (optional) The parent resource ID. Defaults to 0.
           * @param string $class_key (optional) The class key. Defaults to modDocument.
           * @param integer $menuindex (optional) The menu order. Defaults to 0.
           * @param string $variablesmodified (optional) A collection of modified TVs.
           * Along with $tv1, $tv2, etc.
           * @param string $context_key (optional) The context in which this resource is
           * located. Defaults to web.
           * @param string $alias (optional) The alias for FURLs that this resource is
           * designated to.
           * @param integer $content_type (optional) The content type. Defaults to
           * text/html.
           * @param boolean $published (optional) The published status.
           * @param string $pub_date (optional) The date on which this resource should
           * become published.
           * @param string $unpub_date (optional) The date on which this resource should
           * become unpublished.
           * @param string $publishedon (optional) The date this resource was published.
           * Defaults to time()
           * @param integer $publishedby (optional) The modUser who published this
           * resource. Defaults to the current user.
           * @param json $resource_groups (optional) A JSON array of resource groups to
           * assign this resource to.
           * @param boolean $hidemenu (optional) If true, The resource will not show up in
           * menu builders.
           * @param boolean $isfolder (optional) Whether or not the resource is a
           * container of resources.
           * @param boolean $richtext (optional) If true, MODX will render the available
           * RTE for editing this resource.
           * @param boolean $donthit (optional) (deprecated) If true, MODX will not log
           * visits on this resource.
           * @param boolean $cacheable (optional) If false, the resource will not be
           * cached.
           * @param boolean $searchable (optional) If false, the resource will not appear
           * in searches.
           * @param boolean $syncsite (optional) If false, will not empty the cache on
           * save.
           * @return array
           *
           * @package modx
           * @subpackage processors.resource
           */
          class modResourceUpdateProcessor extends modObjectUpdateProcessor {
          
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 41647
            • 49 Posts
            I saw this, but where is this value stored in the database?
            I have no such column in my site_content table...
              • 4172
              • 5,888 Posts
              this isn't stored in the db. This checkbox is just to tell the create/update - processor to clear or not to clear the cache.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 41647
                • 49 Posts
                so this value gets reset every time I update a resource?
                  • 4172
                  • 5,888 Posts
                  yes, but you could store the value into a TV and check this value before the form is generated.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 41647
                    • 49 Posts
                    ok, now I see clearly ;-)
                    thanks!