Dictionality translatings not loading when logged into the backend
Hi,
There seems to be a strange bug on my Umbraco site. I have got multiple languages loading the translations from the dictionary as standard. They are working fine and as expected. (Apart from this strange error)
When I log into the Umbraco backend (content editor) it seems to then prevent the dictionary items from loading (like they don't exist)
If I then logout of the CMS they load fine again and the translations in the front end of the site are fine.
I have tested this a number of times on different browsers and different machines and I can re-create everytime (it's defiantly related to the backend login somehow). I also tested on localhost and again exactly the same issue.
My guess is some language cookies are been set which is confusing things?
Has anyone else experienced this and got a fix? I must say this seems like something recent as I cant say I have noticed it in the last and I am always working on both the back and front end at the same time.
They are loading fine in the backend tree but the issue is pulling them through to the front end using the umbracohelper.
Like I said though if you are logged out of the umbrco backend the dictionary items pull through fine. It's only when you are logged in that the umbracohelper returns a null for each dictionary item.
I tested logging in as a member rather than a backend user. The error doesn't exist - great my end users wont see the issue :). It seems it just related to been logged into the backend.
Here is an example how I retrieve the dictionary items
var umbracoHelper = new Umbraco.Web.UmbracoHelper();
@umbracoHelper.GetDictionaryValue("Job Description")
I cant see anything particularly different from this template to the rest but here is an example of the code. Maybe you can spot something.
Dictionality translatings not loading when logged into the backend
Hi,
There seems to be a strange bug on my Umbraco site. I have got multiple languages loading the translations from the dictionary as standard. They are working fine and as expected. (Apart from this strange error)
When I log into the Umbraco backend (content editor) it seems to then prevent the dictionary items from loading (like they don't exist)
If I then logout of the CMS they load fine again and the translations in the front end of the site are fine.
I have tested this a number of times on different browsers and different machines and I can re-create everytime (it's defiantly related to the backend login somehow). I also tested on localhost and again exactly the same issue.
My guess is some language cookies are been set which is confusing things?
Has anyone else experienced this and got a fix? I must say this seems like something recent as I cant say I have noticed it in the last and I am always working on both the back and front end at the same time.
Hi David,
Where are the dictionairy items not loading ? Do you mean under Settings > Dictionairy ?
Dave
Hi,
They are loading fine in the backend tree but the issue is pulling them through to the front end using the umbracohelper.
Like I said though if you are logged out of the umbrco backend the dictionary items pull through fine. It's only when you are logged in that the umbracohelper returns a null for each dictionary item.
Strange. What Umbraco version are you using ?
Dave
Hi Dave,
Here is some extra information...
Umbraco Version 7.1.8 assembly: 1.0.5394.16131
This does not seem to be related to every page. Here is an example of the page which encounters the error when logged into the back end https://www.expatjobzth.com/job/technical-support-consultant/bangkok-other/5713
I tested logging in as a member rather than a backend user. The error doesn't exist - great my end users wont see the issue :). It seems it just related to been logged into the backend.
Here is an example how I retrieve the dictionary items var umbracoHelper = new Umbraco.Web.UmbracoHelper(); @umbracoHelper.GetDictionaryValue("Job Description")
I cant see anything particularly different from this template to the rest but here is an example of the code. Maybe you can spot something.
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage @using CMS @using CMS.Models @using CMS.Utils @using umbraco.NodeFactory @using Umbraco.Web.Models @using umbraco.cms.businesslogic.web
@{ Layout = "MasterView.cshtml";
}
Hi David,
I see you setup your own umbracoHelper object.
In the template you can normally also access it using
Can you try using this and see if the problem still occurs ?
Dave
Hi,
I tried what you said and this still didn't fix the problem.
I have uploaded a zip file of all my views, macro partials, and partial files. Maybe this will help.
It is very strange...
The problem is only happening on the JobLandingPage view
Pretty much most views are using @Umbraco.GetDictionaryValue but the JobListPage is similar and I can confirm this is also working fine.
There is defiantly something relating to the JobLandingPage view but I just cant see what is different. Please let me know if you need any more files.
Worst case I might be able to upload a test site and provide login details.
Download the views here!
Thanks
David
Hi David,
hard to see without the entire code/db.
can you tell me what the code of this call is ?
Dave
Hi Dave,
I will send the full source and data if you provide your email. I would prefer not to upload everything public.
Thanks for your assistance.
Kind Regards
David
is working on a reply...