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

Image file picker in WYSIWYG editor inserts broken external links to files in Alfresco repository

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Repositories
    • Labels:
      None
    • Environment:
      2.0 Preview 4+ (Build: 20100826)
      Alfresco 3.3 Community Edition
      PHP 5.2.13
      Firefox 3.6.8
    • Database:
      Any
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      Trying to insert an image link from a configured Alfresco repo via the WYSIWYG editor while selecting the "Link external" checkbox results in broken image URLs.
      In other words, direct linking to image resources in Alfresco does not work right now.

      Turns out that only the node ID is inserted, rather than the full image URL.
      Alfresco's developer wiki lists the proper format(s), here is the one needed for anonymous ("guest") access to a file.
      http://wiki.alfresco.com/wiki/URL_Addressability#Guest_Access

      See attached screen shots for the steps taken.

      Thanks,

      • Stefan

        Gliffy Diagrams

        1. alfresco.patch
          0.8 kB
          Dongsheng Cai
        1. imagefilepicker1.jpg
          131 kB
        2. imagefilepicker2.jpg
          57 kB
        3. imagefilepicker3.jpg
          52 kB

          Activity

          Hide
          ruebezahl Stefan Topfstedt added a comment -

          screenshots highlighting the problem at hand.

          Show
          ruebezahl Stefan Topfstedt added a comment - screenshots highlighting the problem at hand.
          Hide
          dongsheng Dongsheng Cai added a comment -

          Hi, Stefan

          Thanks for the report, I stopped alfresco from using external link, it should always copying files, because it is not very secure to store the ticket in the url...

          Show
          dongsheng Dongsheng Cai added a comment - Hi, Stefan Thanks for the report, I stopped alfresco from using external link, it should always copying files, because it is not very secure to store the ticket in the url...
          Hide
          umontgomery Ulrike Montgomery added a comment -

          Dongsheng,

          Does that mean that you cannot link to Alfreso Documents? Is copying files the only way now? Or will linking be possible again in Moodle 2.1?
          Thanks for letting me know.

          Show
          umontgomery Ulrike Montgomery added a comment - Dongsheng, Does that mean that you cannot link to Alfreso Documents? Is copying files the only way now? Or will linking be possible again in Moodle 2.1? Thanks for letting me know.
          Hide
          elenaivanova Elena Ivanova added a comment - - edited

          We do need to allow External links for Alfresco repository.
          This repository and the security threats associated with direct linking is no different from any other repository. Thus, if the admin already allows external linking for an installation, Alfresco should also provide this option.
          I believe we need to reopen this ticket.
          Thank you!

          p.s Related discussion: http://moodle.org/mod/forum/discuss.php?d=168495

          Show
          elenaivanova Elena Ivanova added a comment - - edited We do need to allow External links for Alfresco repository. This repository and the security threats associated with direct linking is no different from any other repository. Thus, if the admin already allows external linking for an installation, Alfresco should also provide this option. I believe we need to reopen this ticket. Thank you! p.s Related discussion: http://moodle.org/mod/forum/discuss.php?d=168495
          Hide
          ruebezahl Stefan Topfstedt added a comment -

          Dongsheng,

          External linking should still be possible, at least to publicly accessible content. (In Alfresco terms - content that has at least "Consumer"-role level permissions for the "guest" user assigned to it).
          Links to content in Alfresco should be stored in "mdl_url" table, similar to URLs for Flickr-images.
          Moodle then should be append the "guest=true" query parameter to the target URL before redirecting the request.

          On a related note, it would be helpful to do a check for Alfresco access permissions during resource linking in Moodle.
          In other words, if a user links to a content item in Alfresco via the file browser then they should be alerted if the selected resource is not publicly viewable.

          Hope this makes sense.

          Show
          ruebezahl Stefan Topfstedt added a comment - Dongsheng, External linking should still be possible, at least to publicly accessible content. (In Alfresco terms - content that has at least "Consumer"-role level permissions for the "guest" user assigned to it). Links to content in Alfresco should be stored in "mdl_url" table, similar to URLs for Flickr-images. Moodle then should be append the "guest=true" query parameter to the target URL before redirecting the request. On a related note, it would be helpful to do a check for Alfresco access permissions during resource linking in Moodle. In other words, if a user links to a content item in Alfresco via the file browser then they should be alerted if the selected resource is not publicly viewable. Hope this makes sense.
          Hide
          carsontam Carson Tam added a comment -

          Hi Dongsheng,

          We would like to see this ticket reopen, too. We also want links to our Alfresco repository. If the document/image file allows guest access on Alfresco, it should be accessible without the ticket string. For resource links on the course section, I think it makes sense to bring up the Alfresco login page when users click on the link. That will also keep the Alfresco file permission integrity intact. I guess as a future enhancement, if Moodle can be configurated to SSO into Alfresco, the links to Alfresco could become seamless.

          Thank you!

          Show
          carsontam Carson Tam added a comment - Hi Dongsheng, We would like to see this ticket reopen, too. We also want links to our Alfresco repository. If the document/image file allows guest access on Alfresco, it should be accessible without the ticket string. For resource links on the course section, I think it makes sense to bring up the Alfresco login page when users click on the link. That will also keep the Alfresco file permission integrity intact. I guess as a future enhancement, if Moodle can be configurated to SSO into Alfresco, the links to Alfresco could become seamless. Thank you!
          Hide
          umontgomery Ulrike Montgomery added a comment -

          Hi Dongsheng,

          We would like to see this ticket reopen, too. Linking to Alfresco very important for our schools in Germany.

          Thanks a lot.

          Show
          umontgomery Ulrike Montgomery added a comment - Hi Dongsheng, We would like to see this ticket reopen, too. Linking to Alfresco very important for our schools in Germany. Thanks a lot.
          Hide
          snydert Tamara Snyder added a comment -

          Would it be possible for a patch to be provided which restores proper insertion to an external link? It's easy enough to undo the changes in this patch so that the option to use an external link is back on the filepicker, however the actual link inserted from Alfresco lacks a working link to the Alfresco server and the storeage space. This is critical functionality for our users - a patch would be greatly appreciated.

          Thanks very much.

          Show
          snydert Tamara Snyder added a comment - Would it be possible for a patch to be provided which restores proper insertion to an external link? It's easy enough to undo the changes in this patch so that the option to use an external link is back on the filepicker, however the actual link inserted from Alfresco lacks a working link to the Alfresco server and the storeage space. This is critical functionality for our users - a patch would be greatly appreciated. Thanks very much.
          Hide
          dongsheng Dongsheng Cai added a comment -

          Hi,all

          I attached a patch to make external link possible for alfresco repository.

          I cannot reopen this ticket because it is already closed, but feel free to create a new ticket, and kindly assign it to me.

          Thanks!

          Show
          dongsheng Dongsheng Cai added a comment - Hi,all I attached a patch to make external link possible for alfresco repository. I cannot reopen this ticket because it is already closed, but feel free to create a new ticket, and kindly assign it to me. Thanks!
          Hide
          snydert Tamara Snyder added a comment -

          Thank you Dongsheng for responding so quickly to our request for a patch. We have implemented it and so far our tests are working well. I truly appreciate your help!

          Thanks very much,
          Tammy

          Show
          snydert Tamara Snyder added a comment - Thank you Dongsheng for responding so quickly to our request for a patch. We have implemented it and so far our tests are working well. I truly appreciate your help! Thanks very much, Tammy
          Hide
          elenaivanova Elena Ivanova added a comment -

          I have submitted MDL-26451
          Thank you, Dong!

          Show
          elenaivanova Elena Ivanova added a comment - I have submitted MDL-26451 Thank you, Dong!

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: