Umbraco error in Document Types - templates

A long time ago I first setup a website in Umbraco. This seemed to be working fine.
I have now come back to it about a year later, and was initially getting the following error when selecting a Document Type (any document type in the Settings tab):
A bit weird, because earlier I didn't have this issue, but fine. I do what it says, and add <identity impersonate="true"/> to the <system.web> node in web.config.
While it does fix the initial issue, I now have the following on all document types:
When trying to create a new Document Type, I get the same kind of error, but then the ReturnUrl part is ReturnUrl=/umbraco/create.aspx?nodeId=init&nodeType=inittemplates&nodeName=Templates&rnd=20.2&rndo=21.2&nodeId=init&nodeType=inittemplates&nodeName=Templates&rnd=20.2&rndo=21.2' - but only if I tick the box 'Create template for this item'. The same happens when I try and create a Template.
After Googleing I came up with this: our.umbraco post with similar issue. One (unconfirmed) solution is that there's an illegal name in a document type/ template - but I haven't changed anything, and might be fixed by going into the database.
I did check the /masterpages folder, the only 'strange' characters in there are - and _.
In my Document Types I have on named 'Textpage (Two col)' and another named 'News & Events list'. I'm a bit hesitant to just delete them, since I don't have enough Umbraco knoledge to be sure this will fix my issue...
Is there any known solution for this, or will I also have to go into the database (and if so, whereabouts?)
I'm running Umbraco 4.7.2, assembly version 1.0.4500.21031.
I've hosted this site with GoDaddy.com - I don't know if that would be relevant.
[Update 1]
As per Tom Maton's comment:
The requirepermissions should be set to false, and have been.
in Appsettings I've set this:
<add key="umbracoUseMediumTrust" value="true" />
And I've added Trusted_Connection=yes to the connectionstring.
the problem remains.
[Update 2]
Tried the solution amelvin provided, but no dice. Doctypes and templates still give the error. I'm getting more certain it's some security issues. Which folder would correspond to the Templates? Would that be the masterpages folder? If so, what kind of permissions does that one need?

It could be that you don't have full trust on your Go Daddy environment?
Check this post out http://our.umbraco.org/forum/getting-started/installing-umbraco/17856-Umbraco-on-GoDaddy-Shared-Hosting
Could help resolve your issue.

The error could be a knock on from permissions errors as yet unsolved.
But the error is thrown if the content page does not have a template assigned or if Umbraco thinks it doesn't have a template. If absolutely nothing has changed to the site then it could be that the umbraco.config file has somehow got corrupted (it will contain all the doctype/template cross reference info). This can be fixed by right clicking on the top 'content' node and choose 'republish entire website'.
Secondly navigate to the settings | document types (if you can now) and check the templates dropdown on the first tab of the appropriate document type. If its set to 'please select' then this error will get thrown when any page tries to render without a valid template assigned. If a default template is assigned - then go to that template and re-publish it - Umbraco may have lost it.
If this does not work then check if the template is assigned properly. Go to the same place in the content tree as the problem page and try to add a node with the desired doctype. If no choices are offered then it could be that the parent tab no longer allows the correct doctypes as children nodes, so go back to the doctypes and check the allowed children (second tab) of the parent node.
If none of this works without odd errors being thrown then its a mystery!

Here are a list of Permissions required for Umbraco http://our.umbraco.org/wiki/reference/files-and-folders/permissions
Or you could use one of the steps below to check all the folder permissions.
http://our.umbraco.org/wiki/reference/files-and-folders/permissions/perform-permissions-check
Or install this package. http://our.umbraco.org/projects/backoffice-extensions/ugolive this will allow you to check the permissions are correctly setup.

Related

SwitchMasterToWeb.config in Sitecore 8.1 Update 2 missing patch for sitecore_list_index

