'Could not add a new instance of resource' when making a file visible to my course

'Could not add a new instance of resource' when making a file visible to my course

by Christoph Uhrhan -
Number of replies: 1
When I try to upload a file and make it visible to the course I get the error message 'Could not add a new instance of resource'.

I am running Moodle 1.9 with the latest stable build.
Moodle is running on a Postgres 8.1 Database-Server on a Debian Linux installation.
I am experiencing this problem for a week or so, I would guess since after the update of the latest-stable-build from 04-28-2008.

I tracked down the problem reading the error-logs of my Postgresql-Database-Server.
The problemm only occurs when I enable the checkbox 'force download'
The corresponding error-message of Postgres states:
'null value in column "popup" violates not-null constraint'

When the checkbox 'force download' is disabled, everything works like a charm.
I can change the checkbox to enabled afterwards and it still works. This would do as a workaround for the time being.


I hope this helps!

Greetings
Christoph Uhrhan

Average of ratings: -
In reply to Christoph Uhrhan

Re: 'Could not add a new instance of resource' when making a file visible to my course

by Sergei Yegorov -
I've just upgraded to Moodle 1.9.1 and have the same problem. I'm on Postgres 8.3. Everything is OK on MySQL instalation. Any solution for Postgres users?

Thank you!