We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39583
    • 103 Posts
    This isn't the first time this happens for me when I try to install packages, on different modx versions.
    What I get is preg_match() error. And some stuff doesn't seem to get installed and the plugin doesn't work.
    How can I solve this?

    This is the full console output I get.

    Console running...
    Attempting to install package with signature: mxformbuilder-1.0.0-pl
    Package found...now preparing to install.
    Grabbing package workspace...
    Workspace environment initiated, now installing package...
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    chunk_err_createArray
    Error saving vehicle object of class modChunk; criteria: Array ( [name] => emailUserTpl ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    chunk_err_createArray
    Error saving vehicle object of class modChunk; criteria: Array ( [name] => emailOwnerTpl ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    chunk_err_createArray
    Error saving vehicle object of class modChunk; criteria: Array ( [name] => itemTpl ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    chunk_err_createArray
    Error saving vehicle object of class modChunk; criteria: Array ( [name] => wrapperTpl ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    chunk_err_createArray
    Error saving vehicle object of class modChunk; criteria: Array ( [name] => successTpl ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    chunk_err_createArray
    Error saving vehicle object of class modChunk; criteria: Array ( [name] => errorTpl ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    chunk_err_createArray
    Error saving vehicle object of class modChunk; criteria: Array ( [name] => errorTpl ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => mxfb ) 
    PHP warning: preg_match() [function.preg-match.php]: Compilation failed: invalid range in character class at offset 38
    snippet_err_createArray
    Error saving vehicle object of class modSnippet; criteria: Array ( [name] => mxfbTVFormList ) 
    Could not install related objects with locally owned keys for vehicle object of class modCategory; criteria: Array ( [category] => mxFormBuilder ) 
    Attempting to preserve files at /home/pinkelef/www/www2.pinkelefant.ch/assets/components/mxformbuilder into archive /home/pinkelef/www/www2.pinkelefant.ch/core/packages/mxformbuilder-1.0.0-pl/modCategory/38f66fe1891dd60b134604e7dfa18853.0.preserved.zip
    Attempting to preserve files at /home/pinkelef/www/www2.pinkelefant.ch/core/components/mxformbuilder into archive /home/pinkelef/www/www2.pinkelefant.ch/core/packages/mxformbuilder-1.0.0-pl/modCategory/38f66fe1891dd60b134604e7dfa18853.1.preserved.zip
    Skipping vehicle object of class modSystemSetting (data object exists and cannot be upgraded); criteria: Array ( [key] => mxformbuilder.manager_datetime_format ) 
    Skipping vehicle object of class modSystemSetting (data object exists and cannot be upgraded); criteria: Array ( [key] => mxformbuilder.states_abbriviated_list ) 
    Skipping vehicle object of class modSystemSetting (data object exists and cannot be upgraded); criteria: Array ( [key] => mxformbuilder.states_fullname_list ) 
    [Install] - Checking for chunks to import --->>>
    
    [Install] - Scaning... /home/pinkelef/www/www2.pinkelefant.ch/core/components/mxformbuilder/elements/chunks/
    [Install] - Checking field button
    [Install] - ^ skipping field already exist
    [Install] - Checking field buttonreset
    [Install] - ^ skipping field already exist
    [Install] - Checking field buttonsubmit
    [Install] - ^ skipping field already exist
    [Install] - Checking field checkbox
    [Install] - ^ skipping field already exist
    [Install] - Checking field checkboxmulti
    [Install] - ^ skipping field already exist
    [Install] - Checking field checkboxmultiitem
    [Install] - ^ skipping field already exist
    [Install] - Checking field hidden
    [Install] - ^ skipping field already exist
    [Install] - Checking field number
    [Install] - ^ skipping field already exist
    [Install] - Checking field radiogroup
    [Install] - ^ skipping field already exist
    [Install] - Checking field radiogroupitem
    [Install] - ^ skipping field already exist
    [Install] - Checking field selectlist
    [Install] - ^ skipping field already exist
    [Install] - Checking field selectlistitem
    [Install] - ^ skipping field already exist
    [Install] - Checking field spambot
    [Install] - ^ skipping field already exist
    [Install] - Checking field text
    [Install] - ^ skipping field already exist
    [Install] - Checking field textarea
    [Install] - ^ skipping field already exist
    [Install] - END: Checking for chunks to import.
    Successfully installed package mxformbuilder-1.0.0-pl

    This question has been answered by BobRay. See the first response.

      --
      André
    • discuss.answer
      • 3749
      • 24,544 Posts
      I think this is a PHP 5.5 issue. Going back to 5.4 might fix it.

      Also, see this: http://forums.modx.com/thread/89312/chunk-name-is-invalid
        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
        • 39583
        • 103 Posts
        Quote from: BobRay at Jun 02, 2014, 08:52 PM
        I think this is a PHP 5.5 issue. Going back to 5.4 might fix it.

        Also, see this: http://forums.modx.com/thread/89312/chunk-name-is-invalid

        I tried adding:

        AddHandler application/x-httpd-php54 .php .php5 .php4 .php3


        to my .htaccess file in the main directory, but that didn't help. Do you know any other ways this might be possible?
        Or is there a way to manually install the plugin, or just the chunks?
          --
          André
          • 39583
          • 103 Posts
          Quote from: BobRay at Jun 02, 2014, 08:52 PM
          I think this is a PHP 5.5 issue. Going back to 5.4 might fix it.

          Also, see this: http://forums.modx.com/thread/89312/chunk-name-is-invalid

          Never mind, the link you sent solved the problem. I had to change:

          core/model/modx/mysql/modchunk.map.inc.php

          from:
          'rule' => '/^(?!\\s)[a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff_-\\s]+(?!\\s)$/',
          to:
          'rule' => '/^(?!\\s)[a-zA-Z0-9\\x2d-\\x2f\\x7f-\\xff-_\\s]+(?!\\s)$/',

          But then I got a problem with snippets instead. So I changed: core/model/modx/mysql/modsnippet.map.inc.php to the same.

          Thanks for your help BobRay
            --
            André