Don't display Alert if web content is just a Sakai resource

Description

Steps to replicate:

1) Upload a word doc as a Sakai resource
2) Capture link to the Sakai resource
3) Create new web content
4) Modify web content to be the link to resource
5) View the web content

Alert: This page seems to have trouble loading. Re-launch page in a new window.

relates to

Activity

Alan Regan May 4, 2018 at 11:28 AM

Oooh!  Fascinating side note. If you create the Web Content link within Resources, the alert doesn't display.

  1. Upload a Word doc in Resources

  2. Next to the new Word doc, click Actions > Make Web Content link

  3. Enter an appropriate title and then click Add

  4. Click the resulting Web Content link in the left menu... the download happens but the alert error does not display (not in Chrome or Firefox.

Is there something in the process of making a Web Content link directly from the Resources tool (vs. copying the link and using Manage Tools) that will prevent the alert from displaying?

Alan Regan May 4, 2018 at 11:18 AM
Edited

Stumbled across this item.

To address Sam's point, I agree that the error message should not display if the Web Content is pointing to a document in Resources.  The steps I used to replicate on Trunk (Sakai 13.x):

  1. As a standard user (e.g. Instructor) in a course or project site...

  2. Resources > Upload Files > upload a Microsoft Word file (.docx).

  3. Still in Resources, next to the newly uploaded Word doc, select Actions > Edit Details.

  4. Click "File Details" to expand the file location and copy the direct URL for the document.

  5. Site Info > Manage Tools > click Web Content > Continue > give it a title and paste the URL > Continue > Finish.

  6. Click the title of the new Web Content link.

  7. In Chrome 66.0.3359.139 for Windows 10 64-bit, the file download happens.

  8. Wait maybe 5-10 seconds... and a red alert box displays, "Alert: This page seems to have trouble loading. Re-launch page in a new window." (And the close "x" drops the next line rather than top right of the red alert box...)

NOTE: Same thing happens in Firefox 59.0.3 (64-bit) for Windows 10. Interesting, though – the alert does not display in Microsoft Edge (Microsoft Edge 41.16299.371.0).

I'm not sure how to make it happen, but if the Web Content link is a document, not a web page, then the alert shouldn't display if it is going to simply download the file.

NOTE #2: I did not edit the Web Content page to open in a new window. I kept all of the defaults when I created the Web Content link.

I like 's comment about using a viewer to display the content rather than force a download. This would be ideal since most people want to view the content and not have to download, open, etc. If browsers support a viewer, this would be a fantastic addition.

Matthew Jones August 22, 2016 at 6:40 PM
Edited

Any specific browser or server? When I do this in Chrome 52/Win 10 on trunk mysql it just shows a blank page and downloads the file. When I click "Open in new window" it downloads when I click it.

Are there any errors in the console? It doesn't seem like a great idea to make a word doc web content directly.

I think a really cool thing that we could do is have the web content render the content either in Microsoft View or Google Viewer if it detects a document file as part of the link.

It seems to me like the both viewers work pretty well.

Idea from: http://stackoverflow.com/a/27958186/3708872

Details

Priority

Affects versions

Components

Assignee

Reporter

Created August 18, 2016 at 1:20 PM
Updated May 4, 2018 at 11:28 AM