UndefinedOffset/SortableGridField

User creation in SS CMS

roshnimichael opened this issue · 3 comments

When trying to create a new user in SS CMS and submitting form, are you sure you want to navigate from page? changes have not been saved message pops up. How can i disable this popup from showing.

This is coming from the core and is unlikely to be related to sortablegridfield since I'm setting the flag on the checkbox that should be disabling the change track for that checkbox. If you remove sortabglegridfield does it go away? If not then I suggest reaching out on the SilverStripe slack channel.

Trimmed down version of member class.

class TeamMember extends DataObject
{

public function getCMSFields()
{
    $fields = FieldList::create([
        TextField::create('FirstName', 'First Name')
            ->setCustomValidationMessage('Please enter the first name'),
        TextField::create('LastName', 'Last Name')
            ->setCustomValidationMessage('Please enter the last name'),
        TextField::create('JobTitle', 'Job Title')
            ->setCustomValidationMessage('Please enter the job title'),
        TextField::create('Qualifications', 'Qualifications')
            ->setCustomValidationMessage('Please enter the qualifications'),
        TextField::create('Phone', 'Phone')
            ->setCustomValidationMessage('Please enter the phone number'),
        TextField::create('Email', 'Email')
            ->setCustomValidationMessage('Please enter the email'),
        HTMLEditorField::create('Description', 'Description/Bio')
            ->setCustomValidationMessage('Please enter the description/bio'),
        LiteralField::create('Size 320 x 320', 'Size 320 x 320'),
        UploadField::create('ProfilePhoto')
            ->setAllowedExtensions(['png', 'jpg', 'jpeg'])
            ->setFolderName('team-members')
    ]);

    $fields->removeByName('SortOrder');

    return $fields;
}

}

I don't see anything in your TeamMember class that should be relating this to Sortable GridField perhaps raise this problem in the SilverStripe support Slack https://silverstripe-users.slack.com/ and see what the group there says.