Here is my code:
function mymod_menu(){ $items['front'] = array( 'title' => '', 'page callback' => 'mymod_homepage', 'type' => MENU_NORMAL_ITEM, 'access callback' => 'user_access', 'access arguments' => array('View published content'), ); return $items; }
and anonymous users have "View published content" checked off. With or without the "access callback" line, I get access denied for the home page for anon users. I am confused as to why. What am I missing here?
Thank you, Fred
You can try 2 things
1. Try removing access callback and let the default functionality take over. Flush caches and then see if this works. 2. there is less possibility, but have you used drupal_access_denied in your function, if so, is any condition going wrong ?
On Sun, May 6, 2012 at 6:43 PM, Fred Jones fredthejonester@gmail.comwrote:
Here is my code:
function mymod_menu(){ $items['front'] = array( 'title' => '', 'page callback' => 'mymod_homepage', 'type' => MENU_NORMAL_ITEM, 'access callback' => 'user_access', 'access arguments' => array('View published content'), ); return $items; }
and anonymous users have "View published content" checked off. With or without the "access callback" line, I get access denied for the home page for anon users. I am confused as to why. What am I missing here?
Thank you, Fred -- [ Drupal support list | http://lists.drupal.org/ ]
- Try removing access callback and let the default functionality take over.
Flush caches and then see if this works.
Tried that many times--doesn't help.
- there is less possibility, but have you used drupal_access_denied in your
function, if so, is any condition going wrong ?
Nope, Here is my function:
function mymod_homepage(){ return 'test'; }
:(
Try changing the name of the callback too from front to anything like your name front is used in drupal as <front> to refer to front page.
On Mon, May 7, 2012 at 5:50 PM, Fred Jones fredthejonester@gmail.comwrote:
- Try removing access callback and let the default functionality take
over.
Flush caches and then see if this works.
Tried that many times--doesn't help.
- there is less possibility, but have you used drupal_access_denied in
your
function, if so, is any condition going wrong ?
Nope, Here is my function:
function mymod_homepage(){ return 'test'; }
:(
[ Drupal support list | http://lists.drupal.org/ ]
Try changing the name of the callback too from front to anything like your name front is used in drupal as <front> to refer to front page.
Yes but front is not used in Drupal as a URL anywhere. I have used front as URL in other menus as well and it works fine. I tried your idea anyway and it doesn't help.
Fred
On Mon, May 7, 2012 at 8:41 AM, Fred Jones fredthejonester@gmail.com wrote:
Try changing the name of the callback too from front to anything like your name front is used in drupal as <front> to refer to front page.
Yes but front is not used in Drupal as a URL anywhere. I have used front as URL in other menus as well and it works fine. I tried your idea anyway and it doesn't help.
The access argument isn't 'View published content' but instead is 'access content'. The 'View published content' is the 'title' of 'access content'. See modules/node/node.module for the hook_permmission implementation.
The access argument isn't 'View published content' but instead is 'access content'. The 'View published content' is the 'title' of 'access content'. See modules/node/node.module for the hook_permmission implementation.
I could have sworn I tried that also and it failed. But I did it now and it worked. That was it. Thank you very much, sir!
Fred
Folks: Where should I look to disable fields where ckeditor does not load. I'm on Drupal 7 and I want to disable ckeditor for comments. This was easy in Drupal 6, but I've searched all over and can't find the place to set this.
Help. Bill
Prothero William waprothero@gmail.com
Are you using the CK Editor module or the WYSIWYG.
I use WYSIWYG module and it is easy to do what you want.
Shai
On May 7, 2012, at 6:53 PM, Prothero William waprothero@gmail.com wrote:
Folks: Where should I look to disable fields where ckeditor does not load. I'm on Drupal 7 and I want to disable ckeditor for comments. This was easy in Drupal 6, but I've searched all over and can't find the place to set this.
Help. Bill
Prothero William waprothero@gmail.com
-- [ Drupal support list | http://lists.drupal.org/ ]