Macro conversion in global and page level body containers

After a lot of debate I finally upgraded to RW8 ( 8.5.1 build: (20823) ) to be precise, and Stacks 4.
More than anything else this was to allow me to “upgrade” to Catalina to stay up to date with some other software that was getting too far ahead to ignore.

Must admit it’s very shiny. I’m digging the dark mode and it looks like Stacks has definitely had a lot of love poured into it. Very pretty!

Can someone please check something for me please?

Add a custom.js file to resources. Doesn’t matter so much what is actually in there just a couple of document.getxxx or console.log(xxx) will do. What is in there does not matter. Not a remote resource just the plain vanilla ‘add files’ method.

Now go into the resources panel and copy the macro for it. In the example here the custom js file is named “customJS.js”.

Now, go into Code->Body and add the link to the custom js file:

<script src="%resource(customJS.js)%"></script>

Straightforward enough, right? Now preview the page in browser and look at the html. Did the macro get converted and did the js run?

Remove the custom js link out of common body code container and move it into the page level body container. Preview. Does the macro get converted and did the js run?

Remove the link from the page level body code container and move it into an HTML stack at the very bottom of your page (obviously) and preview again. Now does the macro get converted?

If you are seeing what I’m seeing, the global body container and the page level body containers are not converting the macro pointing to the custom javascript file. The macro, when in an html stack, converts just fine though.

What am I doing wrong?

Oh… I should add that when I don’t use the macro and instead use an absolute link to reach the customJS.js (inside the exported site structure)… it works just fine and the js executes no problemo… as far as I can see the macro handling in those containers seems to be … not happening, or I’m missing something daft.

@Aaron
@dan

Bump.
Is this a bug?

Hey @indridcold, thanks for making us aware of this. The dev team is investigating as I write this. Mind if we reach out for additional information (if needed)?

1 Like

No problem at all.

1 Like

@Aaron
Any news?

bump.

bump.

Bump. Again.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.