- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
PHP not working on FirstSpirit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you changed the file extention to .php .
Isn't the PHP Start Tag <?php
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"];
?>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

