A required parameter (id) was missing

A required parameter (id) was missing

by Sebastian Netta -
Number of replies: 11
what does that mean?
I updated my moodle to 1.9.4
since then I get this message trying to get into the glossary

Thanks for any suggestions
Average of ratings: -
In reply to Sebastian Netta

Re: A required parameter (id) was missing

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Where is the link are you clicking to try to get into the glossary? What is the URL that it goes to?
In reply to Tim Hunt

Re: A required parameter (id) was missing

by Sebastian Netta -
Hi Tim
I will try to be more precise: (it was very late yesterday)
I can open the glossary and make a new entry.
When I want to save it the error message occurs:
A required parameter (id) was missing.

The URL is:
mod/glossary/edit.php
In reply to Sebastian Netta

Re: A required parameter (id) was missing

by Sylvia Dell -

I have a very similar error in that I can add new entries and delete entries to a glossary, but cannot update. The error message I get is "Could not update your glossary".

However, my problem is more widespread than just the glossary - I cannot UPDATE anything - eg

  • Labels on the front page - any changes I want, I have to add a new label
  • Quizzes - students cannot update their answers.
  • Profiles - cannot update

I have tried to do a restore thinking it was corrupt data - it fixed the problem but it recurred.

The problem first appeared when we were running moodle 1.9, so we've updated to the latest versions - Moodle is now at 1.9.4+, MySQL is 5.1.32 and PHP is 5.2.9. This fixed the problem, but it recurred almost immediately. I was trying to test out a crossword puzzle, which writes the score to a student's grade book. I've done this lots of times in the past, but now it causes this update problem. It doesn't appear instantly, but only after I've had a few attempts, which is even more puzzling.

My URL link is http://moodle.nacollege.devon.sch.uk/mod/glossary/edit.php

The URL when I try to update the label is http://moodle.nacollege.devon.sch.uk/course/modedit.php - error msg "Could not update the label"

Is this the same problem as yours Sebastian?

Sylvia Dell

In reply to Sylvia Dell

Re: A required parameter (id) was missing

by Sebastian Netta -
Yes, we share the same problem!

Sebastian

In reply to Sebastian Netta

Re: A required parameter (id) was missing

by Sylvia Dell -

A bit more information - we have switched debugging on, and the failure is taking place in modedit.php at line 251 - the code here reads:


        if (!empty($fromform->update)) {

            if (!empty($course->groupmodeforce) or !isset($fromform->groupmode)) {
                $fromform->groupmode = $cm->groupmode; // keep original
            }

            $returnfromfunc = $updateinstancefunction($fromform);
            if (!$returnfromfunc) {
                error("Could not update the $fromform->modulename", "view.php?id=$course->id");
            }
 

The bold line is the line generating the error.

We also have problems when editting a Glossary - this fails in mod/glossary/edit.php, line 101

    if ($e) {
        $todb->id = $e;
        $dir = glossary_file_area_name($todb);
        if ($mform->save_files($dir) and $newfilename = $mform->get_new_filename()) {
            $todb->attachment = $newfilename;
        }

        if (update_record('glossary_entries', $todb)) {
            add_to_log($course->id, "glossary", "update entry",
                       "view.php?id=$cm->id&mode=entry&hook=$todb->id",
                       $todb->id, $cm->id);
        } else {
            error("Could not update your glossary");
        }

Any ideas?

Regards

Sylvia

In reply to Sylvia Dell

Re: A required parameter (id) was missing

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
You seem to have a problem with your moodle database. If you have access (or your admin has) to the database via a tool such as phpMyAdmin, you could try to run Repair and Optimize commands on it...
Joseph
In reply to Joseph Rézeau

Re: A required parameter (id) was missing

by Sally Mack -

Hi,

We are having this problem also, since our IT department moved our Moodle site from one server to another. The links all got brokem too, but that's largely been fixed.

The Database module is also behaving strangely.
Sometimes you can see the entries when you click on the database, sometimes all you get is a blank page. Happens with both Firefox and IE. Clearing the cache seems to help, but it never used to happen. 

Is it likely to be a related error? Ie Is it possible our database has become corrupted?

Also, I seem to remember that students could edit their database entries, but now they don't seem to be able to. I don't know which version of Moodle we are running.

Thanks,

Sally Mack

In reply to Sebastian Netta

Re: A required parameter (id) was missing

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I've just tested on my 1.9.4+ test install, and I can add a glossary entry without getting an error message.

So the problem must be related to something about your site.
In reply to Tim Hunt

Re: A required parameter (id) was missing

by Sebastian Netta -
The problem has to do with the changes that where made during the upgrade process.
Many entries are currupted now.
Of corse I have a second (new 1.9.4+) version of moodle running (unfortunately empty) and the glossary works fine.

I think it ist vital for anyone who upgrades moodle to know, that this can happen to theire system.
The best way seems to be to download a copy of the running system (not to rename it) and copy the new version ontop of the old one existing.
This way the update runs fine and there are no errors occurring.

Yours
Sebastian
In reply to Sebastian Netta

Re: A required parameter (id) was missing

by Sally Mack -

Thanks for that information. I doubt if we will get anyone in our IT department to agree with your analysis of the cause of the problem, and in any case the big question is How do we fix it?/ Can we fix it?

Cheers,

Sally Mack