Umbraco returning non-existing values - sql

A client asked us to move their Umbraco website. We moved it to a test environment first and everything went fine. When we moved it to the staging environment, weird stuff happened.
In the Umbraco Admin area, we've got some entries with fields. These fields are empty for X number of entries. However, in the view portion of the page (for the visitors), values are printed out for each entry! The values that are printed out are the values from the production environment. However, no connection strings in the web.config point to the production environment.
When we change the value in one of the entries, the view understands it and displays the correct one - but only on that single entry! The other ones still show the values from the production environment.
We've tried uploading the site, again and again, restarted app pools, cleared client cache, different browsers.
What could be the problem?

Looks like you've figured it out, but for anyone else who finds this, when deploying an Umbraco site, as a general rule you should NOT deploy the following:
/App_Data/umbraco.config
/App_Data/TEMP/ (the whole folder)
/App_Data/cache/
/App_Data/logs/
If you do deploy some of those files, you may get odd errors with content being wrong/out of date etc.

Related

HttpRuntime.Cache has "2 versions" in my project

So in my company we have this huge website project in Visual Basic. On this problem we have two parts involved, the admin, running at one port in local, and the website, running on another port.
The problem I have is that when I change a user's property in admin, it calls the function to save the user and adds the changes to the database. After that, we run a HttpRuntime.Cache.Remove(key) and it is removed successfully. BUT when the website part tries to get the user from cache (before doing so from the database), it gets it successfully, even though it was removed previously. So my question is if this is a thing, if it's possible that even though using the same code, there are 2 different caches, I've done several tests and the cache is removed successfully from the admin part, it's definetly not a code problem.
So apparently, that's how it works. If the same project has 2 or more applications running at the same time, each one has its own cache, even if they share the code that removes or adds things to cache. There is no mistake, the answer would be to create a function that clears the cache from the other applications.

IndexedDB in Metro, domain changed after running WACK tool?

I am trying to get this IndexedDB stuff working in a Metro (Windows 8) app, using JS.
I thought I was good, but then I ran the WACK tool a couple of times, just to see if I ran into any issues.
After these tests the IndexedDB.open call no longer opens my database (which has 7 entries in it) instead it fires onupgradeneeded, and gives me a blank (new) database (since I create an object store in the onupgradeneeded handler).
I did not change my version number, I did not change the database name. So I am guessing the applications domain somehow changed during the WACK tests.
Does anyone now how to get my database domain back?
One of the things the WACK test probably does is doing a fresh install of the app checking if everything goes fine. So when the app is installed for the first time you have to provide a creation of the database, this is done in the onupgradeneeded event.
I think you forgot to provide this, and that is why he creates a new blank database. Instead of a new database with the required structure.

Label Staging Site to Prevent it from Being Used as if it Were the Production Site

Sorry for the insanely long title, I find this one hard to sum up. I'm being asked to maintain several internal-only web apps for my company. For testing, after making my changes, I've created some staging sites which make use of separate databases. As such, if my users were to mistakenly use this site as if it were the production site, they may enter important data and wonder where it "disappeared" to thinking it was the production server.
I'd like to create a big banner of some sort across the top of the staging site (which ONLY appears on the staging site) to remind my users that they are on the test site. I'd like recommendations on the best way to do this, with the following considerations:
IDE: Visual Studio 2008
Server: Windows 2003 with IIS 6
Language: VB.NET 2.0
Thanks ;)
I would create a web.config app setting that contains a specific value in staging. Then in your master page(s) code behind(s) - assuming you're using them - write some code in that inserts an appropriately styled HtmlGenericControl (as a div) into a PlaceHolder control in the master page markup. All this occurs based on whether the app setting has the value indicating the staging environment.
If it were me, I'd make the staging site have a different color background.
White background -- public and live.
Pink background -- staging, liable to be reformatted any second.

How to compare test website and live website

We have our production server running our website. Then we have a test server which has exact same data but with changes to code to do some new functionality. This web app has over 500 pages.
Is there any program that can
Login to the test site
Crawl through each page and then save the page as html
Compare with the same page saved with live site?
This way we can make sure that new features that we add to our test site will not break the live site when code updates are applied to production.
I am currently trying to use WinHTTrack website copier and then comparing the test and live folders with some code comparison tool like beyond compare. This works ok but there are lot of files changed because of the domain name changes.
Looking forward to ideas / solutions for this problem.
Regards
Have you looked at using Watir for this? It's not exactly the thing you are looking for but it might allow you some more granularity in your tests and ensure the site is functionally identical rather than getting caught up on changing guids, timestamps and all the other things that tend to change across any significant size website from day to day as part of it's standard functionality.
Apparently you can't make consistent, reproduceable builds in your project, can you? I would recommend moving towards that in the long run, it will save you a lot of headaches. That way you would know exactly what was deployed to which server when, so there would be no more need to bend around backwards to get the deployed sources back like this...
I know this is not a direct solution to your problem... but maybe it is worth comparing, whether you would save more in the long run by investing the efforts into your build process now, instead of implementing this workaround (and then improving your build process anyway - because one day you will almost surely need to do that).
wget has a --convert-links option, there are also some options to preserve cookies that might let you do it logged in http://drupal.org/node/118759#comment-664498
use an Offline Downloader, download all files to your computer from both sources, then compare the folder contents using a free tool like Total Commander.
EDIT
Load both of your sources into a CVS, and compare it there.

browser plugin to test a site's look when migrating

I'm thinking I need a browser plugin that does the following, and if it doesn't exist, it should. I may as well say FF for now, but it could be any browser.
The problem: when moving a website from one server to another, you need migration testing. It is a pain to click on every link by hand and compare it to the old host. You really need 2 machines or have to constantly thrash your hosts file.
The plugin:
Would allow you to specify an alternate hosts entry for a website. 2 entries would make it clear, one for live, one for test.
The plugin would crawl every link on the site, and render the page in the browser, and save an image of the entire page.
It would switch hosts and repeat, and save images in a second folder. Since the rendering engines match, the images should match. We need to switch hosts (like /etc/hosts) so all absolute links are the same for the site.
Now this could be part of the plugin or external, now that we have 2 folders of identically named images, we run an image-diff program on the whole batch. A quick test would be a bdiff or hash, or we could get more sophisticated and determine how different each image is.
This would save so much time. So can it be done with existing tools, or do I need to go write it?
Have a look at Selenium, it allows you to script interactions with the browser and verify content.
That is overengineered. What kind of website is it? How big? Which framework (PHP, JSP, Rails, etc.)? Why not copy the website onto the new server and grep the code for specific ties to the old server?
I'd concentrate on why you think the site would differ between two servers, and focus on testing those specific cases rather than the whole site. When a site is moved to a new machine the issues are generally very obvious from looking at a couple of pages.
Presumably they are both looking at the same data source, assuming there is a data source, otherwise a folder diff on the two installations would suffice. This being the case, it should be a simple task to identify which areas of the site are likely to be affected by a server migration.
Also, I wouldn't personally trust a machine matching two images to sign off system as ready to go live. There just isn't a substitute for real human testing. Yes it's time consuming, but how important is your site?
Try http://www.browsercam.com/ - free trial should allow you to specify main page and follow links to make screenshots automatically of the sub-pages as well.