Can't Edit Topic Headers in a Course!

Can't Edit Topic Headers in a Course!

by Rodney Wolford -
Number of replies: 7

Boy oh Boy. Have I messed up! At this point, I have become unable to edit my Topic Headers in a Course. I have tried creating new courses, but the same problem persists.

Here are some of the things I see going on using Firebug to debug and I have no idea where to begin fixing this problem.

1) In HTML, the following error is returned  "Coding error detected, it must be fixed by a programmer: Cannot require a CSS file after <head> has been printed."

2) In the Console, the following networkError is returned: 503 Service Unavailable http://fofcom.com/WZC/course/editsection. php id =118&sr=0.

I am using Moodle 2.4.3. The Theme is Rocket, but changing them doesn't fix the error. My Moodle site is WZC. Anyone have any hints as to what might be going on and how I could debug it?

Thanks,

Rod -- one very sad moodler

Average of ratings: -
In reply to Rodney Wolford

Re: Can't Edit Topic Headers in a Course!

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Rod,

As you say "Have I messed up!" in order to understand what to fix and possibly how to fix it given the error messages, what have you done?  As I think something a bit odd given trying to require a CSS file after the head has been printed.  Plus given that a 500 code often indicates syntax errors and a 503 is in the same group then a strange change has happened.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Can't Edit Topic Headers in a Course!

by Rodney Wolford -

Gareth,

Yes, what have I done? I don't want to discourage anyone from helping by just dumping a bunch of data. So I am trying to provide a more spare description hoping that more experienced users will be able to offer an insight. That said, here is a brief rundown of possible events over the past couple of weeks leading up to this problem.

One, I do a daily backup but only keep two back up days before replacing the oldest with the newest. It seems that whatever I did it was done more than two days ago, because reinstalling site with .tar didn't fix the problem.

Two, in my theme/styles folder, I created a new .css style sheet to enable the creation of several rollover items in some pages in a Topic. These were basically built on an imagemap as a container using <UL> and <LI> options which were then implemented in the TinyMC editor HTML. I developed these .css classes and ids over about a two week period. I would build a class or id in the style sheet then purge my cache and test it (I did not turn off caching, just cleared them after a .css revision) They all seemed to be working fine until when I first noticed the problem with Topic Headers a couple of days ago. First thing I did was to remove this .css style sheet and mark it out of the themes.php list. I then tried creating new courses with new topics. But the problem persisted.

Three, in working on the Course and its Topics, I have installed a couple of new plugins.

a) To add drag and drop markers on image question types I installed DDimageortext, DDmarker, and Gapselect. While in student mode reviewing a quiz based on DDmarker questions I first noticed a display problem with a question header. It worked fine in Admin mode, but not in Student. Working on these quizzes was the last thing I was doing before seeing the problems. I had been working on them about 3 or 4 days.

b) I installed, but have not used, the sharing cart plugin. My intention for it is to move some of the topics and quizzes created in this current course into a new course.

c) I installed the navbutton plugin which required a modification to the outputrenders.php, but I could never get it to work, so I uninstalled it and removed the modification code.

d) Also thought that I might have messed up the Rocket theme while reviewing some of the .css file structure, so I reinstalled the theme. I also switched to the basic theme to see if the issue would go away. It didn't.

This seems to about sum up the activities in which I have been engaged over the past two or three weeks that I can recall. Generally, I try to be very careful about moving around or changing items and I try to evaluate everyday so that if I have a bad problem I can reinstall. Obviously, it got away from me this time.

Any suggestions or comments, please.

Thanks,

Rod

 

 

In reply to Rodney Wolford

Re: Can't Edit Topic Headers in a Course!

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Rod,

I am an experienced user!

Ok, have you redone the 'Purge all caches' after reverting the Rocket theme changes?

For the css issue with head and given that you changed outputrenderers.php I would advice getting a fresh copy for your exact version - use the Git repository if needed to find the weekly release that has the right one.  This I suspect will solve the 503 too.

When working with the theme's did you change the layout files?

I recommend now implementing a weekly and monthly backup policy as well as the daily.  Or maintain a fork of the Moodle repository on GitHub or locally that you can make your own branch, add changes, commit, rebase, have development branches, create baseline tags (like backup points) and then easily revert back if needed etc.

Cheers,

Gareth

In reply to Gareth J Barnard

Re: Can't Edit Topic Headers in a Course!

by Rodney Wolford -

Gareth,

I have no doubt. I reviewed some of your posts and was glad you took the time to respond.

Yes, I did purge all caches after reverting and even every time I make almost any change when I want to be sure I am seeing what is actually there.

As far as the changes to the outputrender.php, that I was a thought of mine too. I did grab a copy from a much earlier .tar backup, but that didn't change the outcome (I have a couple of backups that go back into May that I had downloaded from my site during a time I was trying to get my git working). Tried to get to 2.5, but always ran into failures causing re-installs at which point I decided I was stuck with 2.4.3 for a while. In terms of making git work, that's something I would really like to achieve precisely for the reasons you state.

For the re-install, would you recommend copying down the exact version into a new folder, renaming my old moodle folder to WZC_bad then renaming the new folder to WZC (my moodle root name), then adding the config.php file to it? My problem with this has always been how to deal with the plugins I have added, getting them into the new install.

As far as when working with the themes, I did not change any of the theme files other than creating a new style sheet navigation_lesson.css and listing this .css in the config.php file in the theme/rocket folder.

Anyway, a bit more advice about the re-install and I'll give it a shot.

Thanks,

Rod

In reply to Rodney Wolford

Re: Can't Edit Topic Headers in a Course!

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Dear Rod,

In essence, yes, as long as you can get hold of the exact version.  If not, it's possible to extract from the git repository.

The risk is low as you have the old WZC_bad folder.  There might be a snag with the replacement looking in the config_plugin's table and finding version entries for plugin's that are not installed.  So make a backup of the DB too then remove those entries.  Then you can gradually put back the plugin's one by one (by copying the plugin folder you already have) until you identify the one causing the issue.  Then you will be in a position to do something about it.

I cannot stress enough about having a full backup and indeed individual course backup files too (and downloaded as mbz files) and to perform a local test restore of both types before proceeding.

In fact, do a test local install from scratch first with the replacement version and put the plugins in one by one until it falls over - less risk more information.

Good luck,

Gareth

In reply to Gareth J Barnard

Re: Can't Edit Topic Headers in a Course!

by Rodney Wolford -

Gareth,

Well, with backup not real current, but copies of database and site from about one month ago, I decided nothing to lose by going for it all.

So I did a git clone into a new folder, named it WZC, added my config.php, and let it roll. All I can say is... SUCCESS! All works as it should.

Nothing to do with me, just happens error was corrected and now I am in moodle 5.1, a place I tried to get to before but was thwarted with git stash, updates, and so on. I was mostly pushed to it because your message was, basically, "re-install."

At this point, it seems that the problem I am having is now limited to the DDmarker question format. It won't display questions and returns an error. I will try to figure out what is wrong. If I can't I will abandon the format and just use multiple choice, though drag and drop on an image is much more fun.

Anyway, thanks for giving me the incentive to plunge forward.

Rod

ps. Good instruction or a procedure on setting up an ongoing git update is really something I would crave. So far, it has been hit and miss successful for me.