the problem occurred in the template, where I have to choose between two RTE fields in the same doctype, and both fields have a usercontrol, which both seem to fire!
here's the solution that seems to work, for the particular problem I was having above.
I replaced the duff code in my page template (a masterpage whose MasterPageFile is ~/umbraco/masterpages/default.master) above with
<umbraco:Item field="<%$ Resources:LocalizedText, main %>" runat="server" />
I have a .NET usercontrol in the page template which sets the Culture and UICulture (and in VB.NET, you have to do this in the following code block in the code behind):
Protected Overrides Sub FrameworkInitialize()
...
'do some stuff to get the language setting from the session variable or the querystring
' ... and finally, set the culture
Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(Culture)
Thread.CurrentThread.CurrentUICulture = New CultureInfo(Culture)
MyBase.FrameworkInitialize()
End Sub
I have created Resource files (a default file, one for English and one for Welsh) in App_GlobalResources, which have a setting for the field I want to output (viz main in the Umbraco:Item code above).
I think that's it.
However, if anyone out there sees a glaringly obvious hole in this code, please let me know as I would very much appreciate some feedback.
page events (e.g. page_load) are being fired twice
Hi everyone
I'm on webforms trying to get a site live using v7.5.14, and up until recently was building on v7.5.2 where everything was working fine.
Our template/masterpage outputs a doctype property which holds a macro, which in turn points to a usercontrol.
However, in v7.5.14, the page events (e.g. page_load) in the usercontrol are being fired twice.
I took the usercontrol and put it directly into the template, and it works as expected.
It looks as if there may be something in
<umbraco:item field="myField" runat="server" />
causing this.Any help is appreciated.
Thanks
Muiris
Ok, so maybe I need to reinstall this version. Is that ok to do?
Is it ok to just reinstall Umbraco, and then point it at my original database?
Maybe it's wrong direction, but check that you have no images with empty source
Thanks Yakov
the problem occurred in the template, where I have to choose between two RTE fields in the same doctype, and both fields have a usercontrol, which both seem to fire!
Re-coding the template
if
statement now!Thanks,
Muiris
PS: ...and this does happen in v.7.5.2
PS: here's the duff code (DON'T do it this way!):
Right, everyone,
here's the solution that seems to work, for the particular problem I was having above.
I replaced the duff code in my page template (a
masterpage
whoseMasterPageFile
is~/umbraco/masterpages/default.master
) above withI have a .NET usercontrol in the page template which sets the Culture and UICulture (and in VB.NET, you have to do this in the following code block in the code behind):
I have created Resource files (a default file, one for English and one for Welsh) in
App_GlobalResources
, which have a setting for the field I want to output (vizmain
in theUmbraco:Item
code above).I think that's it.
However, if anyone out there sees a glaringly obvious hole in this code, please let me know as I would very much appreciate some feedback.
Many thanks
Muiris
is working on a reply...