A different sys_CheckBoxTree problem!

Hi

I am experiencing a problem with a 500 Internal server error when I try to create a new item in the Content Explorer. The problem is related to a shared field when I add the link to the lookup query in the Choices tab of the sys_CheckBoxTree control.

I have created the tree XML file and successfully tested that this appears ok within the content type and values are passed to the backend table. For the lookup query I have created a new application called rh_regions_ce and called the resource regionstreevalues. This is then linked to in the choices as mentioned above (see attached image). I have ensured that the application is started.

Any suggestions?

Thanks and regards

Richard

I should have waited 10 minutes - I have resolved the internal server error! I had not included variable information in the application’s selector properties.

I do still have a problem in that the ticks against the options selected in the CheckBoxTree are not been retained in the content editor once you update it. I might sort this one in the next 10 minutes too, but if you have any suggestions please let me!

Thanks and regards

Richard

Richard,

It’s not clear to me from your post what the problem is.

Is it that when you check some of the boxes and then save the item, the values don’t get updated at all? Or that the updates disappear sometimes?

The checkbox tree is different from all other controls in that it requires 2 different choice mechanisms: a “lookup” that returns all of the possible values in the XML format specified by sys_lookup.dtd, and a “tree” that defines the heirarchy of values. If you don’t have both of these, you will lose values in certain circumstances.

However, if you’re never seeing ANY updates, it’s likely that you have a different problem (a missing extension, for example).

Dave

Hi Dave

Apologies if I wasn’t clear.

When you ticks boxes then ‘Insert’ or ‘Update’ the content editor the ticks disappear. I have attached two images showing this. The values are being passed to the backend table.

I have both mechanisms in place following the guidance provided in the technical manual on pages 67 and 68.

Regards

Richard

Richard,

There are 2 general possibilities: either the choices are not being saved, or the saved choices are not being displayed.

The easiest way to tell is to preview a template that includes the region field. Unfortunately, due to the bug described in the other thread, you cannot use the debugger, but if you output the values in a loop, you can see what the values are. (You can also look at the backend tables).

Let us know if the choices are being saved.

Dave

Hi Dave

The values are being passed to the backend table. Please see attached image. I have also done a successful test of a jexl query I have created for an auto slot, which uses the information from the region field.

This would point to it being an issue with the saved choices not being displayed.

Regards

Richard

Hi Dave

I have pasted the PSXUIDefinition from the XML. You may notice that the application has been renamed to something more generic as we will be adding further lookups once this is resolved.

We did have a lookup in a different, which was for a previous project done in 5.6. This version of the UIDefinition seems to be a lot shorter and does not include a call to sys_MakeIntLink.

Regards

Richard

<PSXUIDefinition>
         <PSXDisplayMapper fieldSetRef="GenericRegion" id="0">
            <PSXDisplayMapping>
               <FieldRef>GenericRegion</FieldRef>
               <PSXUISet>
                  <Label>
                     <PSXDisplayText>Regions:</PSXDisplayText>
                  </Label>
                  <PSXControlRef id="11331" name="sys_CheckBoxTree">
                     <PSXParam name="tree_src_url">
                        <DataLocator>
                           <PSXTextLiteral id="0">
                              <text>../rx_resources/treedefs/regionslist.xml</text>
                           </PSXTextLiteral>
                        </DataLocator>
                     </PSXParam>
                  </PSXControlRef>
                  <ErrorLabel>
                     <PSXDisplayText>Regions:</PSXDisplayText>
                  </ErrorLabel>
                  <PSXChoices sortOrder="ascending" type="internalLookup">
                     <PSXUrlRequest>
                        <Href>../categories_support_ce/regionstreevalues</Href>
                        <Anchor/>
                     </PSXUrlRequest>
                  </PSXChoices>
               </PSXUISet>
               <PSXDisplayMapper fieldSetRef="GenericRegion" id="0">
                  <PSXDisplayMapping>
                     <FieldRef>sh_regions</FieldRef>
                     <PSXUISet/>
                  </PSXDisplayMapping>
               </PSXDisplayMapper>
            </PSXDisplayMapping>
         </PSXDisplayMapper>
      </PSXUIDefinition>

Hi Richard

you also need to pass the content id and revision id to the application that retrieves the values.

Here’s one i made earlier:

<PSXChoices sortOrder="ascending" type="internalLookup">
                     <PSXUrlRequest>
                        <Href>../sp_Support_ce/sp_location_values</Href>
                        <PSXParam name="sys_contentid">
                           <DataLocator>
                              <PSXSingleHtmlParameter id="0">
                                 <name>sys_contentid</name>
                              </PSXSingleHtmlParameter>
                           </DataLocator>
                        </PSXParam>
                        <PSXParam name="sys_revision">
                           <DataLocator>
                              <PSXSingleHtmlParameter id="0">
                                 <name>sys_revision</name>
                              </PSXSingleHtmlParameter>
                           </DataLocator>
                        </PSXParam>
                        <Anchor/>
                     </PSXUrlRequest>
                  </PSXChoices>

Cheers
James

Hi James

Thanks very much, this has resolved the problem.

Regards

Richard

I have a similar problem with the sys_checkBoxTree control.

My values are stored correctly, and the boxes are ticked when the editor is opened, however if there is a validation error with any of the fields in the content editor (e.g. I leave out the system title) then the choices are not remembered.

Anyone any ideas?

I have also seen the same behavior - checkbox tree values not retained when validation fails elsewhere on a content editor. This was discussed back in February in this thread:

http://forum.percussion.com/showthread.php?t=285

Can anyone from Percussion comment on whether this is a known problem?

-Kathleen