Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Form Questions /

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

Security_login.ss not working on all logins


Go to End


6 Posts   2224 Views

Avatar
macka

Community Member, 33 Posts

24 September 2014 at 5:06pm

Hi there,

I developed a module, and it requires a login. I would like to change the link on the login form to include another link, i didn't want to include this with my module, its more about the site i've developing for. So as a result i put the Security_login.ss in the theme template directory. So it's just going to do my template like this.
However, it seems to work with another login link i have for the site. Just when it displays the loginform for my module, it reverts to the original and not to the custom made one.

I changed the template variable to $Form from $LoginForm. And it just stops displaying the form altogether. But with just the $LoginForm it displays as per usual.

Just wondering if i needed to add anything?

Grant

Avatar
Willr

Forum Moderator, 5523 Posts

26 September 2014 at 12:21pm

Security_login is only used when you go to Security/login in the URL. If you have a login form through $LoginForm on another page then you'll need to provide a custom theme for that page (whatever it would be).

Avatar
digibrains

Community Member, 130 Posts

16 October 2014 at 11:46am

Edited: 16/10/2014 11:47am

Sorry to hijack this thread...but I really am having an issue with Security_login.ss not working. See screenshot. I have a Layout for this page, but when I go to mysite.com/admin SilverStripe is preferring to use Page.ss instead. I tried adding a silverstripe-cache directory to forcefully rebuild the cache, but still prefers Page.ss. Any idea?

Avatar
macka

Community Member, 33 Posts

16 October 2014 at 11:51am

Hi Prawnstar,

Did you try doing a /dev/build?flush=1 ? or a ?flush=1 on your page.

Avatar
digibrains

Community Member, 130 Posts

16 October 2014 at 11:57am

I swear I did that! I swear I did! But the fact that it works now proves I didn't. (Red face)

Thanks, it works now. Nothing to see here...

Avatar
macka

Community Member, 33 Posts

16 October 2014 at 11:58am

yeah - that happens to me a lot too. I end up doing something drastic on the page if i think it's not working, so i can visably see the change and then decide its not working :)

glad tht helped.