Site News (You do not have permissions to view this post)

Site News (You do not have permissions to view this post)

by Steve Hyndman -
Number of replies: 13

Hello Moodlers,

I'm making some changes and upgrades on my site during the break and I'm experiencing a strange problem with my site news. I'm showing the latest news block on the frontpage of my site. When a person clicks on the "more..." link under a headline who is NOT logged in either as a registered user or a guest, they get a page that reads "You do not have permissions to view this post". The problem only occurs if the user is not logged in.

There are two things to note:

1. I've just decided to start using the site news again after about 6 months of not using it. You can see that I posted three things today and prior to that the last post was back on Sep 2nd.

2. Yesterday I upgraded to the latest version of Moodle...1.5.3+

The site is www.ekuprofessor.com and the news is at the lower-right.

I have a second site that I maintain for our University Model School with site news and it is working fine...I haven't upgraded that site yet...still running 1.5.2+. I've checked all the administrator settings I can think of and have even compared default settings in the databases for the forums...everything looks the same.

I have done some hacking to the code in the past, but only minor stuff that shouldn't impact the forums. So, I don't know if I'm just missing something simple, if I messed this up months ago and just didn't realize it, or if this is a result of the upgrade.

Any suggestions would be appreciated.

Steve

Average of ratings: -
In reply to Steve Hyndman

Re: Site News (You do not have permissions to view this post)

by N Hansen -
I noticed the 1.6 code now allows news items to be restricted to certain dates. I don't know if this was in 1.5.3 as well or whether that would explain what is happening to you.
In reply to N Hansen

Re: Site News (You do not have permissions to view this post)

by Steve Hyndman -

Thanks...I have a 1.6 test install here: http://www.ekuprofessor.com/moodle16/

The date restriction isn't in 1.5.3 like in 1.6....this will be a nice addition.

I actually copied my production database to use with my 1.6 install and the news forum works fine in 1.6. It just makes me wonder if the problem is in the 1.5.3 codebase...maybe someone else can verify that they either have or don't have the problem. I'm using the 1.5.3 latest stable branch downloaded a couple days ago.

Steve

In reply to Steve Hyndman

Re: Site News (You do not have permissions to view this post)

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I have logged in at your site as guest and I can't read the news either mixed

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Site News (You do not have permissions to view this post)

by Steve Hyndman -

Thanks Inaki...you are right. I can't view the news as guest either...my mistake. I can only view it when logged in as a regsitered user.

Ever have that feeling that you are missing something simple?...I'm feeling that way about now smile. It must be a simple setting somewhere.

Steve

In reply to Steve Hyndman

Re: Site News (You do not have permissions to view this post)

by Jon Bolton -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Steve - the same problem occurs when trying to read the site news on www.moodle.org when you are not logged in or if you are logged in as a guest. And I upgraded to 1.5.3 on my own site today, and the problem is also occurring there. I hadn't noticed until I read your post, so thanks for that smile

I've filed Bug 4521
In reply to Jon Bolton

Re: Site News (You do not have permissions to view this post)

by Steve Hyndman -

I did a temporary fix on my site by taking the discuss.php file (found in moodle/mod/forum directory) from my old 1.5.2 site and replacing the one in the new 1.5.3 site with it. Things seem to be working now and I haven't noticed any bad side-effects......yet smile

Steve

In reply to Steve Hyndman

Re: Site News (You do not have permissions to view this post)

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The side-effect is that with the old code, users can see posts they are not supposed to be able to see. Other than that, no bad side-effects that I know of.

Saludos. Iñaki.
In reply to Iñaki Arenaza

Re: Site News (You do not have permissions to view this post)

by Yu Zhang -
Hi and thanks to everyone, this should be fixed now. If forcelogin is not set, all site level forums are visible to everyone.

Yu
In reply to Yu Zhang

Re: Site News (You do not have permissions to view this post)

by Stuart Mealor -
Hi Yu
- When you say 'this should be fixed now' do you mean in the daily Moodle build?
e.g. have to install new version?
I checked our Forcelogin is not set, but still appear to have the same problem
- could be browser / cache, etc. so I'll check this also
Stuart
In reply to Stuart Mealor

Re: Site News (You do not have permissions to view this post)

by Yu Zhang -
Hi Stuart,

- Yes, it's fixed in the daily build. You don't really have to do a fresh installation. If you use CVS, a CVS update would do, or you can simply replace/modify the file with the fixed version (/mod/forum/lib.php).
- Please let me know if it's not working, the forums in moodle.org is working though wink

Cheers,

Yu
In reply to Yu Zhang

Re: Site News (You do not have permissions to view this post)

by Steve Hyndman -

Yes, that seems to have fixed the problem Yu....thanks.

Steve

In reply to Yu Zhang

Re: Site News (You do not have permissions to view this post)

by Stuart Mealor -
Yes, worked perfectly Yu
Thanks, Stuart
In reply to Yu Zhang

Re: Site News (You do not have permissions to view this post)

by Stuart Jones -
I just realised my site has the same problem... I had upgraded over christmas, and not realised the problem.

I had been just working along thinking anyone could read the news and the open forums on the main page...

I have now replaced the lib.php file and it works like a charm.

Thanks!

Stuart Jones.