When I turn editing on in a course, almost everything vanish. Only first blog is seeing. And when I go back to the front page its empty. Log out and in...and I can see it again, but when turn editing on it vanish.
Version 1.7 worked excelent.
This happens in every theme.
Whats the problem?
I changed all roles and reset them as told.
Using Firefox and Safari (Mac)
Juha,
if upgrading (or uploading new files) does not help: DID YOU HAVE any non standard blocks or modules BEFORE you upgraded from moodle 1.7 to moodle 1.8.
If there were modules or blocks that are not installed with new package there still are some "ghosts" in database that are the most probable reason for your problem. If not, this might be a new bug.
Hi Anthony,
have a look at http://moodle.org/mod/forum/discuss.php?d=68137
I think that "normal" upgrading / backup of these modules has some "difficulties".
I would backup courses using them first - delete those activities from courses, delete those modules themselves from admin - activities and check that there are no tables of questionnaire or feedback left in database (or links to those modules as resourses?) and upgrade to moodle 1.8.
Then I would install new module versions (if they work with moodle 1.8) and try to restore from course backups those activities.
I don't know if the problem comes from table structure of these modules or links (missing resourses?) because I don't have them but there have been same kind of problems with other modules/blocks too when structure of database tables has changed with upgrading.
Usually uploading new versions of (compatible) non standard modules with moodle 1.8 should be enough...
I'll have to check if I upgraded feedback module to 1.7/1.8. I've been working on hacking the feedback module, added my own block for MRBS integration, etc. I hope to have some time this week to help track down what is happening. I've posted some feedback on MDL-9031 about the errors I am getting with debug turned on. Peace - Anthony
p.s. as I was writing this forum post, I noticed that the annoying ctrl-right arrow was causing the paragraph to be indented rather than moving the cursor. (using ie7).
I have the same problem... Here you can see the blocks I have installed (all standar blocks!)
http://moodle.org/mod/forum/discuss.php?d=83153
What Can I do? Any help?
No help with the new clean upload without extra theme!
Still front page is empty (only header is visible) after turned editing on....What on earth is this...
Is this a bug with a mac browser....any other mac user here?
I have to test with PC asap.
Do you get any error messages if you turn debugging on from
Administration -> Server -> Debugging
Debug messages: DEVELOPER
(In finnish Ylläpito -> Palvelin -> Virheenjäljitys
Virheenetsintäviestit: KEHITTÄJÄ)
If you have phpMyAdmin, try to use repair database option (all tables)
...and if no other explanation is found: check (once again) config.php and last characters ( nothing after last ?> )
Re: Vast: Re: "Turn editing on" vanish everything
I upgraded from 1.6.3+ (taken from a linux server) to today's 1.8+ on my local MAMP. Before starting the upgrade I removed from my moodle instalation all non standard blocks and modules.
By upgrading directly from 1.6.3+ to 1.8+ the "Turn editing on" button was no longer working.
So, following the suggestion of a very smart moodle developer and friend, I upgraded fron 1.6.3+ to 1.6.5+, than from 1.6.5+ to 1.7.2+ and, at the end, from 1.7.2+ to 1.8+.
Once reached 1.8+ release I found the same problem you are discussing here.
My "Turn editing on" button change pages to almost blank.
So I started to read this thread and I changed the debug to DEVELOPER.
Then I went to home page and, by pushng again the "Start editing on" button, I got the following message:
start of error message
Errore interpretazione XML: nessun elemento trovato
Indirizzo: http://localhost:8888/eduiss/
Linea numero 105, colonna 3:
--^
end of error message
I was browsing my site in english but the message was in italian
The translation could be:
start of error message
XML interpreter error: no elements found
Address: http://localhost:8888/eduiss/
Line number 105, column 3:
--^
end of error message
(of course start and end of message don't belong to message)
By logging out and in again, I tried to get inside a course and I got the following error:
start of error message
Errore interpretazione XML: non well-formed
Indirizzo: http://localhost:8888/eduiss/course/view.php?id=50
Linea numero 229, colonna 35:<p class="tCorso"><questionario p <di gradimento></p></div><ul class="section">
----------------------------------^
end of error message
and I was not allowed to see the course at all.
By logging out and in again, I tried to get inside a different course all was fine but pushing the "Start editing on" button I got the following error:
start of error message
Errore interpretazione XML: nessun elemento trovato
Indirizzo: http://localhost:8888/eduiss/course/view.php?id=53&edit=1&sesskey=lrKm42sBTO
Linea numero 238, colonna 1:
^
end of error message
Any idea about? Any suggestion?
Re: Vast: Re: "Turn editing on" vanish everything
Daniele,
I think you are getting to target:
<p class="tCorso"><questionario p <di gradimento></p></div><ul class="section">
It is certainly not valid html or xhtml. I reported to tracker http://tracker.moodle.org/browse/MDL-9360
Re: Vast: Re: "Turn editing on" vanish everything
But... http://moodle.org/mod/forum/discuss.php?d=68220
Do you still have own classes in your theme (or in database)? Could it be the reason for this error message in your case, Daniele?
Vast: Re: Vast: Re: "Turn editing on" vanish everything
XML-jäsennysvirhe: elementtiä ei löydetty
URL: http://www.ohjaaja.net/moodle/
Rivinumero 106, sarake 3:
--^
Sorry, cant translate it propely in English...something like
XML outline error: element didn't found
URL: http://www.ohjaaja.net/moodle/
Row 106, Column 3:
--^
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
회신: Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
I am using Windows 2003 server and I got the same problem when I upgraded from 1.8 beta to 1.8 stable last sunday. Thus I had to recover the course from the backup files. It took several hours!!!
Today, I deleted ipodcast module which did not work in 1.8 stable version and I intalled new activity module podcast 1.0.
But I met the same problem. If I turn on the edit on, I cannot see the resources and activities anymore.
It seems that upgrading process (install new module) caused permanant error in database such that it cannot be corrected with new installation of moodle.
I may have to recover the course from backup files again.
Thanks in advance.
Re: Vast: Re: "Turn editing on" vanish everything
Re: Vast: Re: "Turn editing on" vanish everything
Warning: print_section_ad in /www/o/h/www.ohjaaja.net/docs/moodle/course/lib.php on line 1473
Fatal error: print_section_ad in /www/o/h/www.ohjaaja.net/docs/moodle/course/lib.php on line 1473
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Looks like function print_section_add_menus is broken. Could the reason be lack of memory:
php.ini setting memory_limit = ?M ; Maximum amount of memory a script may consume
or for example
max_execution_time = 30 ; Maximum execution time of each script, in seconds
or
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
Vast: Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Re: Vast: Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
This is really strange...my logic says that either activities are not loaded for some unknown reason or they are loaded outside screen in index.php. But why does it work for me and not for you? It must be some new property of moodle 1.8
Ajax? Block max width? css of table id="layout-table"?
If $preferred_width_left were missing, style of left column would be
<td style="width: px;" id="left-column"> ... I have only questions - no answers
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Daniele,
to be 100% sure:
was there anything special in course id=53 ?
Check once more from database that you had before upgrading only these modules:
assignment, chat, choice, data, forum, glossary, hotpot, journal, label, lams, lesson, quiz, resource, scorm, survey, wiki, workshop
and none of these:
http://docs.moodle.org/en/Category:Modules_%28non-standard%29

Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
during upgrade I first re-create the original Linux environment on my local MAMP, then I removed all extra blocks and modules and then I started the migration to 1.6.5+, 1.7.2+, 1.8+.
To be sure to remove all extra modules and blocks I substituted the moodle1.6.3+ folder with the just downloaded folder of Moodle1.6.5+ and I went to visit the blocks and modules pages. A message told me about some modules and blocks not working and I deleted them with the admin interface.
In any case, into my course id=53 I was not using at all any extra module. Feedback module, for istance, was not used into modle id=53.
From the block "activities" of my 1.6.3+ course on linux server I still see (it is still working on the web in Moodle 1.6.3+) I used:
I used a non standard survey but... I am sure it is in the db because I imported the db dump.
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
would probably help to upgrade again your whole site using a higher php memory limit. (Remeber to restart apache after raising php memory_limit

Also, I would try this:
1. fresh cvs moodle only, on a brand new folder
2. import the mysqldump on a brand new database
3. upgrade Moodle DB, visiting the moodle/admin page
4. on success, go to step 5.
5. add each single custom/module one at a timne and see if they breaks something.
Andrea
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
I started from scratch.
I re-upload the old linux MySQL dump through MySQL Administrator.
I went to check the db.
The db collation was in utf8_general_ci
Some tables collation was in utf8_unicode_db.
I made my first access to the new installed 1.6.3+ copy and I went to remove all non standard modules and blocks.
I changed the moodle folder with the 1.6.5+ (2 days old) folder and I went to browse my site again. I was asked for a db upgrade (not for upgrade to utf8). All was fine.
So I continued replacing the moodle folder with the 1.7.2+ release (two days old) and I returned to the moodle home page.
Moodle stopped me with the attached message.
I also attach the row of my db and the collation of some tables. As you can see they are not all the same. Some table is utf8_unicode_ci or utf8_general_ci
What do I have to do now?

Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
My database collation is utf8_unicode_ci. You could try to change collation utf8_general_ci to utf8_unicode_ci BEFORE UPGRADING with command
ALTER database eduissDB DEFAULT CHARACTER SET utf8 DEFAULT COLLATE
utf8_unicode_ci;
You could also change current collation of tables with command like
ALTER table mdl_block DEFAULT CHARACTER SET utf8 COLLATE
utf8_unicode_ci;
for all your tables having collation utf8_general_ci
I tested "messy upgrading on purpose" a couple hours ago and collation of my tables
mdl_capabilities, mdl_context, mdl_context_rel, mdl_groups...mdl_groups_members, mdl_mnet_enrol_assignments... mdl_mnet_sso_access_control, mdl_quiz_feedback, mdl_role, mdl_role_names, mdl_scorm_scoes_data, mdl_scorm_seq_mapinfo...mdl_stats_monthly, mdl_stats_weekly, mdl_user_info_category...mdl_user_lastaccess and mdl_wiki_locks
was changed to latin1 because of feedback module
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Daniele,
your list of modules did not have non standard modules but did you check your database (table mdl_modules)?
This is so similar to my faulty test install from 1.6 to 1.8 that the reason must be some "ghost module" (from previous moodle versions) in database or those class changes you made or those surveys. Something that is not "standard moodle"...
I suspect feedback module is causing the main problem.
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
You got the error probably because you are using an (old?) environment.xml file. Are you pointing your new installation to an old dataroot folder? Could you please check $CFG->dataroot.'/environment/environment.xml' should not be there?
You can either try to update your environment file by following the "update component" link on your /admin/environment.php page, or try to delete the copy of environment.xml in your data root.
Cheers,
Yu
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
1st: > $CFG->dataroot.'/environment/environment.xml' should not be there
It is there, and attached is my file.
2nd: >You can either try to update your environment file by following the "update component" link on your /admin/environment.php page, or try to delete the copy of environment.xml in your data root.
I'll try as soon as I return back to my portable this afternoon. (9 hours from now)
I'll post soon the outcome of the experience.
In any case, thank you all of you in advance.
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
I tried the first way before reading your post. It was a disaster. Follow the report.
In 1.6.5+ environment I went to admin -> environment and I selected "update components".
All was fine.
I changed the Moodle 1.6.5+ folder with the 1.7.2+ folder and I logged in again.
In 1.7.2+ the db upgrade was requested without warning. Congratulation but...
the upgrade was a disaster.
Three pages full of error and warnings.
Attached are the three pages (with corresponding folder) in MDL-9339.
Now I can't continue because moodle stops me requiring the update that can't continue because of the errors.
I go to start over again trying to follow the second solution.
Thank you to all of you.
1st of all thanks to you all.
1st of all thanks to you all.
1st of all thanks to you all.
1st of all thanks to you all.
1st of all thanks to you all.
1st of all thanks to you all.
2nd: I am available to start again to aswer question from developers in order to find the solution to this so ugly bug.
3rd: this is the procedure I used to reach the solution.
-> I started again by importing the db dump.
-> In moodle 1.6.3+ I removed all my extra modules and blocks.
-> I changed the dbsessions variable from "yes" to "no" (otherwise I was not allowed to login in Moodle 1.7.2+ in previous trials)
-> I went to check the db from within phpMyAdmin
I found all tables were in utf8_general_ci collation with few exception.
The exception were:
mdl_pma_bookmark, mdl_pma_column_info, mdl_pma_history, mdl_pma_pdf_pages, mdl_pma_relation, mdl_pma_table_coords, mdl_pma_table_info
Some century ago I used the "mysql" folder to access the phpMyAdmin through moodle admin access. I found the description/information "Column information for phpMyAdmin" inside the table "mdl_pma_column_info" so I decided to remove them all. (the mySQL folder from moodle/admin folder was removed some centuries ago)
-> I replaced the 1.6.3+ folder with the 1.6.5+ folder.
-> I logged in in 1.6.5+
-> I was requested for db upgrade and I allowed it
-> I went to Admin -> environment and I selected "update components"
-> I logged out
-> I went to remove the two files stored in moodledata/environment folder. They were: environment.md5 and environment.xml
-> I replaced the 1.6.5+ folder with the 1.7.2+ folder.
-> I logged in in 1.7.2+
-> I was requested for db upgrade and I allowed it
-> during upgrade all was fine except for the error: "forum with id = 43 was not upgraded". I didn't care it. I will find it and I will delete it as soon as I have time.
-> I logged out
-> I replaced the 1.7.2+ folder with the 1.8+ folder.
-> I logged in in 1.8+
-> I was requested for db upgrade and I allowed it.
-> All works fine
Now that the process is closed I still have the moodledata/environment folder empty. Is this a problem?
I am ready to give all the requested information in order to help in solving this bug from inside moodle code.
How can I find in which course is the forum id = 43?
Re: SOLUTION FOUND: "Turn editing on" vanish everything
Re: SOLUTION FOUND: "Turn editing on" vanish everything
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Daniele,
if this upgrading gets too difficult, you may have to install a fresh moodle 1.8 and backup/restore each course separately. At least you can test after first restore that everything is working as it should and it may help to locate the original reason for this vanishing content.
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Logging in the home page all is fine but the "Turn editing on" button clear almost all.
What I get in the web page is all the header and this:
<!-- END OF HEADER -->
<div id="content">
<table id="layout-table" summary="layout">
<tr>
Noting more.
No error message is displayed.
Going to my course id=50 I see my course correcty.
The course is four arguments long.
By pushing the "Turn editing on" button I miss the right column of blocks and I only can see the first topic (the one before the first argument, the one that is not collapsable).
No error message is displayed.
The same behavoiur is foe each course different from the SITEID course.
No error message is displayed.
If I go to a course, I switch editing to on and then I return to the home page I get the same almost empty page as described before without errror messages.
Some screen shots are in the MDL-9339 issue.
http://webserver/moodle/admin/environment.php
We then dumped the database and reinstalled version 1.8 and this time the turn on editing button worked.
With the actual database back in place, we again get a blank screen when the turn on editing button is selected, but add the above to the url in the browser.
Not pretty, but it works.
I am going to assume this problem is caused by the third-party blocks in our case (course menu and attendance seem to be the problem--as far as I can tell, quickmail still works fine). Since most of mine don't seem ready for 1.8 yet, and I might face a mob if they don't appear with the upgrade, I will just give this another month and test some other things (but use a new database, no upgrade).
atw
My problem seemed to be with the attendance block. This block has a block and a module. When I had deleted both parts from my instance, my editing came back! Just deleting the block portion wasn't enough. There were 2 courses using the mod portion (which reports to the gradebook).
So I recommend very thorough searching for all traces of third-party blocks when debugging this problem.
Onward and upward. . .
atw
I upgraded from 1.7 to 1.8.2 and deleted the Feedback module when the upgrade reported it as uncompatible. The we started geting the problems described above, so we turned on debugging and got :
"Warning: require_once(/var/moodle_web/mymoodle/mod/feedback/lib.php) [function.require-once]: failed to open stream: No such file or directory in /var/moodle_web/mymoodle/course/lib.php on line 1469
Fatal error: require_once() [function.require]: Failed opening required '/var/moodle_web/mymoodle/mod/feedback/lib.php' (include_path='.:/usr/local/php/lib/php') in /var/moodle_web/mymoodle/course/lib.php on line 1469"
Having tried to upgrade Feedback to 1.9 and failed miserably, I just copied the old version into Moodle/Mod and what do you know! It worked!
At present, it looks like you'll need careful documentation of your server before you upgrade, you can't just "upgrade and go!".
AM,
I suspect you understand what happened and why, but just in case you don't, and even if you do, in case others reading your post don't, here is my take on it, for whatever that's worth:
course/lib.php line 1469 tried to open a file in the feedback module, but that failed because you had deleted it. No surprise there. The question is why it was trying to open it in the first place. I can only guess, as SS said yesterday, that it was picking up a reference to it in the database. If this is true, it suggests you both made the mistake of trying to delete a non-standard module by only deleting its folder (directory), instead of following the instructions (http://docs.moodle.org/en/Category:Modules_%28non-standard%29#Module_removal).
RLE
I see that at line 1469 in course/lib.php gets caught when there is a missing module.
require_once("$CFG->dirroot/mod/$modname/lib.php");
require_once produces a fatal error and stops php in it's tracks when a module listed in
This is a core bit of Moodle calling an external module. Perhaps it might be an idea to introduce a little bit of error checking here, and allow for the call to the module to fail politely if there is a problem.
We could replacing the line require_once by statement include_once wrapped in an if statement to catch the errors.
// new if statement to replace require_once line
if ( include_once("$CFG->dirroot/mod/$modname/lib.php") ) {
// back to our old code to process the module
if (function_exists($gettypesfunc)) {
$types = $gettypesfunc();
foreach($types as $type) {
if ($type->modclass == MOD_CLASS_RESOURCE) {
$resources[$type->type] = $type->typestr;
} else {
$activities[$type->type] = $type->typestr;
}
} } else {
// all mods without type are considered activity
$activities[$modname] = $modnamestr; }
// and then this extra bit to trap and
//report the missing module file :
} else {
debugging('Error calling module : '.$modname. ', unable to include file '.$CFG->dirroot/mod/$modname/lib.php, DEBUG_NORMAL);
}
I note that the same issue of missing files in modules is avoided earlier in the same file, function print_overview(), and require_once is only called after testing
function print_overview($courses) {
......
if (file_exists(dirname(dirname(__FILE__)).'/mod/'.$mod->name. '/lib.php')) { require_once(dirname(dirname(__FILE__)). '/mod/'.$mod->name.'/lib.php');
....
I was tempted to reuse this code, but think that include_once, and trapping for failure is better than checking for existence of a file separately. Note that the other function does not report the missing file as a debug or error message, and I think it might be useful to do this, just to help the user along. I recognise that my quick patch will generate a lot of log entries - one for each call to print_section_add_menus, which means once for each topic printed each time course is viewed in edit mode.
Perhaps we also cross-check the modules which we try to include here against the list of enabled modules.
I'm sure that there are a lot more issues to deal with when upgrading and using non-standard modules, but I think that this might help things along - and enable the code to be a bit more forgiving of missing modules.
Could I ask if people think that work around is worth popping this into a closed bug describing the problem? I don't usually like to comment on closed bugs.
This is the solution that worked for me.
- We went from 1.6 - 1.8 and most everything vanished.
- Added the code suggested to courses/lib.php and it worked perfectly.
- I then checked what extra modules I had inserted previously in 1.6.
- I found two modules that I had experimented with but not made use of.
- I deleted these from modules/activities...
- removed the code from lib.php,
- re-uploaded said file and everything works fine...
- I also cleaned up the data base as I had a a couple of tables that referenced a module that no longer existed
It is a new bug. Look at
http://tracker.moodle.org/browse/MDL-9355
http://tracker.moodle.org/browse/MDL-9031
http://tracker.moodle.org/browse/MDL-9360
Do you have old module exercise (or tables of excercise from previous moodle versions) installed? It could be the reason because it was but is not anymore standard module.
I was too fast to change it. Damn me! But havent had any this kind of problems earlier. Moodle has run smoothly!
Lesson learnt! Dont change so soon to the new version. ;)
Juha,
did you overwrite your moodle 1.7 folder with moodle 1.8 or did you upload moodle 1.8 to new folder, copy config.php to that folder and rename folders (old moodle to something else and new folder to old moodle)?
This is just a guess but if you have overwritten the previous version there might be "something mess-up" left from previous moodle. Did you try repairing database tables?
Vast: Re: Vast: Re: "Turn editing on" vanish everything
Vast: Re: Vast: Re: "Turn editing on" vanish everything
Yleiset relaatio-ominaisuudet Pois päältä"
Rough translation:
"PMA Database...not in order [Instructions]
Common relation features off"
Maybe this is the problem? But I think this point to PMA not to actual database.
Sorry, I'm really newbie with MySQL
I didn't find any excersise -tables, but one RSS feed table (some fotos from Flickr in one course). It was ok by phpMyAdmin.
Re: Vast: Re: Vast: Re: "Turn editing on" vanish everything
Try to delete that RSS feed first (copy the feed so that you may add a new feed later). I have once had a situation where RSS feed caused a lot of trouble because of missing permissions to run scripts/RSS (in Windows server).
Could you give me a temporary access to your site if I could find anything new? I tested yesterday upgrading from moodle 1.7 to 1.8 but there were no errors. Others have had some extra modules or blocks so your case is a little different from these other "vanishing problems"
My email is mauno.korpelainen@hyvinkaa.fi
I made an upgrade from 1.6.3+ to 1.8+ last friday and all was fine and well shown but my "turn editing on" button was no longer working.
When you push it, you only have a page refresh but no editing icons appear.
At last I found what was the problem!
You were absolutely right, Mauno! There were old mod in my system, "scheduler". I deleted it and now Moodle works fine!
I put it there several versions ago, havent used it and so I have forgot hole mod. I tought it was part of Moodle, but it really is extra mod. At last I checked all dates and found its old version.
Sorry all extra work, what I have caused!
Daniele, check all mods in Site Administration -> Modules -> Activities
Maybe you also have extra mod there!? Check version!
Hello,
I have a similar problem.
I updated our Moodle from 1.7+ to 1.8.
Now, when I want to insert or update a resource or activity I only get a blank page.
After enabled debugging level to ALL, I get the following errors:
Update or Insert a label
php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\label\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='“.') in I:\Geral\Moodle8\mod\label\mod_form.php on line 2.
Update or Insert web page
php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\resource\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='“.') in I:\Geral\Moodle8\mod\resource\mod_form.php on line 2.
Update ot Insert a Forum
php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\forum\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='“.') in I:\Geral\Moodle8\mod\forum\mod_form.php on line 2.
Update or Insert a Chat
php[6660]; PHP Warning: require_once(moodleform_mod.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in I:\Geral\Moodle8\mod\chat\mod_form.php on line 2.
php[6660]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='“.') in I:\Geral\Moodle8\mod\chat\mod_form.php on line 2.
Do you have any ideias?
Thanks and Best Regards
Duarte S.
Hello Mauno,
Thanks for you answer.
The course/moodleform_mod.php exists.
I already extracted it from the Moodle installation zip file and replaced it, but with the same results.
Perhaps the Moodle installation file is corrupted... Tomorrow I will download a new zip file.
But the path is strange...
"Did you change folder names / config.php when you upgraded moodle?"
Yes, I changed the $CFG->dirroot because I have the 1.8 files in a different folder. The dataroot is the same.
Best Regards
Duarte S.
Thats what we have done.
I noticed the file size was larger in 1.8 than it was in 1.6. The old database does not help in that it I feel it was corrupted. It has been dumped and the new database was built after effecting a safe mode on the mysql server.
We have a version of Blackboard coming this fall. From what I learned at the TXDLA conference in Galveston, Moodle can comptete. I have just a little time to save this application.
Are there any specialist in the DFW area? We need a some serious support to get this application off the ground and off the chopping block.
Hi Duarte,
this is one of those "STRANGE" errors - and first place to look is config.php
There might be some extra sign or missing character causing this...
BUT: The error is similar to those cases where old non standard modules are used. Have you installed different versions of these modules or are they same version as your moodle 1.8? Check also that your database and tables are all unicode and if you have something else "non standard" (this is becoming a vogue word for me )
I solved your similar problem by starting each time from the original backup.
If something goes wrong I don't know if it is possible to repair it. So each time you find something wrong, start from scratch.
Each time you do something concerning the db, visit it with myphpadmin and check for each table Collation.
During the process I found that all tables were in utf8_general_ci and only a few still with a different Collation.
I started again from scratch, I deleted that few tables and all was fine.
Hello,
I tried many things to solve the problem.
The last one:
- New MySQL Database;
- New Moodle folder with the last Moodle version;
- New Moodle Data folder;
- New installation from scratch;
- No data restore.
I did only one thing: Create a new simple course and tried to add a label.
I have exactly the same problem with the same error!!
My server environment: Moodle 1.8 + (2007021503); PHP 5.1.6; Apache 2.2; Windows 2003
I didn’t have any problems with this environment with Moodle 1.6 and 1.7.
Only with 1.8....
Best Regards
Duarte S.
Hello Mauno
I found the problem.
The strange path (include_path='“.') , come from this line in php.ini:
include_path = “.;c:\pehpe\pear”
If I change this line to include_path = “I:\Geral\MoodleGeral\course;c:\pehpe\pear” then I get the follwoing error:
"php[4016]; PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'moodleform_mod.php' (include_path='"I:\Geral\MoodleGeral\course') in I:\Geral\MoodleGeral\mod\resource\mod_form.php on line 2."
Questions:
- Why Moodle 1.8 is using that php.ini path?;
- What path to put in php.ini?
Thanks and best regards
Duarte S.
Duarte,
"Files for including are first looked in include_path relative to the current working directory and then in include_path relative to the directory of current script. E.g. if your include_path is ., current working directory is /www/, you included include/a.php and there is include "b.php" in that file, b.php is first looked in /www/ and then in /www/include/. If filename begins with ./ or ../, it is looked only in include_path relative to the current working directory." http://fi2.php.net/include/ In Windows include_path could be for example
.;C:\php5\pear
if you would need pear (and it is there).
I guess your problem could be that moodle can't find or is not allowed to read those files or folders that you get errors from (course/moodleform_mod.php)
If you have no extra modules or blocks (fresh install) and you have a new database (collation unicode) it could be some problem with configuring IIS (if you have it)/php cache/changed name server/IUSER permissions...
Another guess: your problem must be typical for Windows 2003 environment but I don't know what it is. I have one production server running inside Windows 2003 but it has moodle 1.6 so I can't test it. My 1.8 server has Debian. Maybe some other users having Windows 2003 + moodle 1.8 could give some help
MK,
I'm no PHP expert, but I couldn't help noticing that in DS's last post, in both of the example include_path's the list of paths is enclosed in double quotation marks. The opening double quote is included in the include_path as reported in the error msg. in both cases. According to the PHP manual, enclosing strings in quotation marks in php.ini is permissible. Is it a Moodle bug that is causing that extra double quote to be included in the include_path in that error msg., or does this indicate a probem with the way the string is being quoted in his php.ini file? EDIT: It also seems like the semicolon and everything after it are being excluded by Moodle. I think that is the problem, and it definitely seems like a Moodle bug, if I am not mistaken.
RLE

Hello Mauno,
Tomorrow I will check.
But this php.ini and windows2003 configuration works fine for Moodle 1.6 and 1.7.
About permissions: I'm sure the folder permissions are OK (I already give more permissions to the apache user than necessary).
Perhaps the Apache permissions... But I remember that I already tried the following: installed 1.8 in the same folder that I use for Moodle 1.7 and the result was the same.
Thanks and Best regards
Duarte S.
Yes, the odd thing is that all others have had something "old" (usually non standard modules and blocks or collation of database) from previous moodle versions but you are the first one who has this problem with new install. Did you make also new config.php during new install or did you use old config.php ? The fact that your 1.7 is working but 1.8 is not could give a tip that the problem would be in database anyway: moodle 1.7 can use latin (or other) tables but in moodle 1.8 everything should be unicode. Can you check collation of database and that all tables really are utf8 and what charset?
MK,
I just saw your response to my previous post, and the funny thing is, after I sent it, it occurred to me as well that it could be a PHP bug or a problem with the text editor being used to edit php.ini (e.g., Microsoft Word replacing quotation marks with so-called smart quotes), for which cause I was going to suggest DS post a copy of his php.ini file; but then, why would the problem not occur with earlier version(s) of Moodle? So the fact that it only happens with Moodle 1.8 suggests it is a Moodle 1.8 bug, but the fact that it doesn't happen with you suggests it is something else. Must be some kind of weird combination problem.
All I know is that, whatever it is, it is messing up the include_path string. If I were a Moodle developer, I would look at the code in version 1.8 that handles that.
RLE
Hello,
Today I installed a new fresh copy of Moodle 1.8 in a different server (again Windows 2003 + Apache).
This is a small server where I'm doing some tests.
In this server I already run Moodle 1.6 and 1.7 without any problems.
After install Moodle 1.8 I tried to create a resource or activity and everything work fine.
Then I analyzed the php.ini for differences and I found the line include_path = “.;c:\php\pear” commented out.
---> IF I don't comment out this line I GET THE SAME PROBLEM!
A blank page with a URL similar to this: http://localhost/course/modedit.php?add=label&type=&course=2§ion=0&return=0
Then, for me is really a bug with Moodle 1.8 .
I found more people complaining here http://moodle.org/mod/forum/discuss.php?d=69136
Thanks and best regards
Duarte S.
Duarte,
I have one new idea: open mod/resource/mod_form.php and change at the beginning
require_once ('moodleform_mod.php');
to use path
require_once ($CFG->dirroot.'/course/moodleform_mod.php');
Does it help or give any new error messages? (If it does help try the same for those other modules: forum, chat, label...)
It is an open question why that include_path in your (Windows) php.ini is not accepted or it is changed (is it allowed to use C:\ ?)
The reason for this could be some lib file of moodle / php (bug) / Windows 2003 / ? but for some reason include_path just does not work in your environment. Martin and other developers of moodle might know better...
Hi Duarte,
after a quick check this seems to be a new feature in moodle 1.8 and it only affects activities: http://docs.moodle.org/en/Development:lib/formslib.php_Usage
but if that path in mod_form.php were
require_once ($CFG->dirroot.'/course/moodleform_mod.php');
instead of
require_once ('moodleform_mod.php');
for all activities the whole problem would not exist at all.
I have the same problem, and a lot of blocks had just disappeared from the pages. In my case I had added the Calendar Event Reminder system http://moodle.org/mod/data/view.php?d=13&rid=755 and for some reason (maybe my fault) the contents of /admin had been deleted which seemed to account for the blank page. The problem then was that the calendar had been updated to a later version which when I uninstalled and then reinstalled kept setting a warning. I've manually changed the version number and all is now OK, but I'm adding my old blocks very carefully one by one ....
Mine were feedback, ipodcast, quickmail and countdown. as soon as they were flushed out of the database by moodle the turn editing on bug disappeared.
However, after 2 weeks of head banging I found that the my moodle section did not work for students and staff which is possibly the most important overview they have and had to roll back to 1.7.1 losing about 3 hours worth of submissions.
Not to worry, I will battle on and get 1.8 working by hook or by crook :D
Hi Simon,
the unpleasant surprise of removing 3rd party activities AFTER upgrading is that collation of some tables of database is probably not unicode anymore. You should remove them BEFORE upgrading (and if you need those activities take a backup of courses and try to install them again after upgrading and restore from course backups after upgrading).
Anyhow, the streaming mod was working fine. But, I had forgot to copy the questionnaire folder from my old install into the new one. When I did that, everything started to work again.
So, if you encounter this problem, then it might be the case that some files are missing. MIght be...
Al
Just an update/solution for those with a similar problem to those above. I had the problem whereby in 'editing on' mode, some blocks vanished, particularly those to "add activities" and "add activities", hence it was not possible to further develop courses.
Some of the solutions suggested above re. deleting activities may work, but the real problem seems to be in the database. I had a look at mine (via phpmyadmin) and some of my database tables had not upgraded to UTF8, even though I am pretty sure they all were changed to UTF8 when I did the database upgrade when upgrading to v1.8.
So all I did was note which tables were not UTF8, these mostly corresponded to old modules/activities no longer used in v1.8, and removed these via Admin/Modules, then dropped their tables (not in UTF8 format) via phpmyadmin
I also had to do the same with two current activities - 'Exercises' and 'Glossary', but as these weren't being used it was not an issue. I can put them back manually if need be.
Once I did this 'editing on' returned to normal.
Hope this helps.
I had a similar problem when I recently upgraded from 1.6 to 1.8.2. Once editing was toggled on I could not add activities or blocks, there was no button to toggle editing mode back off and if I moved a block from the left it disappeared completely.... oh and when I clicked on the notification link from the administration block the page admin/index.php was blank.
The solution... In 1.6 I had added the 'Feedback' activity module and even though I hadn't yet installed Feedback for 1.8.2, it was present (must have been picked up from the database). Installing the Feedback module in 1.8.2 promptly fixed all my problems above!!
Sharon
SS,
See my reply to AM in another branch of this discussion (http://moodle.org/mod/forum/discuss.php?d=69176#p344981).
RLE
1) look at all modules when deleting: i had added some but never used them, so i forgot they were there!
2) look under blocks AND activities: i deleted the blocks and used FTP to delete the folders from site and only recently found them under activities -- duh
3) i still also had to use phpmyadmin to clean up the "ghosts" tables as one poster called them. maybe if i would have deleted these before the upgrade i wouldn't have had to do this?
so far i think i've got it running again * sigh*
- Jestin
running 1.8.3 on Linux server