Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jon Dunfee 199 posts 468 karma points
    Nov 22, 2010 @ 08:53
    Jon Dunfee
    0

    Post as XML woes

    Is it broke in 1.1 on 4.0.3?  I can't get it to work, nor can I seem to locate any documentation about using the option. For my test form, upon submitted I have 2 actions, post to url & post xml.  The post to url works fine, but can't get post xml to work at all.  I mapped the same fields and I even uploaded an xslt thinking I needed one.

    Here's my test xslt, but if you look at the screenie - I see no indication that I even have it attached after clicking the update button at the bottom of the modal.

    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:user="urn:my-scripts"
    exclude-result-prefixes="xsl msxsl user">

    <xsl:output method="xml" media-type="text/html" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
    doctype-system="DTD/xhtml1-strict.dtd"
    cdata-section-elements="script style"
    indent="yes"
    encoding="utf-8"/>

    <xsl:param name="records" />

    <xsl:template match="/">

    <xsl:copy-of select="$records" />

    </xsl:template>
    </xsl:stylesheet>


    I'm lost and frustrated to no end.  What do I need to do.  My soft.php is simply (for testing):

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <?php
    if(sizeof($_POST) > 0)
    {
    $sendto = "[email protected]";
    $subject = "Soft test";
    $message = "";
    foreach ($_POST as $key => $value) {
    $message .= "-------------------------\n$key ==> $value\n";
    }
    $header = "From: webmaster@".$_SERVER["SERVER_NAME"]."\n";
    $header .= "Content-Type: text/html; charset=iso-8859-1\n";

    // Send

    ini_set("sendmail_from","webmaster@".$_SERVER["SERVER_NAME"]);

    if (mail($sendto,$subject,$message,$header))
    {
    echo 'Mail sent!';
    } else
    {
    echo 'Error! Mail was not sent.';
    };

    }

    var_dump($_POST);
    ?>
    <form method="post">
    <textarea name="test" style="width:90%;margin:20px auto;height:200px;">
    </textarea>
    <br />
    <input type="submit" value="Submit" />
    </form>
    </body>
    </html>

    So what steps do I need to take to get this working if it really is a working workflow feature in Contour. TIA!

  • Comment author was deleted

    Nov 22, 2010 @ 08:57

    @Jon, could you update to do latest version of Contour, there you should be able to see if the xsltfile property has a file attached.

    You can find the upgrade archive and instructions here: http://our.umbraco.org/projects/umbraco-pro/contour

  • Comment author was deleted

    Nov 22, 2010 @ 08:59

    Also could you check the umbracoLog ( table in the db) if you see any entries related to a failure of the workflow ?

    Cheers,
    Tim

  • Jon Dunfee 199 posts 468 karma points
    Nov 23, 2010 @ 08:14
    Jon Dunfee
    0

    The update did fix the xslt attachment issue but it still doesn't work - in order to meet the deadline we are developing a custom workflow, but I still want to figure this out before I give up on it entirely.  On my php page, I have anything posting send me a "hello world" just in case it was failing and it tests fine performing a "post to url", but "post xml to url" does nothing.  Ugh.

Please Sign in or register to post replies

Write your reply to:

Draft