Domanda

I've created a fresh install of Moodle 2.5. I installed successfully, I thought. I have not customized the theme, so it can NOT be theme-based.

TinyMCE's file picker is not loading...whether trying to upload a file or creating/editing a course under the Course summary files section...all I get is the "Loader" star. I did some research and found no solutions that worked. Quite a few said "custom themes," but I have no custom themes yet. Now, in checking the console, I got this:

 - Uncaught SyntaxError: Unexpected Identifier /lib/editor/tinymce/tinymce/3.5.8/tiny_mce.js:2
 - Uncaught ReferenceError: tinymce is not defined module.js:1
 - Uncaught ReferenceError: tinyMCE is not defined yui_combo.php?moodle/1374671241/editor_tinymce/collapse/collapse-min.js:1

Digging further, I found the error on tiny_mce.js with the "uncaught syntax error" is around this area (I beautified the JavaScript for better readability and it ended up on line 3344):

pi: function(h, i) { 
  if (i) { 
    c.push("") 
  } else { 
    c.push("") 
  } 
  if (a) { 
    c.push("\n") 
  } 
}

I also have no clue why the page is not seeing TinyMCE as defined.

In my browsing of multiple sites, one person mentioned being able to open the file picker in Moodle 2.5 when logged in as a regular non-Moodle user. They, too, have no answer to the problem, but I tried that and the file picker did, indeed, open.

Update

I've found it's not quite just the file picker. This whole thing is tying in to TinyMCE not loading properly...with the editing toolbar capability (whether collapsed or not.) It acts as if it's a simple text editor.

I fought with it and ended up causing more problems than solutions, so I uninstalled everything, and started from scratch. I have no plugin add-ons, no fancy themes (it's the basic one it installs with), and no customization, and it's still buggy.

The console continues to say:

 - Uncaught SyntaxError: Unexpected Identifier /lib/editor/tinymce/tinymce/3.5.8/tiny_mce.js:2
 - Uncaught ReferenceError: tinymce is not defined module.js:1
 - Uncaught ReferenceError: tinyMCE is not defined yui_combo.php?

And it pauses the debugger on practically every page with this. It's telling me that there's a problem with how TinyMCE is called in.

I've submitted a bug report, but haven't gotten the answer yet. What I'm hoping for is someone else to have had the same problem and come up with the solution, remembering there is no theme customization, no add-ons...so they can't be at fault.

È stato utile?

Soluzione 3

I'm putting this as an answer, because I received one, and I want everyone who ends up with a similar problem to know the way to solve it.

The problem was with the admin user profile settings. The Moodle team responded, and told me what to do.

It's as simple as:

  1. Change the admin's user profile and set not to use html editor by default.
  2. Purge all caches both in moodle and in your browser.
  3. Make sure that in "Site administration ► Development ► Debugging" you have "debug messages = developers" and "display debug = yes"

Thanks!

Altri suggerimenti

As a matter of fact I also banged to this issue after upgrading to Moodle 2.5.1+, and after digging it for hours came up with a solution that made things work smooth again, I have disabled Cache JavaScript from:

Home / ► Site administration / ► Appearance / ► AJAX and Javascript

After saving the settings the file picker started working as normal. I am not sure how bad this will affect overall moodle performance and how bad it will increase the load on server and website loading overhead, but at the moment that was the only solution that I came up with.

Hope this will help...

version 2.5.1+

The FilePicker doesn't load when editing is turned on.

If you have this issue where the FilePicker hangs while loading, click on the following:

Administration | Course Administration | Turn editing off

Then refresh the page with the FilePicker that you need to use.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top