Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation for title is not working on save and publish button #71

Open
roopamjain01 opened this issue Mar 10, 2016 · 2 comments
Open

Comments

@roopamjain01
Copy link

Validation for title is working when we click on save button, but it is not working when we click on save and publish button.

It seems like error with betterbutton.

My silverstripe version is 3.2.1

Error is as given below:-

ERROR [User Warning]: Can't find /0 in stage Stage IN POST /admin/pages/edit/EditForm/field/Blocks/add-multi-class/ContentBlock/ItemEditForm?Locale=en_NZ Line 851 in /var/www/mbie/framework/model/Versioned.php Source ====== 842: $conn = DB::get_conn(); 843: if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($baseClass, true); 844: $from->write(); 845: if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($baseClass, false); 846: 847: $from->destroy(); 848: 849: Versioned::set_reading_mode($oldMode); 850: } else { * 851: user_error("Can't find {$this->owner->URLSegment}/{$this->owner->ID} in stage $fromStage", E_USER_WARNING); 852: } 853: } 854: 855: /** 856: * Set the migrating version. 857: * Trace ===== user_error(Can't find /0 in stage Stage,512) Versioned.php:851 Versioned->publish(Stage,Live) call_user_func_array(Array,Array) Object.php:707 Object->__call(publish,Array) GridFieldBetterButtonsItemRequest.php:305 ContentBlock->publish(Stage,Live) GridFieldBetterButtonsItemRequest.php:305 GridFieldBetterButtonsItemRequest->publish(Array,Form,SS_HTTPRequest) call_user_func_array(Array,Array) Object.php:707 Object->__call(publish,Array) Form.php:462 GridFieldAddNewMultiClassHandler->publish(Array,Form,SS_HTTPRequest) Form.php:462 Form->httpSubmission(SS_HTTPRequest) RequestHandler.php:288 RequestHandler->handleAction(SS_HTTPRequest,httpSubmission) RequestHandler.php:200 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) RequestHandler.php:222 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) GridField.php:973 GridField->handleRequest(SS_HTTPRequest,DataModel) RequestHandler.php:222 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) RequestHandler.php:222 RequestHandler->handleRequest(SS_HTTPRequest,DataModel) Controller.php:157 Controller->handleRequest(SS_HTTPRequest,DataModel) LeftAndMain.php:451 LeftAndMain->handleRequest(SS_HTTPRequest,DataModel) AdminRootController.php:93 AdminRootController->handleRequest(SS_HTTPRequest,DataModel) Director.php:385 Director::handleRequest(SS_HTTPRequest,Session,DataModel) Director.php:149 Director::direct(/admin/pages/edit/EditForm/field/Blocks/add-multi-class/ContentBlock/ItemEditForm,DataModel) main.php:184

@roopamjain01
Copy link
Author

Hi Sheadawson,
Did you get chance to look the above error, title validation is not working with betterbutton.

@sheadawson
Copy link
Owner

Hi, sounds like this is an issue with the better buttons module rather than blocks module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants