We have moved to GitHub Issues
Created by Nicholas Westby 21 Feb 2015, 02:39:59 Updated by Nicholas Westby 02 Jun 2015, 21:24:33
Relates to: U4-6398
Relates to: U4-6665
Wall of 404 Errors After Upgrading to 7.2.2
When I view an Archetype data type in the developer section, I get a wall of errors: !errors.png!
Didn't seem to be getting a 404 on the old site (or notification errors indicating such).
Reason: The region code part of the CultureInfo was not being included for users that were not assigned to en-US. en-US was the only language file that is named with the region code, all others are named with only the country code which was used to assign the culture to the user (since that is what is stored in the db for them). This change came about by accident due to the implementation of the new ILocalizedTextService. The main issue is that the language files that are named with 2 letters (country code only) are actually assigned with a 4 letter (including region code) based on the contents of their file.
I just upgraded a fresh install of Umbraco + Fanoe Starter kit + Archetype and it went perfectly. Are you sure you didn't accidentally remove files from App_Plugins/Archetype?
@sebastiaan It likely has to do with some culture configuration. Notice that the 404 mentions "en.js", yet that file does not exist. What does exist is "en-us.js". Maybe you are using a different culture? Seems to me this is some problem with localization. !langs.png!
I tried with UK and US english and had not problems.. not sure what your problem could be but I'd check with the Archetype guys first, they know how they're looking up their language files.
OK, I asked them about it. We'll see what they say. https://our.umbraco.org/projects/backoffice-extensions/archetype/sound-off!/61678-Archetype-Shows-404-Errors-with-Umbraco-722
@sebastiaan FYI, I just reproduced this issue on a site I just created this morning (by coincidence... I wasn't actually trying to reproduce this). Umbraco 7.2.2 and Archetype 1.7. I also installed Polyglot, Contour, and [https://github.com/rhythmagency/rhythm.umbraco.extensions Rhythm Umbraco Extensions].
@sebastiaan Did you actually create a datatype based on Archetype? I just reproduced this by creating a fresh Umbraco 7.2.2 website, then installed Archetype, then created a datatype based on Archetype. At that forum thread I linked to above, somebody else was also able to reproduce it.
How else would I try it?
I thought you might be testing it by simply installing Archetype rather than creating a datatype from Archetype, though it appears you went an extra step and actually created a property from that Archetype datatype. So, in theory, you'd have seen the error. To clarify, the error occurs when creating the data type: !full-view.png!
Note that I chose to bypass the starter kit during the install. I have seen the error on both SQL Server installs and SQL Server CE installs.
Just to add in on this, I hit the same error after upgrading Umbraco from v7.1.9 to v7.2.2.
My guess is that the default culture for a back-office user has changed from "en-GB" to generic "en"?
My solution was to make a copy of the "en-gb.js" language file (renaming it to "en.js").
I just can't understand why I'm getting
en-GB for both
And when I update my language to US english, those calls both result in
en-US. Maybe Archetype is looking up the culture in a different way?
(in other words, no we didn't change the default culture)
@sebastiaan - hmmm, very strange!
For reference, Archetype is getting the culture from
user.locale (via the
Okay, so I finally found the error.. This is the related change:
Previously we would load the Culture from the en.xml file, the en.xml file has culture set to en-GB. After this change we just look in the database (duh, why would you not, we're querying it already anyway!). However.. we store just "en" in the database.. * facepalm *
In fact the only language that we store (almost) "properly" as a culture is en_us (note the underscore, not a dash.. :/ )
I'm not sure what the right thing to do is here, I suspect this will lead to more culture related problems now that it doesn't have a proper culture. However, this is part of a larger change to support backoffice translations much better then before so I also don't know what the impact is of going back to the old way of getting the locale.
Assigned to Shannon for feedback.
Argh, this is very annoying. The change seb mentions was made after trying to decipher the nonsensical way that cultures are stored and looked up for users. The reason the language is stored just as two letters for most languages is because that is how the language files for Umbraco are stored. It's also worth noting that the culture of just 2 letters is totally valid, so CultureInfo.GetCultureInfo("en") absolutely works. What is really silly is that we then just store the 2 letter in the db, but then store the 4 letter inside of the language files but the languages files are just 2 letters.... obviously none of this is ideal :P
Now, i need to figure out how to un-wind some of this mess and make the new Api's support it too.
This is fixed in rev: 0932c980e90ea66a083e3346577217bdf4cf1674
@Shandem I think I'm experiencing this in Umbraco 7.2.5 (upgraded from 7.0.4, I think). Before I submit another YouTrack issue, is there some database table I can look in to confirm the issue? Here's what I see every time I'm at the login screen:
@Knickerbocker Are you seeing JS errors? I cannot replicate this. Ctrl + f5 ?
@Shandem This issue was separate and has been fixed (TLDR: my project had a model binder forcing nulls to be empty strings): http://issues.umbraco.org/issue/U4-6665
Assignee: Shannon Deminick
Backwards Compatible: True
Affected versions: 7.2.2
Due in version: 7.2.3