Classification without multiple selection

Posted by Community Admin on 04-Aug-2018 15:54

Classification without multiple selection

All Replies

Posted by Community Admin on 29-Jul-2011 00:00

Hi,

Here's what I do:

- Create a new classification "News types"
- Add this new classification to the News

This works. But multiple selection is enabled by default, and I need to disable it.
From News, I go to Settings, and:

- I go to News > Controls > NewsBackend > Views > NewsBackEndEdit > Sections > CustomFieldsSection > NewsTypes
- I uncheck the box "AllowMultipleSelection" and save
- I do the same with NewsBackInsert, NewsBackPreview, and NewsBackVersionPreview

Result: I get errors when editing news.
- If I try to save or publish a news, I get: Expecting state 'Element'.. Encountered 'Text'  with name '', namespace ''.
- If I try to preview a news, I get: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

This is with SF 4.1 SP3.

Posted by Community Admin on 01-Aug-2011 00:00

Hi Thomas,

We're aware of this problem and it will be fixed in 4.2

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 11-Aug-2011 00:00

I just updated to 4.2, and it still doesn't work. Bummer.

I still get the following error when trying to save a news:
Expecting state 'Element'.. Encountered 'Text'  with name '', namespace ''.

Posted by Community Admin on 17-Aug-2011 00:00

Hi Thomas,

Could you open a ticket and there provide your database and configuration files?

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 18-Aug-2011 00:00

Hi Pavel,

First, could you please confirm that the bug has indeed been fixed in 4.2? Because I couldn't find it in the change log.
The fact I get the exact same error makes me wonder whether anything has changed.

Thanks.

Posted by Community Admin on 18-Aug-2011 00:00

Hi,

Sorry to hijack this thread

I am also receiving this exact same error too but in a Custom Generic Module but again on a Hierarchical Taxonomy.  So please if you do find a solution to this problem could it be made public.

This is my definition that gives this problem:

01.var stateTaxonomyField = new HierarchicalTaxonFieldDefinitionElement(addressSection.Fields)
02.           
03.               ID = "stateTaxonomyFieldControl",
04.               DataFieldName = "States",
05.               DisplayMode = displayMode,
06.               ResourceClassId = typeof(RatingsResources).Name,
07.               TaxonomyId = RatingsModule.StatesTaxonomyId,
08.               WebServiceUrl = "~/Sitefinity/Services/Taxonomies/HierarchicalTaxon.svc",
09.               AllowMultipleSelection = false,
10.               WrapperTag = HtmlTextWriterTag.Li,
11.               Title = "lState"
12.           ;
13.           stateTaxonomyField.ExpandableDefinitionConfig = new ExpandableControlElement(stateTaxonomyField)
14.           
15.               Expanded = true
16.           ;           
17.           addressSection.Fields.Add(stateTaxonomyField);

Line 9 is the culprit in my case.

Posted by Community Admin on 18-Aug-2011 00:00

Hi Sean,

You're not hijacking the thread, it's totally relevant. Thanks for sharing your experience.
I guess that shows it's not just an isolated issue with my configuration or database.

Posted by Community Admin on 24-Aug-2011 00:00

Hello Thomas,

Here is an update:

Initially we were indeed working on this, but we've found that the fixes done for this bug are causing regressions, so we had to revert the changes and leave the issue open for Sitefinity 4.2. In other words, we confirm that the issue still persist - the same Seam points out. 

We have two options - definitely fix it for SP1, or get someone from the dev. team to provide you with a workaround (this could take a day or two though). It's your call. If it is very urgent, we will push to provide you with a workaround. 

We apologize for all the troubles with this issue. 

All the best,
Georgi
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Posted by Community Admin on 24-Aug-2011 00:00

Hi Georgi,

Thank you very much for clearing things up.

It's not very urgent, the client could just tell the users not to pick more than one classification item for now, and hopefully they'll behave. Then once the fix is released, change the configuration to disable multiple selection.

That said, I wonder how it'd behave if 2 items were selected, then multiple selection gets disabled afterward. Maybe just keep the first one selected when the item is resaved, or something, but make sure it doesn't trigger a blocking exception.

Posted by Community Admin on 04-Jun-2012 00:00


I created a module with a custom field designated as a classification type. I created a classification list of States. I only want the user to select one State. How can I do this in 5.1?
Thanks!

Posted by Community Admin on 04-Jun-2012 00:00

I created a module with a custom field designated as a classification type. I created a classification list of States. I only want the user to select one State. How can I do this in 5.1?
Thanks!

Posted by Community Admin on 09-Jul-2012 00:00

I'm getting the same issue on 5.0 and I have just the basic fields on a detail view in my Content Module.

Edit: I've just discovered that I've had conflicting model field names with content link field names.  I've resolved that issue but now am encountering another error:

Object of type 'Telerik.Sitefinity.Data.Linq.LinqQuery`2[Telerik.Sitefinity.Model.ContentLinks.ContentLink,Telerik.Sitefinity.Model.ContentLinks ContentLink]' cannot be converted to type System.Collections.Generic.IList`1[Telerik.Sitefinity.Model.ContentLinks.ContentLink]'.

This thread is closed