Custom Module Language Error
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.
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
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
Bump
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
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
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