Moodle
  1. Moodle
  2. MDL-24062

Coding error (undefined $httpsrequired) in lib/editor/htmlarea/popup/insert_image.php

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.9.9
    • Fix Version/s: None
    • Component/s: HTML Editor (TinyMCE)
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Rank:
      6278

      Description

      The code checks the variable $httpsrequired on line 14. However, this variable is not defined anywhere. I'm not sure what the intention was.

      1. insert_image.php
        14 kB
        Andreas Derndler
      1. screenshot_046.png
        62 kB

        Issue Links

          Activity

          Hide
          Patrick Pollet added a comment -

          Yes it started to appear for me with Moodle 1.9.10. Regression ?

          Show
          Patrick Pollet added a comment - Yes it started to appear for me with Moodle 1.9.10. Regression ?
          Hide
          Andreas Derndler added a comment -

          For me too! Came up with upgrade to 1.9.10.

          Show
          Andreas Derndler added a comment - For me too! Came up with upgrade to 1.9.10.
          Hide
          Brian Avery added a comment -

          Me too. It stops me using or inserting images on my site. Was this aimed at the new 'Moodle for blind' release, perhaps?

          Show
          Brian Avery added a comment - Me too. It stops me using or inserting images on my site. Was this aimed at the new 'Moodle for blind' release, perhaps?
          Hide
          Andreas Derndler added a comment -

          Just for a work a round: remove the part where the code cecked the variable $httpsrequired => works again.

          Show
          Andreas Derndler added a comment - Just for a work a round: remove the part where the code cecked the variable $httpsrequired => works again.
          Hide
          Andreas Derndler added a comment -

          Because of Brian Avery's question per mail here how i solved the problem for my site:

          1) edit the php-file `insert_image.php` in `\moodle\lib\editor\htmlarea\popups\`
          2) go to line 14 where it says `if ($httpsrequired or (!empty($_SERVER['HTTPS']) and $_SERVER........`
          3) remove the part `$httpsrequired or` so the skript looks like:

          `if ((!empty($_SERVER['HTTPS']) and $_SERVER['HTTPS'] != 'off'))`

          4) save the file and test ist.

          NO GUARNTEE!!!!

          Show
          Andreas Derndler added a comment - Because of Brian Avery's question per mail here how i solved the problem for my site: 1) edit the php-file `insert_image.php` in `\moodle\lib\editor\htmlarea\popups\` 2) go to line 14 where it says `if ($httpsrequired or (!empty($_SERVER ['HTTPS'] ) and $_SERVER........` 3) remove the part `$httpsrequired or` so the skript looks like: `if ((!empty($_SERVER ['HTTPS'] ) and $_SERVER ['HTTPS'] != 'off'))` 4) save the file and test ist. NO GUARNTEE!!!!
          Hide
          Brian Avery added a comment -

          Andrea, the code removes the previous warning. However, I still can't add images. I just get a nice empty box and the alt text. Ho hum. Maybe that's unrelated.

          Show
          Brian Avery added a comment - Andrea, the code removes the previous warning. However, I still can't add images. I just get a nice empty box and the alt text. Ho hum. Maybe that's unrelated.
          Hide
          Andreas Derndler added a comment -

          Hmm... Here is the insert_image.php from my server. May be this works?

          Show
          Andreas Derndler added a comment - Hmm... Here is the insert_image.php from my server. May be this works?
          Hide
          Brian Avery added a comment -

          Andrea, thanks but mine was the same as yours. Seems there were 2 problems combining. Image insertion now fixed and your workaround for this fixed the initial problem. Thanks.

          Show
          Brian Avery added a comment - Andrea, thanks but mine was the same as yours. Seems there were 2 problems combining. Image insertion now fixed and your workaround for this fixed the initial problem. Thanks.
          Hide
          Michael de Raadt added a comment -

          Thanks for reporting this issue.

          We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

          If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

          Michael d;

          lqjjLKA0p6

          Show
          Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
          Hide
          Michael de Raadt added a comment -

          I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

          Show
          Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

            People

            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: