Copied to clipboard

Flag this post as spam?

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


  • Allan Hawkey 232 posts 303 karma points
    Nov 19, 2012 @ 13:30
    Allan Hawkey
    0

    Contact Form not working after upgrade to 4.9.1 or 4.10.1

    I've been using the contact form without problems in 4.5.2 and 4.7.1.  I have used umbraco.library:RenderMacroContent as I need the macro in the xslt file.

    After upgrading to 4.9.1 and also trying 4.10.1, this seems to break.

    If I insert the macro directly into a template, it seems fine.  But that doesn't work for my sites.

    Any idea why this breaks for the upgraded versions?

           <xsl:variable name="macro">
              <xsl:text>&lt;?UMBRACO_MACRO macroAlias=&quot;ContactForm&quot; MailFrom=&quot;</xsl:text>
              <xsl:value-of select="umbraco.library:GetXmlNodeById($startNode)/mailFrom" />
              <xsl:text>&quot; MailFromName=&quot;</xsl:text>
              <xsl:value-of select="umbraco.library:GetXmlNodeById($startNode)/mailFromName" />
              <xsl:text>&quot; MailSubject=&quot;</xsl:text>
              <xsl:value-of select="umbraco.library:GetXmlNodeById($startNode)/mailSubject" />
              <xsl:text>&quot; MailIntroText=&quot;</xsl:text>
              <xsl:value-of select="umbraco.library:GetXmlNodeById($startNode)/mailIntroText" />
              <xsl:text>&quot; MailSubjectCopyToSender=&quot;</xsl:text>
              <xsl:value-of select="umbraco.library:GetXmlNodeById($startNode)/mailSubjectCopyToSender" />
              <xsl:text>&quot; MailIntroTextCopyToSender=&quot;</xsl:text>
              <xsl:value-of select="umbraco.library:GetXmlNodeById($startNode)/mailIntroTextCopyToSender" />
              <xsl:text>&quot; FormSentConfirmation=&quot;</xsl:text>
              <strong><xsl:value-of select="umbraco.library:GetXmlNodeById($startNode)/formSentConfirmation" /></strong>
              <xsl:text>&quot;&gt;&lt;/?UMBRACO_MACRO&gt;</xsl:text>
            </xsl:variable>
            <xsl:value-of select="umbraco.library:RenderMacroContent($macro, ./@id)" disable-output-escaping="yes" /><br />
  • Allan Hawkey 232 posts 303 karma points
    Nov 19, 2012 @ 13:32
    Allan Hawkey
    0

    Might also be useful to add that in the error log I get this:

    "Error creating or sending contact mail, check if there is a mailFrom property on your document and that it has a value, or specify a MailFrom parameter on the macro call exception:"

    Clearly, from the code, there is a MailFrom property, so I wonder why it's not being recognised?

    Thanks in advance!

Please Sign in or register to post replies

Write your reply to:

Draft