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

HTML block displays draftfile.php urls when editing existing blocks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not a bug
    • Affects Version/s: 3.10.4, 3.11, 4.0
    • Fix Version/s: None
    • Component/s: Blocks
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE

      Description

      Steps:

      • Access dashboard.
      • Add HTML block .
      • Configure the block and drop an image.
      • Check content HTML. It should be something like 

        <img src="http://localhost/draftfile.php/5/user/draft/566575671/Image%20%281%29.jpeg" alt="Image" class="img-fluid">
        

      • Save changes and access Dashboard.
      • Check block HTML. Image URL is converted into pluginfile URL:

        <img src="http://localhost/pluginfile.php/46/block_html/content/Image%20%281%29.jpeg" alt="Image" class="img-fluid">
        

      • Configure the block and view content HTML. Image URL is converted back to draftfile URL:

        <img src="http://localhost/draftfile.php/5/user/draft/566575671/Image%20%281%29.jpeg" alt="Image" class="img-fluid">
        

      Should draftfile url be converted into pluginfile url?

      It seems like files are supposed to be located in users' draft area when firstly added. But after the block gets saved they need to be moved to html_block content area.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mikhailgolenkov Mikhail Golenkov
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: