Infopath cannot open form definition xsf. Form contains errors - infopath

While trying to open an InfoPath form (manifest.xsf) in design mode I am getting this message:
InfoPath cannot open the following form: D:\ABC\InfoPath form Template\manifest.xsf The form definition(.xsf) file contains errors.
Details : The Following file is referenced in the .xsf file but is not part of the form : Microsoft.Office.Interop.Excel.dll
Because the form is not ready to open I can't go into the code editor and add references. How do I fix this error?

If it opens on another machine like you say, you could make the change there and copy it over.
Alternatively, if the template is saved as 'source files' you can edit the .xsf with a text editor as it is just an XML file. The entry you're looking for will probably be something like this:
<xsf:file name="Microsoft.Office.Interop.Excel.dll">
<xsf:fileProperties>
<xsf:property name="fileType" type="string" value="refAssembly"></xsf:property>
</xsf:fileProperties>
</xsf:file>

Related

Detecting faulty handlebar/spacebar tags in texteditor : MeteorJS

I want the user to be able to write handlebar tags in a text editor like {{username}} which will be saved in the database to be rendered later in the server using server-side rendering.
However, I want to add a client-side check to see if there is any faulty handlebar tags like {{username} or {username}} or {{username or username}}
I tried using Blaze.renderWithData(), but it didn't throw any error and just rendered the values as is.
Is there a way to detect faulty tags?
Thanks.

2sxc - How To create toolbar button to open custom CSHTML

If I want to create a button for template-editor I am using this code:
#Edit.Toolbar(actions: "template-develop")
But in my template code I also use code like this:
#RenderPage("_pager.cshtml", new { count = data.pCount, active = data.pActive})
And if I want to edit this file: _pager.cshtml I have to go to the server with FTP or RDP and change this file...
Can I and how create "template-editor" button for _pager.cshtml that I can edit it inside web browser?
Wonder why you need to open it through FTP or RDP as you can edit it directly from website by clicking the template name :

setText() fails on Plone object

I fear I may be overlooking something very obvious, but I'd be grateful for any suggestions. I have a plain text file called 'settings' in a Ploneformgen form folder in Plone. The code below successfully alters the text in this file when I put it in a Python script called when the form is viewed using an override in one of the form's fields (e.g. Default Expression in a string field).
obj = context['settings']
obj.setText('Some text:2;More text:2')
obj.reindexObject()
My problem is that I would like to be able to modify the text in 'settings' using either a Custom Script Adapter or a script called using the After Validation Script override of the form. Neither of these work (and overrides in individual fields for validating the field don't seem to allow this either).
Is there some reason why setText() works in some places and not in others (the line obj = context['settings'] doesn't appear to be a problem)? What am I missing?
As far as I can see this isn't a problem of permissions, and I'm a bit baffled that code that works if called when the form is viewed doesn't work if called when the form has been submitted.
I can create a new text file and add text to it using scripts called in these ways no problem: it seems to be a specific problem with calling setText() on an existing file.
The solution is to set the mimetype explicitly when calling setText():
obj.setText("Some text", mimetype='text/plain')
or
obj.setText("Some text", mimetype='text/html')
as appropriate. I don't know why this works, but it does.

CuteWebUI.Uploader (Ajax Uploader)

Q.1. When a image file is uploaded via AjaxUplaoder of CuteWebUI.Uploader it saves file like this
persisted.057fe17e-9707-4f3a-91b7-250239b19c2f.10.JPG.resx
in which "10.jpg" is Image file name and Other "persisted.057fe17e-9707-4f3a-91b7-250239b19c2f.10.JPG.resx" I dont know what is this?
Kindly help me to extract file name from this given format "persisted.057fe17e-9707-4f3a-91b7-250239b19c2f.10.JPG.resx" so that I can show image on Image Control of ASP.Net that is uploaded image file via this Ajax Uploader. This ajax uploader's property 'args.filename' gives file name on 'FileUploaded' event.
look here for the solution of your problem: http://ajaxuploader.com/document/scr/html/How-to-save-uploaded-file.htm

How to Rename my asp.net web page

I have a page name with XYZ.aspx
Now I want to change ABC.aspx how should I do it?
When i directly change it from solution explorer it gives me an error.
Can anyone help me on this?
Thank You
Smartdev
ASP.NET files are usually composed of 1-3 files total depending on the type of project and the file itself. That being said, there is always the markup *.aspx file, then optionally there will be a code-behind *.aspx.cs file and an additional and also optional designer file *.aspx.designer.cs. If you are renaming the file you will need to update code in various places based on the structure of the file itself.
In the event of more than 1 file making up your ASP.NET page you will want to update the .aspx file's header like so:
<%#Page CodeBehind="XYZ.aspx.cs" Inherits="XYZ" %>
to
<%#Page CodeBehind="ABC.aspx.cs" Inherits="ABC" %>
Then in the code behind file
public partial class XYZ : Page { }
to
public partial class ABC : Page { }
Finally, if there is also a *.designer.cs file you will want to update it as well:
public partial class XYZ : Page { }
to
public partial class ABC : Page { }
That should cover all of the files!
To change the name of an aspx file (I'm using vs2012) and associated files single click on filename in solution explorer and single click again to select the name of the file, change the name and enter... vs will rename the code behind file and designer file automatically and change the tags linking them. As nathan above said it does not rename the c# in the code behind to reflect the filename (which would be good practice)... nor importantly does it do a solution wide search for links and more oblique code references to the file. So it's best to do a manual find in files over the entire solution to check and all naming conventions are good.
That should do it

Resources