httpsrequired problem in 1.9.10+ Unable to use images!

httpsrequired problem in 1.9.10+ Unable to use images!

by brian avery -
Number of replies: 6

I have a 1.9.10+ install, relatively fresh. Actually, almost virgin.

Today I uploaded a batch of images and tried to add them to a lesson. When the insert-images pop-up screen appeared it carried the warning:

Notice: Undefined variable: httpsrequired in /home/bca19560/public_html/insegnanti-inglese.info/moodle/lib/editor/htmlarea/popups/insert_image.php on line 14

I was and am unable to add images to lessons or quizzes, or to anything else as far as I can see. Looking at the php file listed in the error message I see:


if ($httpsrequired or (!empty($_SERVER['HTTPS']) and $_SERVER['HTTPS'] != 'off')) {
$url = preg_replace('|https?://[^/]+|', '', $CFG->wwwroot).'/lib/editor/htmlarea/';
} else {
$url = $CFG->wwwroot.'/lib/editor/htmlarea/';
}

I tried to comment out these lines. The error message went away but the pop-up refused to close (or allow me to complete adding the image) when I tested this. Obviously it's not the answer.

What can I do? I need to add images (I was in the process of creating a batch of flashcards) and this is a rather serious issue..

Thanks.

Average of ratings: -
In reply to brian avery

Re: httpsrequired problem in 1.9.10+ Unable to use images!

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Brian,

This forum's description says "This forum is for discussions about Moodle 2.0."

Please re-post your question to a more appropriate forum (General problems maybe?).

ATB

Joseph

In reply to Joseph Rézeau

Re: httpsrequired problem in 1.9.10+ Unable to use images!

by brian avery -

Joseph,

I did that first, but anyway, I've fixed it now after finding some help in tracker. The problem is that when nobody answers (for whatever reason) and the issue is serious or stopping you from working you are faced with waiting in hope (not always wise as lots of posts never get answered) or trying in other related forums. I chose the latter, especially as at xmas there will be far fewer people online.

Anyway, if anyone reading this has a similar problem there's a solution in a tracker (sorry I don't have the number to hand).

Brian

In reply to brian avery

Re: httpsrequired problem in 1.9.10+ Unable to use images!

by Glenys Hanson -

Hi Brian,

It seems to me that if one doesn't get an answer in a forum within 48h, the first step is to "bump" it - maybe by reformulating the question with more details.

If this still doesn't get an answer, and it could be a bug, then the tracker is the way to go because in my experience I've always got an answer (not necessarily a solution) there.

Having found an answer in the tracker, it's nice to come back to the forum and post the solution there with a link to the tracker item and "solved" in the title of the message.

Should I ever have a similar problem with images, from what you've written here, I would have no way of easily finding your solution. sad

Cheers,

Glenys

Joseph will tell us if I'm wrong about the netiquette. wink

Average of ratings: Useful (1)
In reply to Glenys Hanson

Re: httpsrequired problem in 1.9.10+ Unable to use images!

by brian avery -

What's 'bumping'?

The tracker was MDL-24062 but I didn't have time to find it when I replied to Joseph and I figure an incomplete reply is better than silence. Also, the tracker wasn't the sole solution, only partial. (It relates to a code error in insert_images-php.) Part of the problem was that moodle uploaded a batch of images into a strange place and I didn't notice. Yes, it's also possible that I made an error - not least because I didn't spot the fault until I sat and combed my folders in cpanel. I also upgraded, just to be on the safe side.

However, I did post a message saying 'fixed' in the related/follow on post "Help..unable to use images in moodle 1.9.10+" in the general forum. Guess I forgot this one.

Oops.

In reply to brian avery

Re: httpsrequired problem in 1.9.10+ Unable to use images! (Solved - I think!)

by Glenys Hanson -

Hi Brian,

"Bumping" means bringing your message back to the top of the discussion by replying to it yourself so that people see it hasn't been answered. As I said, it's useful to add to what you originally wrote so that others can find it easier to reply to.

When I wrote about "solved", I meant in the title of the message, not in the body. As I've done here because now I think others can find a useful answer. approve

Cheers,

Glenys

Sorry if I was a bit snippy. shy

In reply to Glenys Hanson

Re: httpsrequired problem in 1.9.10+ Unable to use images! (Solved - I think!)

by brian avery -

Ah, okay. Wondered what it meant...! I do that sometimes anyway, but at this time of year there seems little point as few people are online! You can see that by the number of responses made. Everybody else is having too much fun disposing of the sherry!

I'm jealous.