Thanks for a great module.

When an anonymous or authenticated user tries to access the page drupalit/hottest through the more.. link on the Hottest block the user gets an access denied message. If I access the same page through the admin account the page loads OK.

I have set all the permissions in user/permissions to on for all of drupalit except administer drupalit.

Am I missing something or is this a bug / feature, I am quite new to Drupal so it could well be me.

Thanks

Andy

Comments

jacr’s picture

It looks like a bug.

kalm’s picture

Category: support » bug

Thats what I was afraid of.

Unfortunately I know very little PHP and have never hacked drupal code before so I dont know where to start looking for this bug.

I hope someone can issue a patch or something.

Thanks

Andy

marcus0263’s picture

Category: bug » support

Yep same problem here with Drupal-6.6

jacr’s picture

Try this:

Open: drupalit.module
search: function drupalit_menu() {

Find:
$items['drupalit/hottest'] = array(
'title' => variable_get('drupalit_block_page_title_1', t('Drupalit hottest')),
'page callback' => 'drupalit_hottest_page',
'access callback' => 'user_access',
'type' => MENU_CALLBACK,
);

Edit to:
$items['drupalit/hottest'] = array(
'title' => variable_get('drupalit_block_page_title_1', t('Drupalit hottest')),
'page callback' => 'drupalit_hottest_page',
'access callback' => 'user_access',
'access arguments' => array('view users voting page'),
'type' => MENU_CALLBACK,
);

This is for drupalit/hottest

For drupalit/daily, drupalit/weekly...
Edit like drupalit/hottest

Then upload drupalit.module
Go to admin/settings/performance
Empty Cache

kalm’s picture

Thanks Jacr,

That works great.

Andy

kalm’s picture

Status: Active » Fixed
apanag’s picture

I saw the post now and the solution is exactly what jacr said.

I am going to added it, in the next version.

Thanks jacr!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

HS’s picture

I have the same issue using Drupal 6.8 and Drupalit 6.x-1.2. I added the code above as jacr suggested but still no use only the admin/ super user /user 1 can access any statistics. I have given permissions for all to access drupalit statistic, view custom block page,view drupalit and view users voting page. What am i doing wrong?

Thanks!

HS’s picture

Component: User interface » Code
Status: Closed (fixed) » Active
HS’s picture

Guys I went through jacr's method above again step by step. And it worked! Thanks! Now another issue. I have also set permissions for anonymous users to vote but it still displays the login button to anon users.

apanag’s picture

Status: Active » Fixed

Fixed as of version 1.4

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.