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

    I have gotten the same problem. How did you fix it?

    I ended up using:
            include_once $modx->config['base_path'] . "manager/processors/cache_sync.class.processor.php";
            $sync = new synccache();
            $sync->setCachepath($modx->config['base_path'] . "assets/cache/");
            $sync->setReport(false);
            $sync->emptyCache();
            $modx->invokeEvent("OnSiteRefresh");
    


      Chuck the Trukk
      ProWebscape.com :: Nashville-WebDesign.com
      - - - - - - - -
      What are TV's? Here's some info below.
      http://modxcms.com/forums/index.php/topic,21081.msg159009.html#msg1590091
      http://modxcms.com/forums/index.php/topic,14957.msg97008.html#msg97008
      • 11694
      • 13 Posts
      Hi ChuckTrukk
      I’ve just so your message (a bit late grin)
      Anyway
      I did exactly the same
      So i guess we are on the right way
      I’ve actually contribute my own function in the api, in which i’ve included the same chunk of code that you have post
        • 32645
        • 377 Posts
        Using it with CodeIgniter

        I’ve tried to include this API class into the libraries folder inside CodeIgniter and ensured that the paths are correct and are at the same level.

        However regardless of what I do I can’t get the API class to either load, run or do any MODX stuff, such as getting chunks, parsing them, etc.

        What I’d like to do is to use CI as a way of building modules that sit outside of MODX... but I’ve realised that its very difficult to do without using an IFRAME, and even then it doesn’t work 100%.

        Does anyone have a full blow-by-blow list of how to create a module using CodeIgniter using this API as a library?

        Thanks.
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: worchyld at Mar 05, 2009, 09:50 AM

          Does anyone have a full blow-by-blow list of how to create a module using CodeIgniter using this API as a library?
          Not likely at this time, though I could be wrong. But if you do successfully integrate a module built with CodeIgniter, be sure to update us.
            • 4172
            • 5,888 Posts
            found a bug in function saveTVs:

            some tvs were not saved. I found it is when the old value is the same as the tmplvarid.
            Of course cannot, when the script continues the loop in the case old-value == tmplvarid.
            here is a fix for that:

            <?php
            		if(isset($this->tvNames[$tv])){
            			$tmplvarid=$this->tvNames[$tv];		
            			if(isset($this->oldTVs[$tv])){
            				//echo $this->oldTVs[$tv].':'.$this->tvNames[$tv].'         ';	
            				//if($this->oldTVs[$tv]==$this->tvNames[$tv]) continue;//by Bruno: here found a bug
                   			if($this->oldTVs[$tv]==$value) continue;//by Bruno: must be like this
            				$sql="UPDATE $tvc SET value='$value' WHERE tmplvarid=$tmplvarid AND contentid=$id";
            			}
            			else
            				$sql="INSERT INTO $tvc (tmplvarid,value,contentid) VALUES ($tmplvarid,'$value',$id)";
            			$modx->db->query($sql);
            		}
            ?>
            
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!