100 Row Edit Limit

100 Row Edit Limit

SchautDollarSchautDollar Posts: 21Questions: 6Answers: 1

Hello,

I have a page where the client will export the full page of data and in turn will be given the option to mark a column on said dataset as a certain value. If they continue with said operation, the page will set everything visible to said values on the column.

editor.edit(table.rows( ).indexes()).set('ads.laid_out', 1).submit();

The issue is the function will only ever process 100 rows. Anything past 100 is ignored.

I have also tried using editor.field('ads.laid_out').multiSet(1);.

I can't find any sort of editing limits within the documentation, so I assume this is not expected behavior.

My final solution was to process 100 at a time and rinse and repeat untill all the rows were successfully modified.

Server Side Script:

$issue_id = NULL;
    if(verifyValidFormFieldExists('issue_id', 'POST')){  
        $issue_id = $_POST['issue_id'];
    }

$editor = Editor::inst( $db, 'ads' )
    ->fields(
        Field::inst( 'ads.contract_id' ),
        Field::inst( 'ads.notes' ),
        Field::inst( 'ads.design_notes' ),
        Field::inst( 'ads.number' ),            
        Field::inst( 'ads.color' ),
        Field::inst( 'ads.orientation' ),
        Field::inst( 'ads.laid_out' ),
        Field::inst( 'issue_pricing_structure_attributes.name' ),
        Field::inst( 'clients.name' ),
        Field::inst( 'users.full_name' )   
    )
    ->leftJoin( 'contracts',   'contracts.id',   '=', 'ads.contract_id' )
    ->leftJoin( 'clients', 'clients.id', '=', 'contracts.client_id' )
    ->leftJoin( 'users',   'users.id',   '=', 'clients.primary_ad_rep_id' )
    ->leftJoin( 'issue_pricing_structure_attributes',   'issue_pricing_structure_attributes.id',   '=', 'ads.pricing_structure_attribute_id' );

    if(!is_null($issue_id)){  
      $editor->where( 'issue_id', $issue_id );
    }
    $editor->process( $_POST );
    
    $data = $editor->data();
    
    for($i = 0; $i < count($data['data']); $i++){
        $row = $data['data'][$i];
        if($row['users']['full_name'] == ""){
            $row['users']['full_name'] = "Not Assigned";
            $data['data'][$i] = $row;
        }
    }
    
    echo json_encode($data);

I may have a misunderstanding or am doing something wrong. Is this expected behavior and is there a way to increase the limit or remove it?

Thank you,
Ryan

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,740Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Hi Ryan,

    Neither the client-side, nor server-side of Editor has any preconfigured limits, so I suspect you might be running into a limit in the web-server as it is currently configured. Possibly the POST size is larger than it will accept. The server's error log would hopefully give an indication of what is going wrong.

    Allan

  • SchautDollarSchautDollar Posts: 21Questions: 6Answers: 1

    Hello Allan,

    Turns out that max_input_vars was set to 1000.

    Thank you for the idea.

    Ryan

This discussion has been closed.