I am following the Symblog tutorial at http://tutorial.symblog.co.uk/,
and am stuck around the beginning of Chapter 2, just before the "Contact
Entity" section in the tutorial.
Instead of the contact form I'm supposed to view, I get this error message :
Unable to find template "BloggerBlogBundle:Page:contact.html.twig"
(looked into: app/Resources/views,
vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).
500 Internal Server Error - InvalidArgumentException
1 linked Exception: Twig_Error_Loader
The template is located at src/Blogger/BlogBundle/Resources/views/Page/.
Why isn't Symfony looking for it in the right place ? This problem is all
the more mysterious to me as it does not occurr with another template
that's a "carbon copy" of contact.html.twig, namely about.html.twig.
The answers at Unable to find Twig template using render method in Symfony 2
and at Symfony cannot find the template file
suggest a typo in the template name, but that does not apply in my case.
I had this exact problem and ended up finding that on my Windows development machine the built in server did not care about capital letters in the filename path, it was NOT case sensitive. Then when I deployed my application to my remote server it was case-sensitive, I had one letter capitalized in a directory name which ended up wasting 30 minutes of my time.
Related
Everything worked yesterday without any errors.
Today though, I created a new page and tried to load it, which returned an error. so I went and rebuilt the solution, and now I have this error on every page on my site.
error description:
Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Could not load type 'xxxx.Global'.
Source Error:
Line 1: <%# Application Codebehind="Global.asax.cs" Inherits="xxxx.Global" Language="C#" %>
Source File: /global.asax Line: 1
I tried to look up the error, but the solutions I managed to find didn't solve the problem, I would love some help as I am truly lost about what had caused this.
EDIT: so I tried deleting the Global.asax file and running the site, which caused the first line in all my pages to return an error messege. still trying to find a solution.
Managed to solve it, Here's what finally worked for me -
first, in the first line of your aspx pages, Masterpage.Master and Global.asax you'll need to replace CodeBehind with CodeFile.
(in order to access your Global.asax code open it through the directory with a text editor).
after that, in your Global.asax.cs code, change public class Global : System.Web.HttpApplication to public partial class Global : System.Web.HttpApplication.
worth noting - this is a mishmash of a number of solutions that I found while googling, trying these separately first could also solve the bug.
You can try to set the CPU to x64 in visual studio to slove this issue:
On the menu bar, choose Build, Configuration Manager.
In the Active solution platform list, choose a 64-bit platform for the solution to target, and then choose the Close button.
If the platform that you want doesn’t appear in the Active solution platform list, choose New. The New Solution Platform dialog box appears.
In the Type or select the new platform list, choose x64.
If you want to copy the settings from a current platform configuration, choose it, and then choose the OK button.
If this does not solve your problem, you can also refer to the solution in this link:
Could not load type 'XXX.Global'.
When using the Symfony2 plugin for PHPStorm, I sometimes see a Weak Route warning:
What does it mean?
Worked it out. The Symfony2 plugin parses the appDevDebugProjectContainer.php file to get route and service information. However this file is only recompiled when the web page is loaded which means newly created routes are not included.
To get around this the plugin also parses the config files but this is not 100% reliable so routes discovered in this way are marked as "weak". Reloading the web page will make the warning go away.
I finally fixed this issue for my situation (Symfony 2.8 / PhpStorm 2016.3).
It's similar to #Atmarama 's solution but I think my version of PhpStorm (2016.3) is different and/or Symfony 2.8.
My solution also doesn't involve the deprecated setting. I hope this will help others:
In PhpStorm go to Languages & Frameworks > PHP > Symfony > Routing and add the path to appDevProjectContainerUrlGenerator.php.
In my case this is:
var/cache/dev/appDevDebugProjectContainerUrlGenerator.php
Check path to file urlGenerator
For me right path is:
var/cache/dev/appDevDebugProjectContainerUrlGenerator.php
And after make click to button "Clear Index" above
I also get the same problem and in my case, because i use '/' to declare the render template instead of ":"
Changing from "/" to ":" cleared that warning in my case
I have a browser-based InfoPath 2010 form. I'm getting an error opening the form in one environment. It works in at least three other environments. The error is:
The form template failed to load... Type: XmlException, Exception Message: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method.
I have seen this question posted around the Web, but the answers are vague and varied and are centered around products besides InfoPath. We also have other forms working in the environment where this form is failing, so it's something related to this particular form in this particular environment.
Problem solved. The error message was misleading, but turns out one of the data connections had a URL pointing to the wrong SharePoint farm. It was supposed to be pointing to the local form library. Cross platform calls tend not to work.
Basically make sure that the domain name in the connection file is matching the domain name where you're publishing your form.
For example, if your InfoPath form is located in:
https://extranet.MySiteName.com/The-Rest-Of-Your-Domain-Name
then make sure that all the domains (in this example extranet.MySiteName.com/)
in your data connection file match. The connection file line may look similar to this:
<udc:Query>
https://extranet.MySiteName.com/_vti_bin/My-WCF-Services/My-Data-ServiceName.svc/
</udc:Query>
When I tried to modify Microsoft forefront Unified access login.asp page and pages that comes with it ,
I prepared my custom files for css; inc files ; InstallAndDetect ..etc
but When i inserted those files under CustomUpdate folders i got this error :
" An error occurred on the server when processing the URL. Please contact the system administrator. "
I tried files i prepared before by putting them in the place of the default files propvided by the system.
Ofc the naming is respecting when using customupdate files!!
Do you have any idea how can I solve this issue??
I'm afraid I don't have a proper picture of what exactly might have caused the problem in your case.
But I just went through resolving the same error message on my system (2012 R2, IIS 8) (while searching for the solution I came across your post)
And it turned out that what was causing my problems was the use of classic ASP parent paths (with "../" in them)
Switching to absolute and virtual paths solved the issue for me.
See here: http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-parent-paths-are-disabled-by-default
Thank you for your answer.
Actually there was a bug with the product itself.
It didn't recognize the path to the CustomUpdate folder for any of custom folders in InternalSite folder.
I had to ask for a hot fix from Microsoft support to be able to use customized files (CSS , asp, images ).
Once the fix was installed, everything was working fine and I was able to see the customization I have done to the login page.
I am currently migrating from Tridion R5.3 to Tridion 2011. I am having issues with serving some pages through the presentation server. For reference all of my web pages are classic ASP and I am running them on IIS7.5.
I have have a page located at http://www.example.com/widget/index.asp. When I first access the page I get a The page cannot be displayed because an internal server error has occurred., if I then refresh the page it loads fine, if I refresh the page a third time it comes up with the error. The page works every other request.
I have enabled Failed Request Tracing on my website and I am getting the error
ASP_LOG_ERROR
LineNumber: 87
ErrorCode: 800706be
Description:
Note there is no description.
The code being called is
85: Dim objTranslationPageLink
86: Set objTranslationPageLink = Server.createObject("cd_link.PageLink")
87: strTranslatedPageLink = objTranslationPageLink.GetLinkAsString("tcm:0-12-1", "tcm:12-123456-64", "", "", "TranslationFound", False)
88: Set objTranslationPageLink = Nothing
It looks like there is no problems creating the cd_link.PageLink object, just when calling the GetLinkAsString(...) function.
I use the cd_link.PageLink object in lot of other pages with no problems but it seems with pages that use this specific piece of code experience the problems.
I was thinking it could be something to do with caching pages however I turned off caching of ASP pages (IIS7 > ASP > Services > Caching Properties) and still had the problem.
Any ideas?
edit1
The code worked fine on Windows Server 2003 IIS6. I am trying to make it work on Windows Server 2008 IIS7.
edit2
It appears that the page is creating a lot of cd_link.ComponentLink and cd_link.PageLink objects. I have a test page in which I create 10 ComponentLink objects I get the error (every other page) but if I reduce this to 5 ComponentLink objects it works every time.
edit3
My cd_core.xxxx.xx.xx.log has the following errors
2012-11-02 11:55:34,027 ERROR XMLConfigurationReader - Error while validating file 'cd_link_conf.xml' with schema 'schemas/cd_link_conf.xsd'. cvc-complex-type.3.2.2: Attribute 'DefaultRootLocation' is not allowed to appear in element 'Publications'.
edit4
Thanks for bearing with me. The problem I was having with my cd_link_config is fixed and doesn't appear to have been be related. I now have no errors in my any of the four log files (cd_core, cd_deployer, cd_monitor, cd_transport) but the original issue persists.
Looks like you are running the CD Link windows service and the following hotfix might help to resolve your issue. I have not tried this hotfix but the description says Page link fails on second attempt of accessing the page, so that means it might work sproadically depending on the logger memory resources.
Anyway worth looking at this hotfix : CD_2011.1.0.78355
Description: The Linking windows service was not correctly cleaning up a logger memory resource on certain windows platforms
It is a long time since I worked with Classic ASP and SDL Tridion, but double check the following
Is the linking service running on the server?
Check your cd_licenses.xml file is in place
Validate that you have a correct cd_link_conf.xml and cd_storage_conf.xml (these changed from 5.3 I believe)
Look in the Application and Tridion event logs for clues
The Tridion linking log files
That error code seems to imply that the Linking DLL is not registered properly.
That is all I can think of for now.
I didn't realise that 2011 actually schema-validates the config files, but in any case, now the error is clear. I'd suggest doing the validation yourself in an XML editor such as XML Spy. That should point out exactly what's wrong with the configuration file.
To routinely check your configurations, you may find it interesting to script it as described here.