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

    I’ve been using ditto/reflect successfully for some time now, but upon the release of modx evo 1.x, the archiving mechanism failed. (The call would just output a link to "1969" and nothing else ... when it had previously shown a number of years, 2000-2008.) The site in question uses a custom tv for dates, by which an article collection is sorted. All things being equal, I did a comparison in bbedit between the reflect snippets in modx 0.9.6.3 and 1.x and found a small, but meaningful change to the currently packaged version.

    The working version in 0.9.6.3 and before, at about line 274 (in the params section), has:
    $allParameters = func_get_args();
    	$reflectParameters = array('reflect_base','config','id','getDocuments','showItems','groupByYears','targetID','yearSortDir','monthSortDir','start','phx','tplContainer','tplYear','tplMonth','tplMonthInner','tplItem','save');
    	foreach ($allParameters[1] as $param=>$value) {
    		if (!in_array($param,$reflectParameters) && substr($param,-3) != 'tpl') {
    			$dParams[$param] = $value;
    		}
    	}


    Whereas, the current non-working version, at about line 266, has:
    $reflectParameters = array('reflect_base','config','id','getDocuments','showItems','groupByYears','targetID','yearSortDir','monthSortDir','start','phx','tplContainer','tplYear','tplMonth','tplMonthInner','tplItem','save');
        $params =& $modx->event->params;
        if(is_array($params)) {
            foreach ($params as $param=>$value) {
                if (!in_array($param,$reflectParameters) && substr($param,-3) != 'tpl') {
                    $dParams[$param] = $value;
                }
            }
        }


    Upon reverting this block of code to the former version, everything works fine. Question is: Was there a good reason for this change? And by reverting to the old version will I have created potential for other buggy behavior?

    Hope this is of use to you all. Cheers,

    Jim
      ------
      Server: *nix, ModX Evo 1.0.4, Apache 2.x, PHP 5.x, Mysql 5.x.