Site Settings > Code > Prefix - Generated Code incorrect?

The prefix code generated doesn’t seem to be correct?

I have setup a prefix of:

<?php
echo basename(__DIR__);
?>

Looking at the resultant publish php file, I am seeing this at the start of the file:

<!--?php
echo basename(__DIR__);
?--><!doctype html>
<html lang="en">
 <head> 
...

The php code seems to start with ?--> and end with -->. This cause the php code not to be actioned.

If I edit the published page and correct it, the PHP code displays the folder name for the page as expected.

Same applies to PHP code in Custom > HTML Component > Template.

Yup, I’ve managed to re-create that issue here and we’ll get it fixed :+1:

1 Like