Jump to:

5520 Posts in 1734 Topics by 1223 members

Customising the CMS

SilverStripe Forums » Customising the CMS » FilesystemPublisher $static_base_url woes

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1384 Views
  • sychan
    Avatar
    Community Member
    5 Posts

    FilesystemPublisher $static_base_url woes Link to this post

    Hello,
    I've been working with the FilesystemPublisher and the RsyncMultiHostPublisher and have come across a problem that I am hoping has an easy answer.

    I am able to generate the static html files fine with a /dev/buildcache, however I would like to deploy the files on a machine with a different base_url. When the files are coped to another host, the base_url specified in all the pages still refer to the original host. From the API docs, the FileSystemPublisher::set_static_base_url() function would seem to do the right thing.

    When I set this, all the links in the static files point to the right place, but the content portion of every page simply contains a "Page not found" error. It looks like when it goes to fetch the page to write to the cache, the static_base_url setting is screwing things up.

    Has anyone else come across this? Is there something that I am missing about the proper way to use this?

    Thanks,
    Steve

  • sychan
    Avatar
    Community Member
    5 Posts

    Re: FilesystemPublisher $static_base_url woes Link to this post

    Nobody seems to have replied, and after examining the code, I can't see how the static_base_url setting could work at all. Every time it is set to something other than the proper value, the URL's are properly rewritten however the content of the page is always "Page no found". So it looks like the functionality became broken sometime between 22/10/08 when it was introduced for the DNC site, and now. Maybe it worked fine in SS 2.2.1?

    I've modified the FilesystemPublisher module to do a very simple string replace on the old baseUrl to the new one, if a static_base_url is defined. Does anyone have a better way to get this functionality to work?

    Steve

    1384 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.