There was a recent thread concerning problems with code rewriting in the <head>
section. (I don’t think the thread is available any longer .)
I think I’ve come across something which triggers this. I was reorganising the lines in the <head>
section of a page and saved the file - there were no problems: the new order etc. was retained and nothing was altered (even spaces were left intact). I then put a block of lines relating to favicons into an include file and added the relevant PHP include. At this point, all sorts of changes were made: lines were rearranged (js and css files in a seemingly random order), some file references were moved to the <body>
section and type="text/javascript"
was added to each <script>
tag.
I created the include file manually - I don’t think it’s possible to create an include using the Wappler feature in cases like this. I thought perhaps Wappler didn’t recognise the include because the comment Wappler adds was missing. I added it - it made no difference. I also tried changing the App root to the page instead of the body - again, it didn’t help.
I’ve repeated this several times with different pages and including a PHP files causes a problem each time - if I remove it, the rewriting doesn’t happen. Sometimes only minor changes are made - eg moving css files around (but in one case moving the bootstrap css below a custom css file - which could cause a few problems). This seems like a bug.