Path

ez projects / ezapprove2 / forum / general / problem saving 'affected se...


Problem saving 'affected sections'

You need to be logged in to post messages in the forums. New users may register here.

Carlos Revillo

Member since:
09 January 2008

Posts: 53

Tuesday 10 February 2009 1:01:42 pm

Hi. We use this extension for one of our projects. We're having problems with the affected sections. No matter what section you choose. Next time you want to edit the workflow, all the sections appears as selected.

i think the problem came in the template.
this line



<option value="{$section.value}" {cond( $eventData.selected_section_list|contains( $section.value ), 'selected="selected"', '')}>{$section.name|wash}</option>



should be changed to



<option value="{$section.id}" {cond( $eventData.selected_section_list|contains( $section.id), 'selected="selected"', '')}>{$section.name|wash}</option>




just because the php file you have



$sections = eZSection::fetchList( false );


foreach ( array_keys( $sections ) as $key )


       {


          $section = $sections[$key];


          $section['Name'] = $section['name'];


         $section['value'] = $section['id'];


        

       }


                


return $sections;




I mean, you get the Section List and then there is a for but sections is not modified and you don't have the index "value" in each element...

Maybe it could be also changed by something like



$sectionsList = eZSection::fetchList( false );


$sections = array();


foreach ( array_keys( $sectionsList ) as $key => $section)


       {


          $item = $sectionsList[$key];


         $sections[]['name'] = $section['name'];


         $sections[]['value'] = $section['id'];


 

       }


                


return $sections;



this way you won't need to change the template...

I don't know if this has been reported befored... Sorry for that.
Up

You need to be logged in to post messages in the forums. New users may register here.