Text editors

"Find or upload an image" option unavailable

 
This discussion has been locked because a year has elapsed since the last post. Please start a new discussion topic.
Picture of Manga Professor
"Find or upload an image" option unavailable
 

Hello everyone,

Here's my problem:

(I'm on Moodle 2.2.3, Windows server.)

I have two Moodle websites hosted on the same server, under the same domain. One is < www.my domain.com/A > and the other is < www.mydomain.com/B >. The thing is I've been unable to insert pictures on one of them simply because when I click the "Insert/Edit Picture" button in the HTML editor it opens a window without the "Find or upload an image" option. But the other is ok, it always gives me that option (see screenshots attached).

What's wrong?

Thank you.

Manga



 
Average of ratings: -
Picture of Sarah Jane
Re: "Find or upload an image" option unavailable
 

Hi there,

I have exactly the same issue -did you ever get yours resolved?

Sarah x

 
Average of ratings: -
Picture of Olumuyiwa Taiwo
Re: "Find or upload an image" option unavailable
Group Particularly helpful Moodlers

I'm also experience the missing "find or upload an image" button, but the behaviour is consistent across all sites.

I wonder whether this is related to the issue described in the tracker at http://tracker.moodle.org/browse/MDL-27520?

 
Average of ratings: -
Mary Cooch
Re: "Find or upload an image" option unavailable
Group Documentation writersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup TestersGroup Translators

Can you say exactly where you are not seeing the image upload button? Is it everywhere on your Moodle sites or in specific places? Are you unable to add any images this way at all? On any site?

 
Average of ratings: -
Picture of Olumuyiwa Taiwo
Re: "Find or upload an image" option unavailable
Group Particularly helpful Moodlers

As far as I can tell, the issue occurs in places where the admin_setting_confightmleditor textarea element is used on a config / seetings page (e.g. Front page settings).

Pages that use the 'htmleditor' MoodleQuickForm element (e.g. the user profile edit form) don't seem to have the issue.

I'm running the same version of Moodle (2.2.5) on two sites on the net and an instance on my laptop. The issue also occurs on a 2.2.1 instance on my laptop.

-- Muyi

 
Average of ratings: Useful (1)
Mary Cooch
Re: "Find or upload an image" option unavailable
Group Documentation writersGroup Moodle Course Creator Certificate holdersGroup Moodle HQGroup Particularly helpful MoodlersGroup TestersGroup Translators

If you mean in Front page description of Front page settings, that is expected behaviour - ie, not to have the image upload button.

 
Average of ratings: -
It's only an avatar...
Re: "Find or upload an image" option unavailable
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Hi Mary,

If you look in the opeing comment to this discussion, it clearly shows the same page, however Site A cannot upload an image, while Site B can.

I think this is an issue with the actual Moodle version.

Cheers

Mary

 
Average of ratings: -
Picture of Olumuyiwa Taiwo
Re: "Find or upload an image" option unavailable
Group Particularly helpful Moodlers

Thanks Mary.

It appears my issue is different from that of the OP.

If as you say, the behaviour is expected, then it begs the question of why a button for uploading image/media files is provided in the HTML area, when the user interface of the popup rendered by those buttons does not provide an easy way for the user to actually upload image/media files.

IMHO, the admin_config_htmleditor and QuickForm textarea are visially identical, and having them behave differently is sure to confuse users.

-- Muyi

 
Average of ratings: Useful (1)
Picture of German Acevedo
Re: "Find or upload an image" option unavailable
 

Hi Mary,

I just want to know if it's possible to allow the uploading of images into the messages created with bulk user actions, and how can I do this.

Thanks in advance for your help.

German

 
Average of ratings: -
It's only an avatar...
Re: "Find or upload an image" option unavailable
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

It could be caused by the fact the versions of Moodle are different in A & B.

Clearly A could be missing an update which B has. The versions could be 1 week apart. I recall this happening some while ago. The fact you can upload images using the Filepicker in B but NOT A is obviously a missmatch of versions.

It would be interesting to find out the difference between the two sites.  Perhaps filters or some other factors are at play here. Browsers? Chrome v IE7 even? Safari v Firefox?  Chrome v Opera?

 
Average of ratings: -
Me!
Re: "Find or upload an image" option unavailable
Group Core developersGroup Moodle HQGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

The filepicker and htmleditors in Moodle are affected if there are any javascript errors in the page. So if you see any missing buttons, etc - the first thing to check for is any errors in the javascript console (F12 in firefox or IE9+).


The second thing to mention is that some text areas in Moodle support uploading files and some do not. There are reasons why a particular area does or doesn't support files such as the ability to backup/restore or compatibility with other areas in Moodle such as the gradebook. If a text editor does not support file areas - you can still use images - but only by entering the URL to an image already hosted somewhere else on the internet.


Hope this helps

Damyon

 
Average of ratings: Useful (1)
Picture of Sankar Mahadevan
Re: "Find or upload an image" option unavailable
 

Hi Damyon,

I understand your second point; but I need to enable uploading files in text editor.  Since user has to submit their audio or video files to the admin.  Please help me how to enable file uploading in moodle media.

 
Average of ratings: -
Picture of Joseph Rézeau
Re: "Find or upload an image" option unavailable
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup TestersGroup Translators

Damyon "[...] some text areas in Moodle support uploading files and some do not. There are reasons why a particular area does or doesn't support files such as the ability to backup/restore or compatibility with other areas in Moodle such as the gradebook. "

What are those "reasons" you talk about? Why is it that students are able to use the file picker to upload images (etc.) to the HTML editor in some Moodle activities (Assignment, Glossary) but not in other activities (the Essay question in the Quiz and the Lesson activities)? What is the rationale there?

"[...] you can still use images - but only by entering the URL to an image already hosted somewhere else on the internet."

Yes, but that is not really user-friendly.

Joseph

 
Average of ratings: -
Just wondering . . .
Re: "Find or upload an image" option unavailable
Group Particularly helpful Moodlers

This is an old post I know.

Is there an up to date answer?

I couldn't find one.

-Derek

 
Average of ratings: -
Picture of Daniel Thies
Re: "Find or upload an image" option unavailable
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

The reason files are upload in the quiz is not a technical problem with the editor. It is deliberately disabled there for pedagogical or security reasons. I think that it was disabled because access to the repositories provided away around the simple javascript security feature. You would have to find the specific tracker issues to know why it is disabled in any given place.

Daniel

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: "Find or upload an image" option unavailable
Group Core developersGroup Documentation writersGroup Particularly helpful MoodlersGroup Plugin developers

Uploading files is not always disabled in Quiz Essay questions. It is a setting when you edit the question whether you (the teacher) want to allow students to upload things.

 
Average of ratings: Useful (3)
Just wondering . . .
Re: "Find or upload an image" option unavailable
Group Particularly helpful Moodlers

Daniel, Tim and Danyon, I was far too casual in this post.

My question is more specific.  Why can we not upload images in the usual way on the home page and in some theme settings?  They require a URL.  Gareth in Shoehorn has gone to a lot of trouble to get this sorted.  

I get quizzes.  But not themes.

-Derek

 
Average of ratings: Useful (1)
Picture of Daniel Thies
Re: "Find or upload an image" option unavailable
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developersGroup Testers

Derek,

In these cases, there is no place to store them as system files. The filebrowser normally (historically?) associates an uploaded file using the plugin file mechanism with a specific course and activity instance. The file is then backed up and restored along with the activity. Theme settings are not associated with activities so the file browser is not really an appropriate tool to use.

The image tool or filebrowser has been hacked to allow inserting of image urls with certain repositories instead of the actual file. For example wikimedia finds a image to download and then offers an option to put the url instead. This sequence seems a little strange to me, but works.

It might be better to have ask first whether the user wants a file or a url and pull up a browser with repositories that support that type. The url browser alone could be available in themes, etc.

Daniel

 
Average of ratings: -
Picture of Neil Haskins
Re: "Find or upload an image" option unavailable
 
I'm having the same issue. We run Moodle 2.3.2 on linux/apache. I want students to be able to upload an image into an essay question in a quiz. That is supposed to be possible.
 
Average of ratings: -
Picture of Ken Task
Re: "Find or upload an image" option unavailable
Group Particularly helpful Moodlers

If they are on the same server and in the same domain (cept located in a different directory), have you made sure the cookie prefix for A and B sites are different (not the default cookie)?  That has, in the past, affected users who used the same browser in two sites from same domain/server.

What happens if one uses one browser for site A and another browser for site B?  IE/Safari/FireFox don't share cookies nor caches.  Does the button for 'Find Upload ...' show?

'spirit of sharing', Ken

 
Average of ratings: -
Picture of Fernando Oliveira
Re: "Find or upload an image" option unavailable
Group Plugin developers

I'm also experiencing this problem: http://screencast.com/t/4OVxwcn6Jaj.

Strangely enough, the file picker works fine when Debugging is set to "Developer". Can anyone else confirm?

 
Average of ratings: -
Picture of Diptaroop Saha
Re: "Find or upload an image" option unavailable
 

The solution is very simple, sometime you have to mention some parameters in the code, to work the TinyMCE editor work in other mod/blocks/ or any other instance of moodle.

 

Go to your moodle folder and then the sub folder(for which the TinyMCE Find or upload an image... is not working properly).

Find the the php page from where the html form is rendered. The php page starts with the name xxx_form.php

Search with the tag $mform->addElement('editor'

Suppose you get something like this(make sure you have search the proper tinymce editor, where you are facing the problem) 

$mform->addElement('editor', 'logo', 'Insert Category Logo'); 

add just another two parameters in the above line i.e., 

$mform->addElement('editor', 'logo', 'Insert Category Logo', null, array('maxfiles' => EDITOR_UNLIMITED_FILES));

Then save the php file and refresh the web page and Find or upload an image... option will be available.

 
Average of ratings: -
Picture of Nicole Harris
Re: "Find or upload an image" option unavailable
 

I entered this solution as CONTRIB-4685 in Moodle Tracker. Please watch and vote for it. Thanks.

 
Average of ratings: -
Lindy anime style
Re: "Find or upload an image" option unavailable
 

Hi folks,

Pardon me if this is an ignorant question, but what impact does this have on where Moodle stores the uploaded files?  Are there any dangers in applying this patch?

 

Keen to see if it could work for our students trying to upload images into the Journal activity on Moodle 2.5

 

All the best,

Lindy

 
Average of ratings: -
Picture of Dean Montgomery
Re: "Find or upload an image" option unavailable
 

I had same problem on the front page.  Turns out database: mdl_course.maxbytes was set to '0'.

This will set the "Front Page" course id 1 to 500MB

UPDATE `mdl_course`SET`maxbytes`='52428800' WHERE `mdl_course`.`id`=1;

Warning this will reset all courses to 500MB

UPDATE `mdl_course`SET`maxbytes`='52428800'



 
Average of ratings: -