Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XSLT file picker in Umbraco Forms can't access files from media (when not using file system) #715

Closed
AndyButland opened this issue Feb 3, 2022 · 0 comments

Comments

@AndyButland
Copy link

AndyButland commented Feb 3, 2022

A brief description of the issue goes here.
Objects uploaded to the Media library in Umbraco Cloud (new infrastructure Umbraco 8) are inaccessible to the XSLT file media picker in Umbraco Forms.
This is preventing from using XSLT files to transform the XML before posting it to an API endpoint.

Reproduction
If you're filing a bug, please describe how to reproduce it. Include as much
relevant information as possible, such as:

Bug summary
Specifics
This was tested on:
Umbraco: 8.17.2
Umbraco.Forms: 8.10.2

Mentioned before in:
#477 (comment)

Steps to reproduce

  1. Log into any Umbraco 8 Umbraco Cloud site using the new infrastructure
  2. Click "Media" from the navigation menu
  3. Upload a test file like sample2.xslt
  4. Click "Forms" from the navigation menu
  5. Create new form or edit an existing form
  6. Click "Configure Workflow"
  7. Add the Workflow "Post as XML"
  8. At "XSLT File" click "Pick" and select the XML file uploaded to the media folder
  9. Save the form
  10. Publish the form or visit the published form
  11. Fill in the form and submit.
  12. Browse to Settings -> Log viewer and check the errors
Exception
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\home\site\wwwroot\media\325jzesq\sample2.xslt'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
   at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.Xsl.Xslt.XsltLoader.CreateReader(Uri uri, XmlResolver xmlResolver)
   at System.Xml.Xsl.Xslt.XsltLoader.Load(Compiler compiler, Object stylesheet, XmlResolver xmlResolver)
   at System.Xml.Xsl.Xslt.Compiler.Compile(Object stylesheet, XmlResolver xmlResolver, QilExpression& qil)
   at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
   at Umbraco.Forms.Core.Data.Helpers.XsltHelper.TransformXML(String xml, String xsltFile)
   at Umbraco.Forms.Core.Providers.WorkflowTypes.SendXsltEmail.Execute(Record record, RecordEventArgs e)

// @Deepti-Des

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant