Forum Discussion
In the past, when we ran into this problem in SharePoint Online, it was always fixed by "Enabling Script" in that site (Set-PnPSite -NoScriptSite $false)
But today, we ran into this problem even on sites where that setting was turned on.
The "solution" that worked was a strange behavior:
- When the file was "dragged and dropped" into the library, it did not work.
- When the same file was "uploaded" into the library, it worked.
When I looked deeper into why this was happening:
When the file was dragged and dropped, the above "No Execute" property on the file was set to 1 and it did not work..
When the file was uploaded using the upload button, this property was set to 0 and it worked.
However, since this is a read-only built-in hidden property, it was not possible to update it through a script.
I believe, this started happening after the recent updates to SharePoint Online Admin portal to control the "Enable Script" behavior through UI (SharePoint Admin Center --> Active Sites --> Change View to 'Custom Script allowed Sites' --> Settings --> Custom Scripts) and the auto-switching they implemented to get it back to Blocked within 24 hours.
Unfortunately the above solution to upload instead of Drag-Drop is not reliable and if anyone can shed any help or pointers to work around this, it will be a great help.
Thanks!
- TichelleBerg-d33 months agoCommunity Member
@Karthik Selvaraj We have the same issue, and as a workaround to having to upload everything, I ran a sync from each document library where I have published eLearning content, and it syncs the library to OneDrive, which I can access through File Explorer on my computer.
Now I can drag (copy) all of my project files EXCEPT the .aspx files (story.aspx and analytics-frame.aspx). Once those files and folders finish syncing (you can tell by the Status symbol in File Explorer), then I just go to the same folder in the appropriate SharePoint document library and use the upload button for those two .aspx files. So far, that's worked perfectly for us. I have site owner permissions on the site, and the other trainers have design permissions, and there have been no issues.
It's not ideal, but it works.
- IraBrown-57cd023 months agoCommunity Member
Hi Tichelle, I tried this exactly as you have instructed but when I click the ellipsis to get the story.aspx > Copy Link> I still receive a download.aspx in the SP link.
Is there anything I'm missing here? Where do you copy the link from for the story.aspx?
Many thanks!!- TichelleBerg-d33 months agoCommunity Member
OK, it sounds like it could be one of two things. Or it could be both.
The document library needs to be in the Classic experience, not the Modern experience. To change this in SharePoint, go to the library settings, and under Advanced, scroll all the way to the bottom and you can change the document library to the Classic experience. You'll need to set it for Classic on each document library where you upload your eLearning (Storyline or other - basically, anything that uses HTML5 and has a .html file that needs to be renamed to .aspx). You have to have at least Design permissions on the library or on the site collection to change to the Classic experience.
The second thing is that there is a setting that our SharePoint folks has to change. It has something to do with allowing you to use custom scripts, which is what our .aspx files are. Sorry, I didn't ask exactly what the setting is. It's not something I have the access or ability to change. But basically, once the setting is turned on, it will allow anything you upload to run correctly. The catch is, it's only good for 24 hours after the setting is changed. So if you are like us and uploading new/updated content almost daily, hopefully your IT/SharePoint folks will be helpful... there is apparently a PowerShell script that allows the tenant to keep custom scripts from reverting. So our IT/SharePoint people have set that up so it runs every day so we can continue to upload and have things work every day.
If you're not a SharePoint person, your SharePoint people should be able to figure it out from what I've explained here, hopefully.
Two more details.
One, that PowerShell script will no longer be available after November. However, custom scripts and .aspx will still be allowed after that time. The difference is that our SharePoint guy is going to write his own custom script to manage that setting for us at that time, so we'll be able to carry on with SharePoint with no additional issues that we can foresee at this time.
Two, if your SharePoint setting needs to be changed to allow you to use custom scripts, you're going to want to delete the files you were working with and upload them fresh AFTER the SharePoint setting is changed.
Hopefully this helps and gives ALL the details, and then some ;)