Installation help

Picture of Boris Puhanic
TinyMCE behaving strangely after upgrade

I upgraded from 2.4.1 to 2.5+ recently and the TinyMCE toolbar isn't behaving normally.  The toolbar only appears when editing is turned off - they I can go to 'Edit Settings' or edit a question and it's there. However, if I turn editing on the toolbar is missing completely in activities, labels, questions, everywhere...  Is this an intentional change, or is there a setting which is causing this behaviour, or did something go wrong during the upgrade?




Average of ratings: -
Picture of Boris Puhanic
Re: TinyMCE behaving strangely after upgrade

This is a real problem - isn't there anyone who can help with this?

Maybe I didn't explain properly:

1. Editing OFF > open a question, post, whatever and go to "Edit settings" > tinymce toolbar is available.

2. Editing ON > try to edit something via the little edit icon (the cog wheel) > no tinymce toolbar, at all - not even hidden.

When it comes to labels, there is no way to edit them except with "Editing On". So, there is no toolbar and I have to edit the html script manually.

Another example - to duplicate and then modify something I have to do the following:

a) Turn editing on > Duplicate > ("Edit new copy" is of no use because editing is on, so there is no toolbar, so...) > Turn editing off > Open new copy > Go to "Edit settings" > Now toolbar is available and can proceed to modify...

Should I report this as a bug?

Average of ratings: -
Picture of yvan vander sanden
Re: TinyMCE behaving strangely after upgrade

I got a similar problem. Well, the same actually. And it's not only TinyMCE, but also the file uploader doesn't load when in editing mode.

It seems to me some javascript modules are not loaded in this case. No idea why though.

Possibly related:

If I use the assignment upgrade helper and try to select multiple assignements to upgrade, then click 'upgrade selected assignments', i get a message telling me nothing is selected. (see image below)

I recently upgraded from 2.0 to 2.5, one version at a time. The site did seem to work on each step, but of course I didn't check every feature...



Average of ratings: -
Picture of yvan vander sanden
Re: TinyMCE behaving strangely after upgrade

Ok, all is working now. It turned out to be a combination of 2 things.

Key to solving it was to turn on display of warnings and errors. After that, I discovered there was something in my config.php related to an old module that i didn't install anymore. (removed it during upgrade)

Second, it appeared that the theme i used (generated with artisteer) was the problem. Switching to another theme (but only after fixing the config problem) solved the problem.

I hope you get yours fixed also.


Average of ratings:Useful (1)
Picture of Boris Puhanic
Re: TinyMCE behaving strangely after upgrade

Hi Yvan,

I get the same results as you when I switch themes - tinymce works normally - and I also get errors relating to an old block when I switch debugging on.  The problem is I'm using a custom theme and I don't want to have to change it (unless I really have to), and the old block is one I use in almost every course on my site.  It's the 'Course Results' block and it hasn't been updated since 2.2.

Here are the debug errors I get:

The block course_results does not define the standard capability block/course_results:addinstance

    line 606 of /blocks/moodleblock.class.php: call to debugging()
    line 584 of /blocks/moodleblock.class.php: call to block_base->has_add_block_capability()
    line 236 of /lib/blocklib.php: call to block_base->user_can_addto()
    line 1866 of /lib/blocklib.php: call to block_manager->get_addable_blocks()
    line 1005 of /lib/blocklib.php: call to block_add_block_ui()
    line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
    line 7 of /theme/rhubarb/layout/general.php: call to block_manager->region_has_content()
    line 847 of /lib/outputrenderers.php: call to include()
    line 777 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
    line 243 of /course/view.php: call to core_renderer->header()

The exact same errors appear even when I switch themes even though the tinymce editor works in the other themes (such as Afterburner).  So I'm not sure whether it's the block or the theme.  I guess I'll try removing the block and see what happens.

If anyone has any other ideas I'd really appreciate it.



Average of ratings: -
Picture of Boris Puhanic
Re: TinyMCE behaving strangely after upgrade

I think I understand now.  I looked here about the '...does not define the standard capability block/course_results:addinstance' error: and it's probably not the block that's causing it.  It looks like I'll just have to change my theme.

Thanks for the help.

Average of ratings: -
Picture of Jay Knight
Re: TinyMCE behaving strangely after upgrade
Group Developers

For the record, I was having this problem (javascript error on pages with tinymce when editting was turned on), and it turns out my custom theme had 

<div id="region-pre">


<div id="region-post">

and both of them needed class="blocks-region"

Making that change fixed the problem.

Average of ratings: -