After upfrading to 1.8: categories deleted or entry uncategorized

After upfrading to 1.8: categories deleted or entry uncategorized

by Đinh Lư Giang -
Number of replies: 16
Hi,

After upgrading into 1.8, most of my glossaries have categories erased. In one glossary, all entries which are edited becomes uncategorized instead of its original category. There must be something wrong with categories. Could someone help ? A language site becomes useless without glossaries or dictionaries.

Dinh Lu Giang
http://vietcourses.com
http://vietnameseonline.net



Average of ratings: -
In reply to Đinh Lư Giang

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Dinh,

I've been testing glossary categories, assigning them to entries and re-editing them and everything seems to be working ok.

I'm running Moodle 1.8+ here.

Have you tried repairing all the glossary* tables in your DB? That could cause problems is something is failing at that level.

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Đinh Lư Giang -
Dear Eloy
Thanks for your reply. I installed another Moodle 1.8 using Fantastico and tested glossary categories. The problem is the same for the new installation. I think I may come from my server.

When I check my server's environment for Moodle, the result is like this:

Name Information Report Status
unicode
is required to be installed/enabled. Check
database mysql version 4.1.16 is required and you are running 4.1.21 OK
php
version 4.3.0 is required and you are running 4.4.3 OK
php_extension iconv is recommended to be installed/enabled Check
php_extension mbstring is recommended to be installed/enabled OK
php_extension curl is recommended to be installed/enabled OK
php_extension openssl is recommended to be installed/enabled OK
php_extension tokenizer is recommended to be installed/enabled OK

May the highlighted "checks" cause that issue ?

Kind regards

Giang
http://vietcourses.com
http://vietnameseonline.net

In reply to Đinh Lư Giang

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Dinh,

Moodle 1.8 requires to be installed over one 'UTF-8' database. The environment check above seems to say that your database hasn't been created with that default encoding.

Using one normal Moodle installation such status should show one "forbid" message stopping the process completely. I really don't know how "Fantastico" performs its magic job but DB seems to be created with an incorrect encoding.

Such incorrect encoding could be (though I'm not 100% sure) the cause of your problems, so I would suggest you to try installing into a new, utf-8 database to see if the problem disappears.

Also, it seems that Fantastico builds its packages based on Moodle releases and that causes not being 100% updated. I would suggest to use the latest 1.8+ available to install/test the glossary categories behaviour.

Finally, I think that the missing "iconv" problem shouldn't be a problem at all because if it isn't present, "mbstring" should do the job perfectly. Anyway, if you can enable it, better.

Hope this helps, ciao smile
In reply to Eloy Lafuente (stronk7)

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Đinh Lư Giang -
Dear Eloy
Thanks for your time. smile

I used phpmyadmin to change my database into unicode, and the unicode showed Ok instead of Check. But the problem persists.

I discovered that when I edit an entry, only the Concept can be changed, and the definition returns to the old values after "Save change" button is clicked.

In case I create a new entry, the definition is OK but the category is always uncategoried. sad

Giang




In reply to Đinh Lư Giang

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Rob Monk -
I am getting the same problem and have just made a post about it!!
In reply to Eloy Lafuente (stronk7)

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Matthew Klein -

I am having the same problem with glossary categories.  Here is some info about what we're running here:

Linux Version: CentOS 4.4
Database:       MySQL 4.1.20
Moodle: 1.8
PHP Version: 4.3.9

Also our Sysadmin is saying that in the log file there are a lot of error entries that read "Course Module ID was incorrect." Is there a specific error log I can send that would be helpful in finding the problem?

In reply to Matthew Klein

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Jacob Williams -
I had same problem and I looked at edit.php. Line 130 has a foreach that was never being entered because the $fromform->categories was a single scalar value. Commented that out and did an assignment that only works for one category:
if (empty($fromform->notcategorised) && isset($fromform->categories)) {
 $newcategory->entryid = $e;
 //foreach ($fromform->categories as $category) {
 // if ( $category > 0 ) {
 // $newcategory->categoryid = $category;
 // insert_record("glossary_entries_categories", $newcategory, false);
 // } else {
 // break;
 // }
 //}
 if ( $fromform->categories > 0 ) {
 $newcategory->categoryid = $fromform->categories;
 insert_record("glossary_entries_categories", $newcategory, false);
 }
 }
In reply to Jacob Williams

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Matt Campbell -
Jacob,

Could you give me a bit of clarification ~ does this allow for only one category per term or one category per glossary?

Thanks,

Matt
In reply to Matt Campbell

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Jacob Williams -
One category per term.

In my PHP4 environment the category select box displays as a single select, so only one can be chosen anyway. Most likely the real fix will fix the select box so that more than one can be selected per term, but I haven't had the time to troubleshoot the form code, and I am not on the development team so that is their call. In the mean time my little fix will let you select a single category per term. In my application thats fine. I would bet the problem here is affecting other forms in the system, but I haven't noticed any yet. I don't use that many modules.

If you have a glossary with terms that have more than one category already assigned, this fix will not prevent them from being messed up. It may cause them to have no category, or one category after editing, I don't have a simple way to test it in that case.

-Jacob
In reply to Đinh Lư Giang

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Juraj Chlebec -
Here is working solution:

Problem in edit_form.php. Line 38.
Change $categoriesEl = $mform->... to $categoriesEl =& $mform->

From: http://tracker.moodle.org/browse/MDL-9599#action_31747

In reply to Juraj Chlebec

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Rob Monk -
Will this allow the body of the glossary entry to be updated. At present students can only change the subject part of the glossary.
In reply to Rob Monk

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Jacob Williams -
This particular fix does not address that issue. Is there an entry in the bug tracker for that problem?
In reply to Juraj Chlebec

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Andrea Gregory (Gordon) -

Juraj,

Where is the edit_form.php???

I only have editcategories.php and edit.php.......... ??

I'm looking in mod/glossary, is that the wrong location???

Thanks,

Andrea

In reply to Andrea Gregory (Gordon)

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Matt Campbell -
I know we conversed on this some in MDL-9599, but let's look at it here and see if we can get some more eyes on it. Could you possibly send a screen shot with filenames and dates so we could take a look at what you've got?

Thanks,
Matt
In reply to Matt Campbell

Re: After upfrading to 1.8: categories deleted or entry uncategorized

by Andrea Gregory (Gordon) -

Brilliant - thank you wink

Ok... just accessed by ftp to get the actual code of edit.php etc and edit_form.php suddenly appeared!! surprise It hadn't been visible for some reason when accessing by secure shell..... strange why that would be. Anyway - problem solved! big grin Thanks Matt.

Andrea wink