Danish localization problem

This is a place to discuss how to adapt mojoPortal to the needs of different cultures. Before asking questions here please first review the localization documentation.

This thread is closed to new posts. You must sign in to post in the forums.
1/20/2009 7:07:57 PM
Gravatar
Total Posts 11

Danish localization problem

Hi Joe

I have been making a danish localized version of Resource.resx (Resource.da.resx), but keeps running into problems when making site changes that triggers search indexing (I think).


Having uploaded the danish version everything is working fine until I either make a change to e.g. the Welcome element on the home page or start a search.
Then whatever I do, I get a timeout and if I then try to refresh the page, the web server responds with a Service Unavailable and I have to

  • delete all rows from mp_TaskQueue and mp_IndexingQueue
  • remove Resource.da.resx
  • delete the files in ... \sites\1\index
  • touch web.config
  • restart the app. pool

... to get the site running again.

I have made the localization using the Sisulizer tool and have verified that the danish version and the original are equal except for the intended differences.

I have tried to make a danish version by copying the original Resource.resx and just changing the "Home" value to "HjemÆØÅæøå" using notepad.
This file gives me no problems !

My site is a version 2.2.8.2c and has about 45 pages, but only the Welcome element has any content.
The site is placed on a hosted server and uses a MySql (version 5.0.51a) on a Linux server.

On the server I also have an Asp site, eventually to be replaced by the Mojo site. They share the root folder, but there a no filename conflicts.

Hope you can help.

BG

Kurt

1/21/2009 6:31:32 AM
Gravatar
Total Posts 18439

Re: Danish localization problem

Hi Kurt,

I'm not sure whats going on there possibly some issue with Lucene.NET and Danish language. I would look for errors in the log, if you find one that lloks relevant please post it so I can see the stack trace (but please don't post the whole log or a bunch of errors)

If you are hosted in Medium Trust you need to add a setting to your Web.config or user.config like this:

<add key="Lucene.Net.lockdir" value="C:\__dev\mojoportal\joe\Web\Data\Sites\1\index" />

obviously the path would be different on your installation

If all else fails you could disable the search index by:

1. removing the search link from the layout.master of your skin

2. removing all the files from the /Setup/ProviderConfig/indexbuilders, except for the file 000_placeholder.config which must remain

If you complete the Danish translation and would like to contribute it to the project please send me a .zip with any of the .resx files you translate.

joe dotaudette at g mail dotcom

Hope it helps,

Joe

1/21/2009 9:04:21 AM
Gravatar
Total Posts 11

Re: Danish localization problem

Hi Joe

I have posted the trust question to my provider, but not got an answer jet.

Meanwhile I have tried to compare the system log doing a search with and without Resource.da.resx present.

In both cases a log statement is made for each IndexBuilderProvider indexing each site page - like this:
2009-01-21 15:17:35,019 INFO mojoPortal.Business.WebHelpers.HtmlContentIndexBuilderProvider - HtmlContentIndexBuilderProvider indexing page - Hjem
2009-01-21 15:17:35,441 INFO mojoPortal.Features.SharedFilesIndexBuilderProvider - SharedFilesIndexBuilderProvider indexing page - Hjem
2009-01-21 15:17:35,457 INFO mojoPortal.Features.CalendarEventIndexBuilderProvider - CalendarEventIndexBuilderProvider indexing page - Hjem
2009-01-21 15:17:35,472 INFO mojoPortal.Features.GalleryImageIndexBuilderProvider - GalleryImageIndexBuilderProvider indexing page - Hjem
2009-01-21 15:17:35,488 INFO mojoPortal.Features.LinksIndexBuilderProvider - LinksIndexBuilderProvider indexing page - Hjem
2009-01-21 15:17:35,488 INFO mojoPortal.Features.BlogIndexBuilderProvider - BlogIndexBuilderProvider indexing page - Hjem
2009-01-21 15:17:35,503 INFO WebStore.UI.Helpers.ProductSearchIndexBuilder - ProductSearchIndexBuilder indexing page - Hjem

Then a log statement is made for the ForumThreadIndexBuilder for each site page - like this:
2009-01-21 15:17:36,722 INFO mojoPortal.Features.ForumThreadIndexBuilderProvider - ForumThreadIndexBuilderProvider indexing page - Hjem

Follwed by:
2009-01-21 15:00:06,394 INFO mojoPortal.Business.WebHelpers.IndexHelper - Finished indexing Forums.
2009-01-21 15:00:09,878 INFO mojoPortal.Web.WebTaskManager - deserialized WebTaskManager task
2009-01-21 15:00:09,878 INFO mojoPortal.Web.WebTaskManager - Queued WebTaskManager on a new thread

And this is where the differences appear.

