We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33992 ☆ A M B ☆
    • 455 Posts
    Hi,

    I want to add some resources to install them as default in MODx installation, I added tpl files to install directory and php lines to setup.info.php.
    Resources appear and install successfully but my cache file is about 1MB after installation!!
    I checked it and saw that there are 7 variables for each resource, for example:
    {&dollarfix;}s['AjaxSearch'] = '........';
    {&dollarfix;}s['AjaxSearch'] = '........';
                   ...
    {&dollarfix;}s['Ditto'] = '........';
    {&dollarfix;}s['Ditto'] = '........';
                   ...
    {&dollarfix;}p['someplugin'] = '........';
    {&dollarfix;}p['someplugin'] = '........';
                   ...

    It shows that i’ve forgotten something in installation  huh

    -------------------
    {&dollarfix;} are dollar sign, SMF converts them
      God loves me. 【ツ】


      MODX.ir (Persian Support)

      Boplo.ir/modx/ (Persian)
      • 3749
      • 24,544 Posts
      The only think I can think of is to clear the site cache and check it after trying various operations to see what’s adding everything.
        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
        • 33992 ☆ A M B ☆
        • 455 Posts
        I re-installed it. Repeated resources have placed in cache right after installation.
        The repeated resources are which i’ve added to setup.info.php and now i am sure that i have not change all necessary parts sad
        In fact i only add resources info to modules array:
        $ms[] = array("Jot","<strong>1.1.4</strong> User comments with moderation and email subscription.",0,"$setupPath/snippet.jot.tpl","");
        $ms[] = array("Reflect","<strong>2.1</strong> Used with Ditto, creates archives of articles, blog entries, image galleries and more.",0,"$setupPath/snippet.reflect.tpl","");
        $ms[] = array("Wayfinder","<strong>2.0</strong> Completely template-driven menu builder that's simple and fast to configure.",0,"$setupPath/snippet.wayfinder.tpl","");
        $ms[] = array("AddpopupLink","Show link in a popup window, Used in Send to a friend snippet.",0,"$setupPath/addpopuplink.snippet.tpl");
        $ms[] = array("phx:phpthumb","phpThumb modifier for PHx.",0,"$setupPath/phpthumb.snippet.tpl");
          God loves me. 【ツ】


          MODX.ir (Persian Support)

          Boplo.ir/modx/ (Persian)
          • 33992 ☆ A M B ☆
          • 455 Posts
          I found the problem,

          emptyCache() checks DB tables and rebuild cache in manager/processors/cache_sync.class.processor.php.
          This method uses SQL below for getting (e.g.) snippets:
          $sql = 'SELECT ss.*,sm.properties as `sharedproperties` '.
          	'FROM '.$modx->getFullTableName('site_snippets').' ss '.
          	'LEFT JOIN '.$modx->getFullTableName('site_modules').' sm on sm.guid=ss.moduleguid';

          I checked site_snippets and site_modules tables, this SQL selects rows where
          site_module.guid = site_snippets.moduleguid

          but these fields have value when there is GUID (such QuickEdit) else fields are EMPTY and SQL select rows where
          "" = ""

          and this statement always is true. this statement exists for plugin too.

          So snippets and plugins which has equal value or no value for
          site_module.guid = site_snippets|plugins.moduleguid
          are in in my chach.

          huh huh huh
            God loves me. 【ツ】


            MODX.ir (Persian Support)

            Boplo.ir/modx/ (Persian)
            • 33992 ☆ A M B ☆
            • 455 Posts
            still no idea? sad
              God loves me. 【ツ】


              MODX.ir (Persian Support)

              Boplo.ir/modx/ (Persian)
              • 3749
              • 24,544 Posts
              You’ve got me stumped. At first glance, it looks like a bug. Why don’t you report it as a bug on Jira (the BUGS & REQUESTS link at the upper right of this page) and see what happens. wink
                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