[[- comments here]][/code
/** * Updates the Context of all Children recursively to that of the parent. * * @static * @param modX &$modx A reference to an initialized modX instance. * @param modResource $parent The parent modResource instance. * @param array $options An array of options. * @return int The number of children updated. */ public static function updateContextOfChildren(modX &$modx, $parent, array $options = array()) { $count = 0; $criteria = $modx->newQuery('modResource', array('parent' => $parent->get('id'))); foreach ($modx->getIterator('modResource', $criteria) as $child) { $child->set('context_key', $parent->get('context_key')); if ($child->save()) { $count++; } else { $modx->log(modX::LOG_LEVEL_ERROR, "Could not change Context of child resource {$child->get('id')}", '', __METHOD__, __FILE__, __LINE__); } } return $count; }
The problem i have persists latest version 2.1.5I think something else must be wrong with your upgrade. I cannot reproduce this behavior at all. Please start a separate thread in the proper forum to explore issues you are experiencing any release of MODX Revolution 2.1
This trouble started after running the update from 2.1.3 to 2.4.1
any change to the website will kill it both front and back.
Removing the file: core/cashe/system_settings/config.cache.php will make it run again.
I guess every change to the cache will corrupt this cash-file ?….
This discussion is closed to further replies. Keep calm and carry on.