jcu-eresearch / matrix-helpers

100% Unguessable™. Public bug tracker, pages, designs and helpers that make life in Squiz Matrix easier. The metaphorical red pill.
https://jcu-eresearch.github.io/matrix-helpers/
GNU Affero General Public License v3.0
3 stars 0 forks source link

SSJS doesn't run in Login Designs #88

Closed davidjb closed 5 years ago

davidjb commented 7 years ago

Within a Login Design, using the following snippet as a test:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title></title>
  </head>
  <body>
    <script runat="server">
      print('This gets sent to the client')
    </script>
    %globals_asset_contents:12345%
    <MySource_AREA id_name="nested" design_area="nest_content" />
  </body>
</html>

With asset 12345 having the contents (and set as the target of the nested Design Area):

    <script runat="server">
      print('This too gets sent to the client')
    </script>

results in all of the SSJS being sent to the client and run there, and not processed on the server. So, SSJS isn't processed in any of those three locations. This is much in the same way that SSJS doesn't run on 404 pages (at least until https://squizmap.squiz.net/matrix/10672, which we don't yet have available).

Tested in 5.4.0.3.

Is the same issue also already fixed for Password Change Designs? That's how https://squizmap.squiz.net/matrix/10672 reads but it's worth checking whilst SSJS issues are being addressed.

davidjb commented 7 years ago

Reported at https://squizmap.squiz.net/matrix/10772. This marks bug number ~30~ (lots more than that) reported to Squiz by us. 🎉

davidjb commented 7 years ago

Apparently fixed and released as part of 5.4.1.1 and https://squizmap.squiz.net/matrix/10672. We'll see when we get the upgrade.

davidjb commented 5 years ago

All good and working, finally, under v5.5.3.0. Closing this off.