Custom Module Language Error

Posted by Community Admin on 04-Aug-2018 19:30

Custom Module Language Error

All Replies

Posted by Community Admin on 25-May-2011 00:00

Hello,

We are creating a custom module that is based on the Product Catalog example from the SDK. We have modified the example slightly to meet our needs (renamed some items, commented out some others).

The module installs OK, and we are able to enter the back-end page to add a new item without any errors. When we fill out the form for adding a new item, and then choose to "Publish" (or "Save as Draft"), we get an overlay/dialog that says:

Unsupported language "". If you want to support this language, please configure your application accordingly.

We have multiple languages configured, which is working with the core Sitefinity system.

We can't find where in the code this message is being displayed. Can somebody provide some ideas on where to look to start trouble-shooting? We have tried stepping through most of the module code, but this appears to be a dynamic client-side message that does not seem to live within the module code anywhere.

We are fully aware that it may be something we did to the Products module code that is causing this error, but we have no idea where to start. Resetting back to vanilla Products code and starting over would be very time-consuming, so any help on targeting troubleshooting would be awesome.

Thank you for any insight!

Regards,
John

Posted by Community Admin on 31-May-2011 00:00

Hello John,

Can you tell us the following things:
- Exact version of Sitefinity that you're using.
- Is it an upgraded one or fresh install.
- Have you swithched to multilingual mode after or before you installed the module?
Also could you check the structure of the database - the table for the type of products you have. There should be columns that are like title_, title_de(or the language you've installed) etc.

Thanks in advance.

Best wishes,
Pavel
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 31-May-2011 00:00

Pavel,

- We are using the latest version of Sitefinity. 4.1 SP1, I believe.

- This is a project we have been working on for a couple of months - we completely rebuilt it in 4.1, then upgraded to 4.1 SP1 in hopes of getting a simple custom module to work. (which we have done many times in v3.x)

- The site was in multi-lingual mode before installing the module.

The database tables appear correct - there are xxx_ fields in it.

The big issue here is that the custom module process seems very fragile, and there is no documentation at all that explains what the code is doing. In-code comments would go a very long way in making sure that if we change something, we know what the ramifications are.

Thank you for any insight!

Regards,
John

Posted by Community Admin on 03-Jun-2011 00:00

Bump

Posted by Community Admin on 06-Jun-2011 00:00

Hello John,

Please, check all  open access mappings and especially check not to have mappings for the Lstring properties in your modules.

If everything looks fine there

  • Open your database
  • Go to table - sf_schema_vrsns
  • Find the row with your module (in column module_name - the record should be like the type name of your module).
  • Check if the "cultures" column contains the same languages as the rest of the modules.


If not just add the missing languages there. If the languages are the same as for the rest go and edit the value of 'meta_data_changed' and set it to 1. Then restart the application.

Please tell us after that if you still have problems.

Kind regards,
Pavel
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 06-Jun-2011 00:00

Thank you, Pavel. We will try your suggestions.

Regarding Lstring: if we cannot use Lstrings, what is the correct/supported process to add properties that need to be localized?

Regards,
John

Posted by Community Admin on 07-Jun-2011 00:00

Hi John,

You can use Lstrings, just  such properties should not be part of the OpenAccess mappings. Like
myMapping.HasProperty(p => p.MyProperty); 
in case myProperty is Lstring it should not be mapped, since we're doing it automatically. If it is not of Lstring type and you want to persist it then it shall be part of the mappings.

Regards,
Pavel
the Telerik team

Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed