Deleting document types, content now inaccessible - umbraco

I am learning Umbraco (7) and deleted a test document type and template, without realising there was a content page using these (very surprised Umbraco lets you do this!)
I then couldn't access the content page to delete it (404 error). I created a new page, but that also had problems, almost certainly due to the database now having incorrect integrity, ie links now broken.
Two questions :
is there any way to prevent deletions where there are still linked content elements?
How would I fix this? Do I need to delete the orphaned content in the SQL backend db using SQL Management Studio? Or can something be done in the Umbraco front end eg scripts in macros?
Thanks

Unfortunately deleting a document type does in fact remove all content using that document type, I am unaware of any way to recover this content other than to restore a backup.
It is a fundamental flaw I think that you are able to do this so easily and has been there for as long as I have been working with Umbraco (since v3!).
Have you tried rebuilding your XML Cache file to try and overcome the orphaned link problems?
http://YOURDOMAIN/Umbraco/dialogs/republish.aspx?xml=true and
clicking "republish"
See this issue on the issue tracker:
U4-5187 Deleting doctype wipes out all content nodes based on it

Related

Why can't I view or edit Umbraco templates?

When I open the Umbraco (7.6.3) backoffice, I'm unable to view or make changes to templates. It seems like other functionality is unaffected, and I can create & edit specific pages. However, attempting to open the templates themselves just leads to a white screen. This problem exists across browsers:
Other screens render just fine:
What gives?
Checking the console when attempting to load gives an interesting error:
Error: Argument 'Umbraco.Editors.Templates.EditController' is not a function, got undefined...
Resolution:
The issue seemed to be caused by outdated files in the Umbraco folder. Copying most directories over from packages\UmbracoCms.7.6.3\UmbracoFiles\umbraco\ seems to have done the trick.
Looking at the changelog, it seems like the JS folder was the most influential in getting this fixed.
Are you sure that you're on 7.6.3? The UI appears to be pre-7.6 (I can tell because the colours haven't been updated).
If you have just upgraded, it's possible that your browser has cached the JS which is used - hard refresh your browser to see if the UI updates.
Umbraco also uses a dependency service to compile all of the used JS/CSS files together into one large one. This service will not be used if your website is in debug mode. Either:
Turn debug mode on in the Web.config
Delete any files in the \App_Data\ClientDependency\ folder as this is where the cached compiled files are kept (these will be regenerated)
My first thought would be file permissions.
Have you run the health check for permissions in the developer section? Need to make sure that your application pool user has write permissions on the Views folder.

DateTimePicker Azure Implemetation Error

Hey there I' after publishing my project to azure I have used data comparison to transfer my database to the online server database but now My DateTimePicker does not work it now displayes in the top left corner and does not input data at all. When i ran the project again on the localversion it worked fine?
I found the followig errors in the console.
This has me fairly stumped. Has anyone seen anything like this before.
Azure View
Localhost View
Bundles file
file structure
As from the comments, the issue seemed to be originating from the scripts being included in an incorrect manner by the Bundle.
Trying with individual <Script src=""> tags explicitly will give you more control on the order of the scripts. And in this case seems to be solving the problem.
You can additionally also try splitting the js bundle into multiple bundles and try to add in order. Then check in the browser source if the ordering and result are appropriate even with the bundles. You can check the <script> tags generated by bundles and compare with your manual script tags, which work, and then alter the bundles.

Restoring/creating missing media references in Umbraco Media section

