2

Need some help on this one.

We have deployed a webpart on LIVE server. On test server it worked fine.

Now on LIVE we cannot see the webpart after adding to page. ULS:

Failed to open the file 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Features\MyWebPart_MyPart WebPart\Resources\Resources.en-US.resx'. 5be2859c-93a0-e0a4-d8bc-bbc416633918

The specified path "" does not exist. 5be2859c-93a0-e0a4-d8bc-bbc416633918

Failed to read resource file "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Features\MyWebPart_MyPart WebPart\Resources\Resources.en-US.resx" from feature id "ef587aa8-2178-4c7c-9f4d-38c3c94aefdc". 5be2859c-93a0-e0a4-d8bc-bbc416633918

Failed to open the language resource for Feaef587aa8-2178-4c7c-9f4d-38c3c94aefdc keyfile Resources. 5be2859c-93a0-e0a4-d8bc-bbc416633918

Failed to open the file 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Features\MyWebPart_MyPart WebPart\Resources\Resources.resx'. 5be2859c-93a0-e0a4-d8bc-bbc416633918

The specified path "" does not exist. 5be2859c-93a0-e0a4-d8bc-bbc416633918

Failed to read resource file "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Features\MyWebPart_MyPart WebPart\Resources\Resources.resx" from feature id "ef587aa8-2178-4c7c-9f4d-38c3c94aefdc". 5be2859c-93a0-e0a4-d8bc-bbc416633918

Failed to open the language resource for Feaef587aa8-2178-4c7c-9f4d-38c3c94aefdc keyfile Resources. 5be2859c-93a0-e0a4-d8bc-bbc416633918

Localized resource for token 'Direction' could not be found for file with path: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\Template\Features\MyWebPart_MyPart WebPart\MyShortcuts\schema.xml". 5be2859c-93a0-e0a4-d8bc-bbc416633918

The wsp contains 1 feature and 1 listinstance (rootwebonly='true') and 1 webpart. On activating the feature, the list gets created on the root web and webpart is added to the custom webparts.

This works good on the Dev Environment. What could be issue with LIVE?

UPDATE

The list schema.xml code (autogenerated):

<?xml version="1.0" encoding="utf-8"?>
<List xmlns:ows="Microsoft SharePoint" Title="MyNewList" FolderCreation="FALSE" Direction="$Resources:Direction;" Url="Lists/MyNewList" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/">
  <MetaData>
    <ContentTypes>


    <ContentType ID="0x0100b4e36f6692f14571a6834abc75af286d" Name="ListFieldsContentType"><FieldRefs><FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" /><FieldRef ID="{c29e077d-f466-4d8e-8bbe-72b66c5f205c}" Name="URL" /><FieldRef ID="{305bf797-14b5-4a3b-b411-2353cb5e3afc}" Name="Archived" /></FieldRefs></ContentType><ContentTypeRef ID="0x01">
        <Folder TargetName="Item" />
      </ContentTypeRef><ContentTypeRef ID="0x0120" /></ContentTypes>
    <Fields>

    <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" DisplayName="$Resources:core,Title;" Required="TRUE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Title" MaxLength="255" /><Field ID="{c29e077d-f466-4d8e-8bbe-72b66c5f205c}" Name="URL" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="URL" Group="$Resources:core,Base_Columns;" Type="URL" DisplayName="$Resources:core,URL;" Required="TRUE" /><Field Name="Archived" ID="{305bf797-14b5-4a3b-b411-2353cb5e3afc}" DisplayName="Archived" Type="Boolean" /></Fields>
    <Views>


    <View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
        <Toolbar Type="Standard" />
        <XslLink Default="TRUE">main.xsl</XslLink>
        <RowLimit Paged="TRUE">30</RowLimit>
        <ViewFields>

        <FieldRef Name="LinkTitleNoMenu"></FieldRef></ViewFields>
        <Query>
          <OrderBy>

          <FieldRef Name="Modified" Ascending="FALSE"></FieldRef></OrderBy>
        </Query>
        <ParameterBindings>
          <ParameterBinding Name="AddNewAnnouncement" Location="Resource(wss,addnewitem)" />
          <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
          <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_ONET_HOME)" />
        </ParameterBindings>
      </View><View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/15/images/generic.png" Url="AllItems.aspx">
        <Toolbar Type="Standard" />
        <XslLink Default="TRUE">main.xsl</XslLink>
        <JSLink>clienttemplates.js</JSLink>
        <RowLimit Paged="TRUE">30</RowLimit>
        <ViewFields>

        <FieldRef Name="LinkTitle"></FieldRef><FieldRef Name="URL" /><FieldRef Name="Archived" /></ViewFields>
        <Query>
          <OrderBy>

          <FieldRef Name="ID"></FieldRef></OrderBy>
        </Query>
        <ParameterBindings>
          <ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
          <ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
        </ParameterBindings>
      </View></Views>
    <Forms>
      <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
      <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
      <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\form.aspx" WebPartZoneID="Main" />
    </Forms>
  </MetaData>
</List>

On dev as well as live environment, the List gets created. We can add data into the list. But the webpart wont appear? Webpart has code to query this list. There is no exception in the webpart code, but there is some "resources" error in ULS as pasted above.

  • Are you provisioning resource files? If yes give details of how have you provisioned that in your solution. – Unnie Apr 10 '14 at 13:58
  • i did not get you. its a simple webpart. The feature contains a listinstance and webpart. It is deployed to the sitecolelction level. We add it to a page. The webpart queries list and displays data. But cannot see it on LIVE. – variable Apr 10 '14 at 14:07
  • Are you reading from resource files in your code? – Unnie Apr 10 '14 at 14:16
  • Try in powershell net stop sptimerv4, then net start sptimerv4, then iisreset. If still not possible to read the resource file, it is missing from the solution – Robert Lindgren Apr 10 '14 at 14:22
  • We are not reading nay resource file. Its just a simple webpart – variable Apr 10 '14 at 15:00
2

Because there is no resources file specified in the call to the some resource key in your web part, SharePoint will look in the default places where you can place your resources files in the following order (given that your language is US-English).

You must check all resources strings in your web part also ULS should have some string like "Localized resource for token 'your resource key' could not be found for file with path: "...

There are 2 options to fix this problem.

  1. Make sure that in your resources file, Resources.resx (with its variants of languages that you want), there is a "Direction" Key defined. (Possible values: LTR, RTL, none)
  2. Fill the "DefaultResourceFile" property of your Feature with the name of the file of Resources that you want to use. This file must be in the path: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources
  • what is this resourse file and where to look for it? – variable Apr 10 '14 at 15:21
  • Your resource file must be at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\{your feature name}\{your resource name}. Check ULS first to get what exactly key is not found. – Andrey Ungur Apr 10 '14 at 15:28
  • the feature has a webpart as well as a list. Is that the cause of the error? – variable Apr 10 '14 at 15:30
  • Yep the list do this. Change the generated Schema.xml file. In the example given it would be: Your resource key name= "$Resources: core, 'Your resource key name';" In this way, we indicate that the 'Your resource key name' is in the file Core.resx (in the 14\Resources, it’s the default SharePoint resources file) – Andrey Ungur Apr 10 '14 at 15:33
  • Check all resources ($Resources:) in your schema of the list. It seems your environments have different core resource files. Or your list schema have resource string that exists only in one environment. – Andrey Ungur Apr 10 '14 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.