We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53063
    • 4 Posts
    Problem
    If I want to send a form with eForm appears the error:

    « MODX Parse Error »
    `&_PHX_INTERNAL_091_&~82~&_PHX_INTERNAL_093_&` is not numeric and may not be passed to makeUrl()
    Error information
    Current Snippet eForm
    Current Plugin PHx(OnParseDocument)

    Backtrace
    DocumentParser->executeParser()
    index.php on line 128
    DocumentParser->prepareResponse()
    manager/includes/document.parser.class.inc.php on line 2118
    DocumentParser->outputContent()
    manager/includes/document.parser.class.inc.php on line 2184
    DocumentParser->parseDocumentSource(string $var1)
    manager/includes/document.parser.class.inc.php on line 658
    DocumentParser->invokeEvent('OnParseDocument')
    manager/includes/document.parser.class.inc.php on line 1948
    DocumentParser->evalPlugin(string $var1, array $var2)
    manager/includes/document.parser.class.inc.php on line 4379
    eval()
    manager/includes/document.parser.class.inc.php on line 1301
    PHxParser->OnParseDocument()
    manager/includes/document.parser.class.inc.php(1301) : eval()'d code on line 15
    PHxParser->Parse(string $var1)
    assets/plugins/phx/phx.parser.class.inc.php on line 46
    PHxParser->ParseValues(string $var1)
    assets/plugins/phx/phx.parser.class.inc.php on line 61
    PHxParser->ParseValues(string $var1)
    assets/plugins/phx/phx.parser.class.inc.php on line 179
    DocumentParser->evalSnippets(string $var1)
    assets/plugins/phx/phx.parser.class.inc.php on line 110
    DocumentParser->_get_snip_result(string $var1)
    manager/includes/document.parser.class.inc.php on line 1393
    DocumentParser->evalSnippet(string $var1, array $var2)
    manager/includes/document.parser.class.inc.php on line 1443
    eval()
    manager/includes/document.parser.class.inc.php on line 1341
    require(string $var1)
    manager/includes/document.parser.class.inc.php(1341) : eval()'d code on line 1
    eForm(DocumentParser $var1, array $var2)
    assets/snippets/eform/snippet.eform.php on line 114
    DocumentParser->makeUrl(string $var1)
    assets/snippets/eform/eform.inc.php on line 606

    My solution
    In eform.inc.php insert after line 605:
    $gid = preg_replace(array('/&_PHX_INTERNAL_091_&~/', '/~&_PHX_INTERNAL_093_&/'),
                      "",
                      $gid);


    Now it should look like this:
    else {
    				$gid = preg_replace(array('/&_PHX_INTERNAL_091_&~/', '/~&_PHX_INTERNAL_093_&/'),
                      "",
                      $gid);
    
    				$url = $modx->makeURL($gid);
    				$modx->sendRedirect($url);
    			}
    			return; // stop here

    This question has been answered by multiple community members. See the first response.

    [ed. note: iusemodx last edited this post 9 years, 9 months ago.]
    • discuss.answer
      • 13226
      • 953 Posts
      Do you have the PHX plugin installed ?

      If it's installed, turn it of and then try sending the form again

      PHX is no-longer a distributed plugin, it's been long overhauled by "IF" and the in-built conditionals

      You may have a conflict with the in-built conditionals and Phx - goto tools => configuration - site tab: enable filters

      More information on the modifiers can be found here and here [ed. note: iusemodx last edited this post 9 years, 9 months ago.]
        • 33014 ☆ A M B ☆
        • 1,231 Posts
        franz. Thank you for your information.
        How do you write snippet call of eForm? I'm concerned about the "&gotoid".
          • 53063
          • 4 Posts
          Quote from: yama at Dec 10, 2016, 02:50 AM
          How do you write snippet call of eForm? I'm concerned about the "&gotoid".

          [!eForm? &formid=`ContactForm` &tpl=`[!mobileSelector? &desktop=`ContactForm` &mobile=`ContactFormMobile`!]` report=`ContactFormReport` &vericode=`1` &ccsender=`1` &gotoid=`82` &subject=`Anfrage` !]
          [ed. note: franz. last edited this post 9 years, 9 months ago.]
            • 33014 ☆ A M B ☆
            • 1,231 Posts
            hmm... Is it "&gotoid=`82`", not "&gotoid=`[~82~]`"?

            PHxParser->Parse(string $var1)
            assets/plugins/phx/phx.parser.class.inc.php on line 46
            PHxParser->ParseValues(string $var1)
            assets/plugins/phx/phx.parser.class.inc.php on line 61

            above lines

            https://github.com/extras-evolution/PHx/blob/master/assets/plugins/phx/phx.parser.class.inc.php#L88-L203
            In principle, the PHx plugin performs content parsing on its own.
            This is equivalent to processing of $modx->parseDocumentSource() in the core body. If the body improves $modx->parseDocumentSource(), we also need to follow the PHx plugin.
            But then, we need to release PHx for each version of MODX. This is difficult.
            Please wait for a while as we will consider a temporary solution.
            $id = trim($id,']~[');

            I think, Perhaps it would be nice to add the above processing into $modx->makeUrl().
            • discuss.answer
              • 33014 ☆ A M B ☆
              • 1,231 Posts
              https://github.com/extras-evolution/PHx/blob/v2.2.1/assets/plugins/phx/phx.parser.class.inc.php#L28-L29
              If square brackets are included in the value processed by the snippet, malfunction may occur.
              When MODX gets sophisticated and it will can handle flexible and complex values, PHx plugin will increase the problem.
              A problem arises, for example, when dealing with $ _GET with the "math" parameter of the If-snippet.