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.

Archive /

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

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

Module Forum 0.1.2 needs MYSQL5


Go to End


6 Posts   2892 Views

Avatar
zyko

Community Member, 66 Posts

21 March 2008 at 11:37pm

Edited: 21/03/2008 11:40pm

I did an Update from Forum 0.1.1 to the newer version.
I get Errors on MYSQL 4.1.22
that tell something abot 'invalid GROUP statements'.

The requiremnets for Silverstripe say MYSQL 4.1
so there should be no MYSQL5 specific code i think...

I didn't look at the details much more, am a novice in silverstripe.
maybe someone can check this?

BTW: would be fine to have seperate forums to discuss about things concerning
modules or themes.
Try to find something with a query about 'forum', and you see what i mean

*g
Helmut

Avatar
Ingo

Forum Moderator, 801 Posts

29 March 2008 at 4:27pm

modules don't necessarily need to have matching requirements to the core, in the end its just a missing "minimum requirements" note for the forum module.

good point with your search for a "forum" keyword, this would be more efficient when limited to a specific "modules" forum - although we're trying to avoid a too fragmented forum structure. what do other people think?

Avatar
mage

Community Member, 10 Posts

7 May 2008 at 2:00am

I think sections would be a lot easier to search as well. So hard to find information at the moment.

Avatar
zyko

Community Member, 66 Posts

7 May 2008 at 2:27am

Edited: 07/05/2008 2:30am

YEAH, to find something in Silverstripe forums
is sometimes hard.
Would be fine if there was only ONE result shown for a 'thread' if one post of the thread meets the query. and not any post of the thread, that meets the search criteria...

BTW: if anyone is interested:
I did a replacement of Forum.php function Topics()
with 'the old version' of this function and things are ok for now.

	function Topics() {
		if(Member::currentUser()==$this->Moderator()) {
			return DataObject::get("Post", "ForumID = $this->ID and ParentID = 0 and (Status = 'Moderated' or Status = 'Awaiting')");
		}
		return DataObject::get("Post", "ForumID = $this->ID and ParentID = 0 and Status = 'Moderated'");
	}

the new function
	function Topics() {
		if(Member::currentUser()==$this->Moderator() && is_numeric($this->ID)) {
			$statusFilter = "(`Post`.Status IN ('Moderated', 'Awaiting')";
		} else {
			$statusFilter = "`Post`.Status = 'Moderated'";
		}
		
		if(isset($_GET['start']) && is_numeric($_GET['start'])) $limit = Convert::raw2sql($_GET['start']) . ", 30";
		else $limit = 30;
			
		return DataObject::get("Post", "`Post`.ForumID = $this->ID and `Post`.ParentID = 0 and $statusFilter", "max(PostList.Created) DESC",
			"INNER JOIN `Post` AS PostList ON PostList.TopicID = `Post`.TopicID", $limit
		);
	}

seems to be better in showing the latest reply on articles in front of the thread, but it worked without this in former versions.
And maybe someone can do this correct for older my-sql versions in future versions...

Avatar
Ingo

Forum Moderator, 801 Posts

7 May 2008 at 10:02am

hey zyko - great to hear you made this functionality mysql4 compatible - can you provide your changes as a patch? http://open.silverstripe.com/#Submittingpatches
cheers

Avatar
zyko

Community Member, 66 Posts

7 May 2008 at 7:37pm

Edited: 07/05/2008 7:37pm

Hi Ingo,
Sorry to say, i only did a 'switch-back' to old functionality.
this is no 'patch'.
this means, patching with this code, would lead to
loosing the new abilitys, the new forum version has...

g
Helmut