Last week I upgraded from Sitecore 8.0 Update 5 to Sitecore 8.1 Update 2.
I ran into one issue where the SwitchMasterToWeb.config example included with Sitecore 8.1 Update 2 does not seem to include a patch to delete sitecore_list_index. This patch does exist in Sitecore 8.1 initial release???
Without the patch, this error is thrown (https://kb.sitecore.net/articles/347205) Manually adding the patch removes this error. Was the removal of the patch an error on the part of Sitecore? Or is there something I need to do to avoid this error from being thrown?
I also note there does not appear to be a patch to remove: sitecore_marketingdefinitions_master I would think that should also be removed with SwitchMasterToWeb.config. Is there a reason that reference to a master index was not patched?
I agree with Jay that SwitchMasterToWeb.config has never been implemented without noticing a few issues.
The reason you get that error is because there is no 'syncMaster' index update strategy is usually deleted along with all 'master' database indexes. That may have been deleted in the SwitchMastertoWeb.config file as well. Check to see if this exists in the file -
<indexUpdateStrategies>
<syncMaster>
<patch:delete />
</syncMaster>
</indexUpdateStrategies>
Deleting 'sitecore_list_index' may also cause you some issues. The issues caused by deleting 'sitecore_list_index' maybe the reason that Sitecore left it out of SwitchMasterToWeb.config file. Here is an issue caused by deleting 'sitecore_list_index' - http://sitecoreunleashed.blogspot.com/2015/07/sitecore-8-update-3-cd-servers-and.html.
To get around the issues above, we set the index update strategy of 'sitecore_list_index' to 'onPublishEndAsync' instead of deleting it.
<index id="sitecore_list_index">
<strategies>
<strategy ref="contentSearch/indexConfigurations/indexUpdateStrategies/onPublishEndAsync" patch:instead="strategy[#ref='contentSearch/indexConfigurations/indexUpdateStrategies/syncMaster']"/>
</strategies>
<locations>
<crawler>
<Database>web</Database>
</crawler>
</locations>
</index>
You can even try to set the indexUpdateStrategy to 'manual' instead of onPublishEndAsync and check the logs for issues. Manual strategy only builds an index when you tell it to via code or from the Sitecore interface.
To read more about Index Update Strategies, try this link - https://dev.sitecore.net/sitecore_experience_platform/setting_up__maintaining/search_and_indexing/indexing/index_update_strategies
To this day, I have never been able to launch a site (without errors) using the out of the box SwitchMasterToWeb. It always seems to miss something that was newly introduced, or is in a subfolder that patches in after, or some other reason.
You have most likely identified a bug in the SwitchMasterToWeb file for 8.1 Update 2 and should log a ticket with Sitecore identifying the issue. In the meantime, you'll need to deploy your own patches to resolve the issue. If you provide this to Sitecore in your ticket, they could then use that for future fixes to the SwitchMasterToWeb.
It is also possible that Support has already received this issue from another client and may have a patched SwitchMasterToWeb to provide you for your usage.

Sitecore 7.2 Media Library images not working with underscore in the name

I just upgraded a client's test installation of Sitecore to 7.2 (SP1) and now, any image that has an underscore in its name is throwing a 404 error when being referenced by a page. This was actually a series of upgrades from 6.4 so it's quite possible that a config setting somewhere got missed along the way, but I don't see anything standing out at me that would cause this problem.
If I change the image name to not have an underscore, it works fine, and it also works fine if I set "Media.UseItemPaths" to false, but they would prefer it if their image URL's had the file name displayed.
Can anyone help identify what may have gone wrong?
Due to a change in Sitecore 7.1, any replacements specified in encodeNameReplacements are now also applied to media items as well as regular items in the content tree.
One option is to remove the replaceWith="_" declaration, but the likely reason this was added was to possibly replace spaces in your URLs so they do not display with %20. Removing this declaration will mean they return!
You can instead apply the fix specified in this Sitecore Knowledgebase article: Sitecore is unable to open media items when using encodeNameReplacements

Can't refresh CFC CF9 when using an application.cfm

I was charged with making some modification to an old application, and I created a new page which was being passed a URL parameter page_name, which is a you guessed it a name of a page with .cfm appended. So, in my haste, I continued using it, and was building out my CFC and using the page_name as the identifier for a record. Then I realized that there is a possibility of that name being duplicated in the table, and changed that url parameter to use the page_id, which is unique. I modified my CFC to use the new key, and nothing worked. So I started going through my code and figured I made a typo, started commenting things out, and finally dumped out my CFC object and voila, none of the edits I made were actually being used. This was fairly obvious, since page_name was a string, and page_id was numeric.
So I started googling,The first thing I saw as adjust things in the CFAdmin. I don't have access to it, and restarting the server isn't an option since I'm using an RDS to live code. The next thing I tried was to add applicationStop(), onApplicationStart(), to my Application.cfc. Well the problem is that the Application.cfc, is actually an Application.cfm. So after fiddling with the <cfapplication ... > tag, and nothing being updated, I'm here asking for help.
So is there a quick fix for this? Should I go ahead and create an application.cfc? I hope I explained myself, and sorry for all the text.
Confirm that your cfc is bound to either the session or application scope.
If it is, then you can rename the application in application.cfm and it will reset the object.
If your cfc is NOT bound to session or application scope, you have a cacheing issue. You need to go the the CF admin -> Server Settings -> Cache tab and uncheck component cache and possibly some others.
For further recommendations, ColdFusion Components Inheriting Functions Of Others
Sounds like you have been painted into a corner. Last option IF you have access the the server it self and can get into the C:\ or whatever drive that ColdFusion have been installed on, you can just manually delete the generated Java Class files that the server is using that has the old code. When ColdFusion sees there is no Class file it will recompile the newly changed file and whoa black betty go bam-a-lam your changes will be in production.
For more information here is an posting you can read up on: http://kalyan-coldfusion.blogspot.com/2010/08/how-coldfusion-works-and-its-key.html
Cheers

Coldfusion CFC Mapping to external directories with CFCs that reference other folders

I've done some poking around and trial and error but I'm not coming up for a solution to this problem I have.
I have a folder structure like this (example)
Application.cfc
Objects\
Object.cfc
Utilities\
Util.cfc
API\
Resources\
index.cfm
Application.cfc
I have one site that points to the API folder (http://api.site.com) and another that points to the overall root (http://site.com)
From Api\Resource\index.cfm. I'm trying to createObject() on Objects\Object.cfc. I set up a mapping, either in CF Admin, or API\Application.cfc with this.mappings["/SiteRoot"] = "C:\wwwroot". Inside the index.cfm I do createObject("component","SiteRoot.Objects.Object"). This correctly access the Object.cfc.
The issue I'm having is that it fails because Object.cfc instantiates the Utilities\Util.cfc just by createObject("component","Utilities.Util"). The error is that Utilities.Util cannot be found.
There are other files in the very bottom root that can obviously call Object.cfc with no problems since it just goes into the Utilities folder naturally.
Any suggestions Or do I really need to just break the API Folder out of this root entirely?
Thanks!
UPDATE
It's not letting me answer my own question just yet but I wanted to post here before others chimed in.
Despite reiniting the application and restarting the application server, once or twice it wasn't working. Then suddenly, it just went and worked as I would have expected. Object.cfc could find Util.cfc correctly based on it's relative path.
I gave upvotes to those who responded as they were perfectly viable alternatives and solutions and would have gone with one of them had this not just started working. Demons, I tell you. Demons.
Thanks!
I think I would change your second create object call (the utilities one) to createObject("SiteRoot.Utilities.Util") ? Making sure that one mapping "governs" the starting point for all the objects no matter where instantiated.
If you really cannot change your code then just create a ColdFusion mapping called Utilities pointed at the Utilities folder.

Sitecore Workbox Generating Odd Error

I've run into a problem in the Wokbox that seems like a Sitecore bug. When the "Items per Page" drop down is set to anything but "All", I'm able to expand the "Draft" and "Awaiting Approval" lists in the Workflow.
But when the "Items per Page" is set to "All", I get the following error:
Exception in MyWebSite: /sitecore/shell/default.aspx?xmlcontrol=Workbox&mo=preview
Message: Operation is not valid due to the current state of the object.
StackTrace: at System.Web.HttpValueCollection.FillFromEncodedBytes(Byte[] bytes, Encoding encoding)
at System.Web.HttpRequest.FillInFormCollection()
And at this point, I'm "stuck" - and unable to revert my view back to anything less than "All" in the "Items per Page" drop-down. So, because I cannot revert back, I cannot do anything on the page, and any attempt to expand the Workflow lists (or do anything on the page) generates the above error.
Any thoughts on what is happening and how to fix this?
I followed up on this to keep from leaving this question unanswered. It turns out that this issue was related to another known issue. For the benefit of those who might be getting a similar issue, here's what fixed this:
The problem can occur when Sitecore CMS is installed on systems that have Microsoft security update MS11-100 installed.
Please refer to the similar known issue on SDN:
The Template Builder may fail when saving templates with many fields
The solution:
Try to add the following node to the section of the web.config file:
<add key="aspnet:MaxHttpCollectionKeys" value="5000" />