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.

Archive /

Our old forums are still available as a read-only archive.

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

Blog post author not showing up by default and the dropdown is MASSIVE


Reply


3 Posts   2567 Views

Avatar
Decisive Flow

Community Member, 73 Posts

22 November 2006 at 11:36am

blogentry.php has:
static $has_one = array(
      "Author" => "Member",
   );

which I take to mean the author is the member who is signed in. - but the dropdown remains blank until you select an author. Should I remove the dropdown to have it assigned by default?

Also...

I think because we fiddled with the forms and now we have 180 newsletter signups, they all appear in the dropdown, but since they have no names, they are all commas - so even though they have no access to the cms, or admin rights, they are still showing up.

On the flip side, we have three admin members, and only one shows up.

Avatar
Decisive Flow

Community Member, 73 Posts

5 December 2006 at 9:57am

any updates on this?

i am a registered administrator but my name doesnt show up ont he author list, yet all the newsletter signups who arent even authors are showing up...

very weird!

Avatar
Simon

Core Development Team, 27 Posts

12 December 2006 at 9:34am

The relationship you've specified below is simply a relationship between a page and a member. By default it won't use the currently logged in member as thats a pretty big security risk.

However you can specify the default author to be the current member which would give you the functionality you required.

to do this, define a static variable called $defaults. eg:

static $defaults = array(
"Author" => Member::CurrentMember()->ID,
);

Put a filter on the dropdown like by group when your making it in getCMSfields() in the CMS, that should solve your problems with the large drop down.