Skip to main content

PHP not working on FirstSpirit

Comments

4 comments

  • Zendesk API User
    Author: Mchrobok - 12/7/2017 11:09

    Have you changed the file extention to .php .

    Isn't the PHP Start Tag <?php

    0
  • Zendesk API User
    Author: milovan_bekic - 12/7/2017 13:02

    Yes extension was changed, that in picture is output in browser when select inspect page.

    Code looks like this:

    <?php

            echo 'Firstname'. $_POST["template-contactform-firstname"];
            echo 'Lastname' . $POST['template-contactform-lastname'];
            echo 'Email' . $POST['template-contactform-email'];
            echo 'Company' . $POST['template-contactform-company'];
            echo 'Country' . $POST['template-contactform-country'];
            echo 'Phone' . $POST['template-contactform-phone'];
            echo 'Message: ' . $_POST["template-contactform-message"];

    ?>

    0
  • Zendesk API User
    Author: brueder - 12/19/2017 13:52

    Hi Milovan,

    the problem here is "htmlMode". FirstSpirit sees XMLish tags and wants to inject stuff for the preview, which fails sometimes.

    See https://www.e-spirit.com/odfs52/template-develo/debugging/where-is-error/template-inspec/ for more information (Documentation FirstSpirit™  tells you the login credentials)

    You need to deactive "htmlMode" for the tags, like this:

    $CMS_SET(#global.htmlMode, false)$<?php$CMS_SET(#global.htmlMode, true)$

    foobar

    $CMS_SET(#global.htmlMode, false)$?>$CMS_SET(#global.htmlMode, true)$

    In case you still get the commented-out version, caching is happening. You need to force-refresh, or simply wait a bit.

    Cheers,

    Lena

    0
  • Zendesk API User
    Author: sebastianc - 1/10/2018 9:41

    Hello Milovan,

    is this still an open question? Do you need further help or did the given replies already help you?

    If so it would be great if you mark the "correct answer".


    Best regards
    Sebastian

    0

Please sign in to leave a comment.