Wappler is reordering js links in file on save

OS info

  • Operating System : Mac OSX 18.7.0
  • Wappler Version : 2.4.2

Problem description

When I save files in my project Wappler is reorganizing js files and completely breaks the page. I just open the file and save it. I haven’t had these problem in former versions of Wappler.

Steps to reproduce

  1. Open file
  2. save file

report_2019-11-2_10-1-58.zip (610.6 KB)
wapplersaving.mov (5.0 MB)

It seem that the problem happens when this code is not directly before the closing head tag:

     <!-- This goes in head tags -->
        <script src="../_cookies/js/trackingController.js"></script>
        <?php include '../_cookies/trackingController.php' ?>

        <!-- /This goes in head tags -->

We figured out that it is the php include indeed that causes problems, it happens when a php included is added to the head section, any code that comes after the php include doesn’t get detected and is added again.

For now the solution is to move the php includes in the head to the end.


Yes this also happens when you add some custom php code. (for example an if statement etc)

Thank you!

This is now fixed in Wappler 2.4.3 - PHP code in the head tags should no longer cause issues with the includes there.

1 Like

Code is re-arranged when you add a <?php if statement ?>

Thank you!

Hello @t11
Please post a new topic explained your problem(s) in details.

1 Like

This topic was automatically closed after 3 days. New replies are no longer allowed.