I have an Umbraco (v6.1.6) website, hosted on Azure Hosted (Website & DB).
Recently the client reported, that some images have disappeared from the website!
Looking at the CMS back office, the content nodes are referencing media items, but 'some' of those items are no longer present in the media section! The media files are however present on the web server in the /media folder as expected!
Now, this should be running as a single instance site, but looks like the site was run in with multiple(3) instances for a while, such as when the missing images were loaded.
[All the unaffected media has lower id’s (<10000) while the missing items in the media section have higher ids (20000’s or 50000’s)]
The site is now back to running one instance.
Q. Is there a way I can re-generate the items in the Umbraco Media section, based on the media actually present in the /Media folder?
What you need to do depends a lot on the state of your site and what has been going on while it was running in 3 instances... and what you want the outcome to be!
Metadata for media in umbraco is stored in the database and the actual files are stored on disk. If your site has been running in 3 instances using the same database but different file locations on disk, you should actually be seeing that the media items exist in the database even though the files might be scattered in the 3 instances on the file system.
It however sounds like you're saying that the files all do exist on disk, but the media items not all exist in the database. Can you confirm this (as it sounds really strange unless you have been running 3 different databases also).
All in all, everything here sounds really strange since running 3 instances should also require you to have had this running and accessed by the editors uploading the files, using 3 different hostnames?
No matter what I don't think theres a simple solution to your problem. There's no way to have umbraco "reindex" the media folder based on the files there. What I have done for broken media libraries (usually self inflicted breakage, that is) is to load up all existing media items in memory and then loop through the file system to see what is missing from the library and recreate those media items and upload the files to them. Do remember to log which files you are recreating as media items so you can do a file system delete of the orphaned files after they have been processed.
If you can shed a bit more light on the issue, I will see if I can come up with a better solution for you.

Transferred site doesn't show content with PMWiki

A relatively simple pmwiki site has been copied to a new server. All of the formatting (non-wiki) code works however the wiki content comes up as blank.
If I add a new page, that page shows up just fine.
I have checked the permissions and ownership of the files in wiki.d folder. All files (new and old) look identical.
I have eliminated the search optimization file in hopes that the old would be treated like the new.
Is there another file that references older files that might be keeping them from being seen? Any ideas would be welcome.
I've never had this problem before in copying a pmwiki site.
Here is the site http://pecarru.mobilify.pw/
Here is the new page http://pecarru.mobilify.pw/index.php?n=Main.NewPage
All pages should have text in the white box
The page-source is available by appending &action=source, so that tells us there is no problem accessing the content.
Additionally, the content looks normal -- no weird characters that I can see (which sometime cause trouble on a new server).
However, I do see "smart quotes" in several pages; try changing changing them to dumb-quotes and see if the page will now render.
I see that the WikiSandbox page and content in the PmWiki group renders, so it's not every page that has a problem.
If editing doesn't resolve the issue, try disabling recipes in \local\config.php until the content appears.
Something is choking on render.

Asp.net MVC, adding edmx gives trusted zone warning

I have an ASP.net MVC 4 project I am working on and am trying to add an ADO.net EF model to it using Database First.
The creation of the model (.edmx file) seems to run successfully and I am left with the desired .edmx model file in the folder I specified. However, I don't appear to be able to see any of the files nested under this model. (From all my research, I should be able to expand the .edmx file and see *Context.vb, *Designer.vb, *.edmx.diagram and *.tt files underneath, but I cannot.)
It should look something like this in the msdn article about Database First (see Step 4):
Upon noticing this issue, I discovered a handful of warnings that appeared after creating the .edmx model, one of which is (I have obscured part of the full path):
The path 'P:\IT\...\DAL\EF.Utility.VB.ttinclude' must be either local to this computer or part of your trusted zone. If you have downloaded this template, you may need to 'Unblock' it using the properties page for the template file in File Explorer.
The project is stored on a network share on one of our servers so it can be included in our daily backups and Windows Shadow copy also. My understanding is that the above warning has appeared because of this and I need to set my machine to trust this location.
I have tried all possible variations I can think of of
this MSDN article
but to absolutely not success at all, the warning remains.
Either I am looking in the wrong place, or I have missed something.
Does anyone know what I can do to remove this warning and gain access to the objects nested below the .edmx model?
Perhaps this could be of some assistance. I've never really dealt with trust issues working across the domain. I lean towards pulling down and working with a local copy.

Resources