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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Admin errors


Go to End


4 Posts   1692 Views

Avatar
steveo

Community Member, 4 Posts

27 October 2010 at 9:26am

I'm new to silverstripe and I picked up a website that had already been built (always interesting), I managed to make changes to the ss files and get the new design working as well as the new navigation, however I added myself to the admin users and ever since I did that the log-ins don't seem to be working and I'm pretty sure that the admin url has changed. The url used to be mydomain.com.au/admin, but now when I type that in it goes to mydomain.com.au/Security/login?BackURL=/admin/ and when I log-in on this page with the correct details it goes to: http://www.mydomain.com.auhttp//www.mydomain.com.au/Security/login#MemberLoginForm_LoginForm_tab, which clearly can't be right and I got an oops message from google chrome.....

Does anyone have any suggestions?

Avatar
Ryan M.

Community Member, 309 Posts

27 October 2010 at 2:39pm

The ?BackURL part is normal, as it tells the login form to redirect you back to the admin area after you login.

Can you describe what you see on the page after attempting to login? You talk about the URLs, but not what you see on the page. That'd help.

Also, if you know how, set your site to dev mode in order to see any errors that might be coming up.

Avatar
steveo

Community Member, 4 Posts

29 October 2010 at 4:29pm

Hi Ryan,

Thanks for your email, this is what I'm seeing:

http://www.tapssa.com.au/login.jpg (developer code below)

http://www.tapssa.com.au/error.jpg (looked the same in dev mode)

I quickly set the site to developer mode, went to the login page can copy/pasted the code below then set it back to live. Please see below.

FATAL ERROR: preg_match() [function.preg-match]: Unknown modifier ']'
At line 253 in /home/tapssa/public_html/sapphire/core/control/Director.php

preg_match(/^(http[^:]*:\/\/[^/]+)\//1,http://www.tapssa.com.au/,)
line 253 of Director.php

Director::protocolAndHost()
line 245 of Director.php

Director::absoluteURL(Security/login)
line 272 of Security.php

Security->login(Array)
line 261 of Controller.php

Controller->run(Array)
line 104 of Director.php

Director::direct(Security/login)
line 158 of main.php

Context

--------------------------------------------------------------------------------

Debug (Debug::showError() in line 180 of Debug.php)
matches =

FATAL ERROR: preg_match() [function.preg-match]: Unknown modifier ']'
At line 253 in /home/tapssa/public_html/sapphire/core/control/Director.php

preg_match(/^(http[^:]*:\/\/[^/]+)\//1,http://www.tapssa.com.au/,)
line 253 of Director.php

Director::protocolAndHost()
line 245 of Director.php

Director::absoluteURL(/Security/login?BackURL=%2Fadmin)
line 209 of SSViewer.php

SSViewer->process(ViewableData_Customised)
line 763 of ViewableData.php

ViewableData->renderWith(Page)
line 310 of Security.php

Security->login(Array)
line 261 of Controller.php

Controller->run(Array)
line 104 of Director.php

Director::direct(Security/login)
line 158 of main.php

Context

--------------------------------------------------------------------------------

Debug (Debug::showError() in line 180 of Debug.php)
matches =

Avatar
inkubux

Community Member, 11 Posts

29 October 2010 at 10:38pm

Do you have the variable $BaseHref inside your main Page.ss template ?