Could not find or create a social forum here

Could not find or create a social forum here

Adrien Theetten -
Erantzun kopurua: 6
Hello !

I added a new course with the informel display, then I opened it and I had this problem:
It is diplayed "Could not find or create a social forum here" in red letters, and everytime I reload this page, a new forum without any name is added to activities.

Thank you for any help !
Puntuazioen batez bestekoa: -
Adrien Theetten(e)ri erantzunda

Re: Could not find or create a social forum here

Martin Dougiamas -
Core developers-ren irudia Documentation writers-ren irudia Moodle HQ-ren irudia Particularly helpful Moodlers-ren irudia Plugin developers-ren irudia Testers-ren irudia
It sounds like you have a not-quite-complete version of Moodle, or an old version that is not completely upgraded. What version(s) are you using?
Martin Dougiamas(e)ri erantzunda

Re: Could not find or create a social forum here

Adrien Theetten -

I'm using the 1.0.8.1 version ...

It seems the script tries to create the social forum when the page is loaded and fails, adding a new forum without any parameter...

Martin Dougiamas(e)ri erantzunda

Re: Could not find or create a social forum here

Le Thieis Yann -
I got the same problem with moodle v1.0.8.1 (and the precedent version).
I didn't have any problem during installation and i have no other problems with Moodle.
The only consequence of "Could not find or create a social forum here" is a multiplicity of empty forum which doesn't really exist!
Le Thieis Yann(e)ri erantzunda

Re: Could not find or create a social forum here

Martin Dougiamas -
Core developers-ren irudia Documentation writers-ren irudia Moodle HQ-ren irudia Particularly helpful Moodlers-ren irudia Plugin developers-ren irudia Testers-ren irudia
Could you or Adrien try a recent nightly version? (it's available from the download page).

It might be better not to upgrade your 1.0.8.1 version, but to set it up separately on the same machine.

I've got a feeling this might have been fixed a while ago, but I'm not sure. Does this bug still occur for you when using the nightly?
Martin Dougiamas(e)ri erantzunda

Re: Could not find or create a social forum here

Le Thieis Yann -
I have studied a little bit the php code of moodle, mainly to trace the problem of no creation of a social forum.

My analyse to fix this problem is that:

During the creation of the social forum in the function:

forum_get_course_forum()
in moodle_path/mod/forum/lib.php

call to the function:

insert_record()
in moodle_path/lib/datalib.php

call to the db object method:

Execute()
in moodle_path/lib/adodb/adodb.inc.php

call to the method:

_query()
in moodle_path/lib/adodb/drivers/adodb-mysql.inc.php

call to the php library function:

mysql_query()

rem: yes, we use mysql for the database begi-keinua

it's where i point the problem by testing the same SQL command with mysql shell client:

In the SQL command:
INSERT INTO forum (course,type,name,intro,...) values (...);
we have the string "Un forum ouvert pour discuter à propos de n'importe quoi" for the field 'intro'.

That string is the problem because of the apostrophe in it ("n'importe").

I resolved my problem by changing the traduction in french of the english sentence (without apostrophe).

In SQL commands the string are quoted by apostrophes, so in a sentence with an apostrophe we add a backslash to it. But i can't do that with the traduction in french in forum.php (where we can edit and compare the traductions). I can't add a backslash there!

Another point is that there are another sentences with backslash which don't seem to cause any problem...