Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » SS 3.0.5 Static Publisher Redirecting to Security/Login

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

Page: 1
Go to End
Author Topic: 290 Views
  • B00mtastikā„¢
    Avatar
    Community Member
    18 Posts

    SS 3.0.5 Static Publisher Redirecting to Security/Login Link to this post

    Hello Stripers,

    After days of trying to find out why Static Publisher wasn't working for me, I came to a theory. Now, this is to confirm if my theory is correct because I'm not familiar with Publisher, and if it is confirmed, is there a way around it.

    I've done everything according to the documentation. Adding the settings to config.php as well as the methods to Page.php. Now the .htaccess Rewrites took me a while to mess around with because to see the example files were no longer available due to the migration from Trac to Github. When going to Github, those were the docs being outlined and readied for SS 3.1. I assumed that it shouldn't change too much from what research I did to find most of the .htaccess Rewrites seemed unchanged from the forums. So tried those. Cache folder was created and the entire structure was created into cache in html format via the rebuild cache url in /dev/. Then only to find that each file in the structure had only a meta tag with refresh back to Security/Login and I could not for the life of me figure out why...

    Until it dawned on me. This is a company Intranet I'm working on. And it needs to be NOT public, but accessible from anywhere in New Zealand. So the pages are accessible by logged in users only and even then some group permissions are applied.

    Now am I correct in assuming this is why Static Publisher was only spitting out that meta refresh tag? I manually went in and changed the html file to say different things for different html pages, so the Rewrite rules were working just fine. Just not outputting the actual site content. I figured that static sites (because of their static nature) wouldn't be able to keep track of who's logged in and who is not.

    If I am correct in this assumption, is there a way around it? Creating static content for logged in users? Or will each request hit the database dynamically to check for logged in users and group permissions?

    Would Partial Caching be the way to go for this instead then?

    Thank you in advanced for whatever help provided.

    -b00mer

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: SS 3.0.5 Static Publisher Redirecting to Security/Login Link to this post

    Static caching doesn't work if you need to login to the page. Partial caching is the way to go.

    290 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.