Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListResourceKey Attribute?ResourceKey Attribute?
Previous
 
Next
New Post
4/8/2007 2:21 AM
 

I noticed throughout the UDT code (and other DNN modules), a ResourceKey attribute is used in many controls (e.g. LinkButtons). Often the argument for the attribute does not resolve to anything in the page's resource file. I assume this is useful if the user happens to know the resourcekey for control they want to alter text on and then inserts this element into resource file.

In any case for reasons unknown I am now getting "Object reference not set.." error whenever ResourceKey attribute does not resolve to element in the page's resource file. Appears upon rendering the DNN core is attempting to resolve the ResourceKeys and failing when no associated entry in resource file.  I am not sure why the error started mysteriously appearing and I can resolve it by removing all the extraneous ResourceKey attributes, but I was curious why all the DNN developers use this tag that has no obvious applicability (aside from DNN controls that explicitly reference it...e.g. DNN:Label)

 
New Post
4/8/2007 3:32 AM
 

resource keys are resolved by DNN localization and can be placed in a local or shared resource file, for details please refer to the module localization guide that is  available here.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/8/2007 12:44 PM
 

Thanks for the quick reply and link. The 'ShowMissingKey' feature is useful and I understand there is global shared resource file that controls refer to in addition to other localization resource files. I have made some modifications to UDT and for some reason all the localization code is now unstable. For example, in your DataTypeController.GetLocalization function I had to comment out the first line and replace with second. DNN Localization.GetString is choking on the path however it is able to map the file name only. Perhaps related I had to add global resource elements succ as cmdUPdate.Text to each page resource file, since it was causing 'Object ref not set to instance of object.... Any thoughts on what might have gone wrong? I am using DNN 3.4 with unaltered core.

 

'Dim LocalResourceFile As String = System.Web.HttpContext.Current.Request.ApplicationPath & Definition.PathOfModule & Services.Localization.Localization.LocalResourceDirectory & "/SharedResources.resx"

 

Dim LocalResourceFile As String = ("SharedResources.resx")

 
New Post
4/8/2007 6:59 PM
 

Problems:

  • it is difficult to comment your modifications just from a few liles w/o complete source code
  • please notice, that all current UDT versions are compiled using ASP.Net 1.1 and VS 2003
  • if you have problems compiling the original version of UDT there is most likely a configuration issue on your side
  • this is the first time I hear of a DNN 3.4 version, where did you get it?

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/8/2007 10:24 PM
 

Sorry for the version rounding error 3.03.07--> 3.4 ;)  Turns out the problem was in the xml formatting within SharedResources.resx. I must have inadvertently opened the resource file in code editor and it automatically did some reformatting (see below). If anyone does global search and replace within xml they need to be careful of this subtle error that produces very erratic results. Thanks again for your help.

 

<data name="ChangedAt_OutputSetting.Help">

 

<value>You can specify a date format like &quot;dd.MM.yyyy&quot;.</value>

 

..becomes:

<value>You can specify a date format like "dd.MM.yyyy".</value>

 

</data>

 

</data>

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForm and ListForm and ListResourceKey Attribute?ResourceKey Attribute?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out