Strange Publishing Issue with Resources

Good day.

Just started having this issue. When using resources, sometimes it puts in the correct path, sometimes it doesn’t.

Mac OS X 10.11.6 RW 8.0.3

In my file I have a couple links with URL like “%resource(css/order.css)%”. When publishing, sometimes it put in the correct URL, sometimes it leaves the code just the way it is.

Doesn’t matter if I use it in the Code–>Head section or if I put it in the Page–>HTML Code–>Head for an individual page.

For example - in the code below, the first two links should have “…/…/” in front like the third line. The fourth line it just messed it all up - it left the reference to the resource but left off the ending “)” (the ending “)” is in the code in my RW file.

I can send the ZIP’d RW file if anyone wants to look. Along with the output I am getting.


Sorry, some of the last message got left off.

Here is what was left out - (I left off the “<” from the beginning of the tags to see if that is why it got left off.

link href="/resources/css/fonts.css?rwcache=560259835" rel=“stylesheet” type=“text/css” />
link href="/resources/css/jquery.maxlength.css?rwcache=560259835" rel=“stylesheet” type=“text/css” />
script src="…/…/resources/javascript/jquery-1.11.1.min.js?rwcache=560259835">
script type=“text/javascript” src="%resource(javascript/jquery.validate.js?rwcache=560259835">
script type=“text/javascript” src="…/…/resources/javascript/jquery.maskedinput.js?rwcache=560259835">

It’s hard to tell what’s going on from your posts.

To put code on this forum you can selsct the lines of “code” and select the </> right above where you’re typing.

I think it would be clearer if you repost the actual code you are pasting in, alongside where you’re pasting it. And list separately what results you’re seeing, or provide a URL to a test page.

Sure - here is the code and a link.

LMP Test

Although the same code is listed below and you don’t need to look through the page source.

Code I have in the Code Setting --> Head Section

	<link href="%resource(css/fonts.css)%" rel="stylesheet" type="text/css" />
<link href="%resource(css/jquery.maxlength.css)%" rel="stylesheet" type="text/css" />

	<script src="%resource(javascript/jquery-1.11.1.min.js"></script>

Looks like this when published: First 2 lines need to start “…/…/” just like the third line.

	<link href="/resources/css/fonts.css" rel="stylesheet" type="text/css" />
<link href="/resources/css/jquery.maxlength.css" rel="stylesheet" type="text/css" />

<script src="../../resources/javascript/jquery-1.11.1.min.js"></script>

Code I have placed on the page in the HTML Section --> Head area

<link href="%resource(css/zebra/zebra_dialog.css)%" rel="stylesheet" type="text/css" />
<link href="%resource(css/order.css)%" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="%resource(javascript/zebra_dialog.js)%"></script>

Looks like this when published: First line comes out totally wrong, the next 2 are good.

    <link href="%resource(css/zebra/zebra_dialog.css" rel="stylesheet" type="text/css" />
<link href="../../resources/css/order.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../resources/javascript/zebra_dialog.js"></script>

Doesn’t seem to be any rhyme or reason as to when or where it places the correct link to resources.

Thank you,

@dan not sure if you might be able to shed some light on this for me.


I think you have some of this backward.
The first two lines fonts/css'and maxlength.css are loading fine on the site(status 200). The pathname is valid starting with a / just starts at the root level.

The jquery you are loading is the one that’s bad.

<script src="%resource(javascript/jquery-1.11.1.min.js"></script>

The macro to load from Resources is invalid. It would need a closing )%

You also are loading (or trying to load) three versions of the jQuery library 1.11.1(didn’t load), 1.7.1(loaded as jquery.min.js) and jquery-2.2.4.min.js.


I’m not worried at the moment with the jquery loading.

If you look at the second example in my message, you will see that RW does not replace the Resource reference with the actual URL to the resource.

Also, in the first example using the fonts.css, even though the file itself is 2 folders up in the directory, should’t the reference to it be the same as the others - i.e. start with ‘…/…/’ ?



Looking back at this, I see you’re missing some closing resource macro parentheses.

For jQuery-1.11.1.min.js, you’re missing a closing )%

I suspect that’s what’s causing this anomalies. Try fixing and let me know if that fixes those issues!

@Aaron I didn’t see that.

I fixed it; however, it didn’t fix anything. I still get the wrong link info.

I did try something that has fixed it completely – I took anything that referenced a resource out of the Code Section of the settings and placed it in the HTML Code–>Head area of EACH page.

Not sure if that helps you any.

At least if fixed my code.


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