ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

someone please shoot me...

June 26, 2009 6:29pm

Subscribe [3]
  • #1 / Jun 26, 2009 6:29pm

    DEA

    257 posts

    This question may be related to a resolved thread.

    $_POST data randomly not working again. This is getting very frustrating:

    Notice: Undefined index: fname in /home/mysite/public_html/system/core/core.functions.php(637) : eval()'d code on line 6

    PHP is on.

  • #2 / Jun 26, 2009 6:41pm

    DEA

    257 posts

    FYI, the earlier thread marked as resolved should not be. You can see now that the errors I found had nothing to do with the issue at hand; rather, I had copied incorrect quotatin marks into my post.

  • #3 / Jun 26, 2009 8:57pm

    DEA

    257 posts

    anyone? this is a recurring issue that’s really, really annoying

  • #4 / Jun 27, 2009 2:42am

    DEA

    257 posts

    So here’s where I’m at. I have a template (actions/test) with a simple PHP capture for a form like so:

    <?php
    error_reporting(E_ALL);
    global $IN;
    $theClause = $IN->GBL('blarftastic','POST');
    echo $theClause;
    ?>

    On two different templates (root/index, tours/index), I have the same form:

    <form method="post" action="/actions/test">
    <input type="text" name="blarftastic"><input type="submit">
    </form>

    Submitting the form from ‘root/index’ template works just fine; however, submitting the same form from ‘tours/index’ shows… nothing. I even created new templates in the ‘tours’ template group and tried. No luck. Then I deleted the whole tours group, recreated it and tried again. No luck.

    I’ve seen this before. Somewhere EE is getting stuck on specific template groups and will not pass any form variables from them. I have no explanation. Surely this has been seen before by someone else.

    Please advise!

    Don

  • #5 / Jun 27, 2009 2:10pm

    Greg Aker

    6022 posts

    what’s a print_r or var_dump of the post array show you?

  • #6 / Jun 27, 2009 2:58pm

    DEA

    257 posts

    That’s just it—it was coming back completely blank, even with all error reporting on. More toiling on this has turned up some insights:

    - EE is not liking dashes (’-’) characters in the template name. Removing these seems to fix it partially.
    - Not having a closing slash (’/’) at the end of the form ‘action’ tag breaks it too. So do this:

    <form action="/actions/dosubmit/" method="post">

    NOT this:

    <form action="/actions/dosubmit" method="post">

    - Trying to pass a segment in the action parameter buggers it up too

  • #7 / Jun 27, 2009 3:21pm

    Greg Aker

    6022 posts

    what are you trying to do, what is your goal here?  You should probably try to be making a module so you can take advantage of the action id.

    -greg

  • #8 / Jun 27, 2009 8:01pm

    DEA

    257 posts

    I have a plugin that submits the data. Rather, SHOULD submit it. But again, sometimes the $_POST makes it through, sometimes not. It’s getting to the point where I almost need to start considering building a bunch of components outside of EE altogether. Very frustrated.

  • #9 / Jun 27, 2009 9:27pm

    Sue Crocker

    26054 posts

    So this is part of a plugin you’re attempting to create?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases