Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-24062

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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

      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.

        Gliffy Diagrams

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

          Issue Links

            Activity

            Hide
            ppollet Patrick Pollet added a comment -

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

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

            For me too! Came up with upgrade to 1.9.10.

            Show
            andid Andreas Derndler added a comment - For me too! Came up with upgrade to 1.9.10.
            Hide
            brian7454 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
            brian7454 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
            andid Andreas Derndler added a comment -

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

            Show
            andid Andreas Derndler added a comment - Just for a work a round: remove the part where the code cecked the variable $httpsrequired => works again.
            Hide
            andid 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
            andid 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
            brian7454 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
            brian7454 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
            andid Andreas Derndler added a comment -

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

            Show
            andid Andreas Derndler added a comment - Hmm... Here is the insert_image.php from my server. May be this works?
            Hide
            brian7454 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
            brian7454 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
            salvetore 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
            salvetore 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
            salvetore 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
            salvetore 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: