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.

Data Model Questions /

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

extended modeladmin and now the keep getting redirected to admin


Go to End


3 Posts   3372 Views

Avatar
mschiefmaker

Community Member, 187 Posts

29 May 2009 at 4:43pm

Edited: 29/05/2009 4:46pm

Hi
I am new to modeladmin so I used the example in the docu and flushed the database now all that happens is that when I try to login I keep getting redirected back to the admin page with the message "Redirecting to .../Silverstripe/login#memberLoginForm LoginFormTab...(output started on var/www/SilverStripe/html/SilverStripe/mysite/code/MyCatalogAdmin.php, line 11" Line 11 is the ?> line

If I remove the extension

<?php

class MyCatalogAdmin extends ModelAdmin {
protected static $managed_models = array(
'Product',
'Category'
);
static $url_segment = 'products'; // will be linked as /admin/products
static $menu_title = 'My Product Admin';

?>

the problem goes away.

Any ideas what I am doing wrong?

Thanks

MM

Avatar
mschiefmaker

Community Member, 187 Posts

30 May 2009 at 8:43pm

Completely recreating the MyCatalogAdmin.php file got rid of the problem. Can't say I uderstand how but I don't care cause now I finally get to really make something happen :-)

Avatar
Hamish

Community Member, 712 Posts

5 June 2009 at 4:35pm

Sounds like you might have had white-space after the ?> tag.