Allow publishing Web_Resources or Themes without a full publish

Currently, if you make a theme change or update any files in the Web_Resources directory, you have to perform a full publish to push them out to the live site. I think it would be useful to have an option to publish the entire Web_Resources directory, or possibly even a theme folder.

Oh, I didn’t know this. I was wondering why the changes I made were not taking effect. this is great to know. I would love know how to just publish those assets as well.

Certain assets and individual pages can be published directly to take immediate effect. Things like File and Image assets, for instance, can be published up to replace existing ones. But actual site resources, which is anything in the “web_resources” directory, does not publish without a full publish.

in the meantime, couldn’t we just copy the theme files out to the published server manually, adjusting any paths the .css files use accordingly? Not an ideal thing, but would that not work?

You can definitely copy them directly out. If you set the CSS file up with the correct paths, you will not need to adjust those. When you reference images in your Theme folder, your path should be “/web_resources/themes/[theme name]/[image folder]/[file.ext]”

That is the correct path when published and the system handles that path when in preview to resolve it properly so you don’t have to worry about the scenario of changing them.

Related to this, i just published a site, telling it to publish to a specific folder, which it did. However, its translation of the paths are making it look for the web_resources folder under the root folder of the domain, and not the root of the defined folder.

for example: If I publish my site to MyServer to a specific folder called “MySite” the public would access it via http://MyServer/MySite/

Publishing put all of the web_resources fold under the specified MySite folder, which makes sense.

however, when then viewing the source of a published page, its paths to the web_resources files are looking for a web_resources folder under the root domain, instead of within the specified “MySite” folder.

i.e it is currently putting the path like this.: …href="/web_resources/themes/mytheme/mytheme_theme.css"

Since it’s got the beginning " /", it tells it to look under the domain root. what it should have the path translated to is:

i.e.: …href="/MySite/web_resources/themes/mytheme/mytheme_theme.css"

Paul,

To ensure I understand correctly, are you trying to publish a website into a subfolder of another website? The reason the path is mapped relative to the host “/” is because CM1 publishes out websites as the main site, not as subfolders.

Yes, this is correct.

If you’re going to publish the web_resources folder under a user determined folder, then you can’t have the paths always pointing to the root of the host since CM1 is no longer publishing the web_resources to the root of the host…

so basically CM1 is assuming, no matter what folder a user specifies, that their host server is setup so that its root domain points specifically to that folder?

Also, we’re doing this for testing to a development web server that already houses other development websites.

Paul,

Yes, CM1 is designed to behave as though your site’s published folder – even one defined manually – is the root folder being referenced by your web server. In addition to the web_resources issue you raised, all managed links (links created in the Navigation widget or the Rich Text widget, for instance) in CM1 are relative to the root of the site. If you’re using CM1 for subsections of your site, you might consider configuring your web server to serve the CM1 folder as a sub domain (e.g. cm1site.mydomain.com).

Alternately, I would recommend creating an Idea topic on here requesting the ability to publish your CM1 site to a subfolder off of your server’s root folder, and have references to your theme folder and managed links adjusted accordingly. I could see this idea gaining support from other customers.

Another method you could use would be to publish CM1 to your web server’s root folder, but build out your entire site off a /MySite/ folder in CM1. This way the web_resources folder will get published to your server’s root, but all other content will land in the /MySite/ folder, and managed links and JS and CSS references will resolve properly.

@NathanielW, @Daved

Thanks for the insights. The more I thought about it, the more I realized I’m not going to worry about it right now. Long term I’m going to push for a stand-alone web server solely used for a production/published environment anyways.

i do appreciate your responses though.

Is there any reason why web resources would not publish with a full publish? I updated a style sheet to fix the way a horizontal list displays in Chrome and it worked in CM1. On the live site neither the horizontal list nor the style sheet changed. Web resources did not show up in the publish report.

Alanda,

Content within web_resources will not appear in the publishing report, even the content there does go through successfully. Was the full publish job marked as “Completed” without any errors? Also, can you ensure that your browser’s cache was cleared before reloading your live site?

In our 4.1 release, we will have incremental publishing which will allow you to publish only those pages that have changed since your last publish. As part of incremental publishing, web resources will be published. Effectively this will give you the ability to edit a single page or asset and then it, along with web resources will be published.  

Great to hear. will use it often.