When the Resource.da.resx is present the log ends here and the mp_TaskQueue contains 2 rows:
- a mojoPortal.Web.WebTaskManager row with status = Running
- a mojoPortal.Business.WebHelpers.IndexWriterTask row with Status = In queue.

Without the Resource.da.resx present the log contains the follwoing additional statements:
2009-01-21 15:00:10,019 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - deserialized IndexWriterTask task
2009-01-21 15:00:10,019 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - Queued IndexWriterTask on a new thread
2009-01-21 15:01:00,253 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - IndexWriter swallowed exception
System.IO.FileNotFoundException: Could not find file 'D:\home\silkeborgpigesdk\www\Data\Sites\1\index\segments'.
File name: 'D:\home\silkeborgpigesdk\www\Data\Sites\1\index\segments'
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Lucene.Net.Store.FSIndexInput..ctor(FileInfo path)
at Lucene.Net.Store.FSDirectory.OpenInput(String name)
at Lucene.Net.Index.SegmentInfos.Read(Directory directory)
at Lucene.Net.Index.IndexReader.AnonymousClassWith.DoBody()
at Lucene.Net.Store.Lock.With.Run()
at Lucene.Net.Index.IndexReader.Open(Directory directory, Boolean closeDirectory)
at Lucene.Net.Index.IndexReader.Open(String path)
at mojoPortal.Business.WebHelpers.IndexWriterTask.ProcessQueue(DataTable q, String indexPath)
2009-01-21 15:01:00,503 INFO mojoPortal.Business.WebHelpers.IndexWriterTask - started IndexWriterTask task
2009-01-21 15:01:10,097 INFO mojoPortal.Web.WebTaskManager - started WebTaskManager task

Following this the segment file is present in the index folder.

In both cases I have a Lucene.Net.lockdir key in my User.config, but I have made no other trust level related changes to the standard web.config.

Does the above point in any other direction than the trust level question ?

/Kurt

1/21/2009 9:20:35 AM
Gravatar
Total Posts 18439

Re: Danish localization problem

Hi Kurt,

There is no relation to any indexing error because of your resource file, I see no evidence of any relation to that, nor can I conceive it based on my knowledge of the code. If it seems  related to you I think its just coincidental things making you think that.

The only thing I would check is to make sure the .resx file is encoded as UTF-8 not ansi, but that will not cause any index related error if its wrong.

Nor do I see any clues about index errors in what you have posted.

INFO logging is just info.

Tasks may run a little longer after finishing their work, they do some thread sleeps and some checs whether more work is needed. A task may get requeued but when it runs it may find it has no work left to do, its just timing issues, if it has nothing to do it will sleep a little check again and then end.

IndexWriter swallowed exception

is an expected error to log if the index has not yet been created.

If you are not in medium trust and it did not solve the problem I would remove Lucene.Net.lockdir key from user.config

Best,

Joe

1/23/2009 12:18:15 PM
Gravatar
Total Posts 11

Re: Danish localization problem

Hi Joe

Just to set things straight.
I made my last post because I wondered if the different behavior in the 2 situations would give you any clue to what the problem is about.
I did not intend to pursue my earlier speculation on indexing errors, or to pretend that I have any mentionable knowledge on the inner working of Mojo.
I value your help very much and admire the effort you put into it.

Now for the progress made and current status.
I started over making a Resource.da.resx based on a copy of the original US-version.
Using BeyondCompare I copied the values from my original Resource.da.resx (the non-working version) to the new version in small portions at a time and testing it each time.

Eventually I arrived at having 2 different version of the new Resource.da.resx – one working OK and one resulting in the failure as described in my first post.
The 2 version are binary equal except that in the working version, the following resource-items have not been translated (that is, their values hold the original US-text):

  • IndexWriterTaskCompleteMessage
  • IndexWriterTaskQueuedMessage
  • IndexWriterTaskRunningFormatString
  • IndexWriterTaskStartedMessage

I should mention that I have not tried to translate the 4 item individually. I just skipped all 4 items when I came across the problem.

I have used the following procedure when testing:

  • Stop the web-service
  • delete all rows from mp_TaskQueue and mp_IndexingQueue
  • delete the files in ... \sites\1\index
  • Upload the Resource.da.resx to test
  • touch web.config
  • restart the web-service
  • touch web.config

I have tested the final 2 versions several times alternatively and got the same result each time.
I have not been able to come any closer to the root-problem. So I will just stick with the working version for now.

My provider has confirmed that I am hosted in Full Trust.

I will of course send you the Danish resource files, when I have finished them. I still miss some translations and to review all translations.

Best,

Kurt
 

1/23/2009 2:57:07 PM
Gravatar
Total Posts 18439

Re: Danish localization problem

Hi Kurt,

Thanks for narrowing it down. I will look into this, perhaps there is some issue passing in the localized labels in to the task.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.