We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33983 ☆ A M B ☆
    • 181 Posts
    I updated the getresourcefield package via the package manager and almost immediately, the cache was corrupted for an unrelated custom plugin.

    Here is the error message for the package:
    [2011-08-29 09:21:39] (ERROR @ \core\xpdo\compression\xpdozip.class.php : 142) PHP warning: ZipArchive::extractTo(): File exists
    [2011-08-29 09:21:39] (ERROR @ /connectors/workspace/packages.php) Could not unpack package /core/packages/getresourcefield-1.0.3-pl.transport.zip to /core/packages/. SIG: getresourcefield-1.0.3-pl
    


    Here is the PHP log error message:
    [29-Aug-2011 09:22:02] PHP Parse error:  syntax error, unexpected '<' in \core\cache\includes\elements\modplugin\15.include.cache.php on line 15
    [29-Aug-2011 09:22:04] PHP Parse error:  syntax error, unexpected '<' in \core\cache\includes\elements\modplugin\15.include.cache.php on line 15
    [29-Aug-2011 09:22:04] PHP Parse error:  syntax error, unexpected '<' in \core\cache\includes\elements\modplugin\15.include.cache.php on line 15
    [29-Aug-2011 09:22:05] PHP Parse error:  syntax error, unexpected '<' in \core\cache\includes\elements\modplugin\15.include.cache.php on line 15
    [29-Aug-2011 09:22:06] PHP Parse error:  syntax error, unexpected '<' in \core\cache\includes\elements\modplugin\15.include.cache.php on line 15
    


    It was a simple fix, just flush the cache, but I would like this to not happen. Does anyone have some ideas on why this would happen? I am running Revo 2.1.3pl and IIS7.5 with PHP 5.3.6.

    Thanks for reading.
      • 22303 MODX Staff
      • 10,725 Posts
      Sound like the custom plugin has a Syntax Error. Not sure why it would only occur on package upgrade and go away on cache clear however. Can you provide more information about the custom plugin? Check the source of the custom plugin to make sure it doesn't have extra PHP tags in it.
        • 33983 ☆ A M B ☆
        • 181 Posts
        This is the code:
        <?php
        // set OnHandleRequest 
        if ($modx->event->name == 'OnHandleRequest') {
            $rAlias = $modx->getOption('request_param_alias', null, 'q');
            if ( isset ($_REQUEST[$rAlias]) ) {
              $_REQUEST[$rAlias] = strtolower($_REQUEST[$rAlias]);
            }
        }
        


        And I attached a screenshot of how it looks in the Manager.