Git Product home page Git Product logo

Comments (5)

silverstripesk avatar silverstripesk commented on July 30, 2024 1

I can confirm this bug.

If I want to add new block without Title to any page:

  1. by pressing "Save"
    validation is in place

  2. by pressing "Save and publish"
    i get this error:

ERROR [User Warning]: Can't find /0 in stage Stage
IN POST /admin/pages/edit/EditForm/field/Blocks/add-multi-class/ButtonBlock/ItemEditForm
Line 790 in /vagrant/www/framework/model/Versioned.php

Source
======
  781:          $conn = DB::getConn();
  782:          if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($baseClass,
       true);
  783:          $from->write();
  784:          if(method_exists($conn, 'allowPrimaryKeyEditing')) $conn->allowPrimaryKeyEditing($baseClass,
       false);
  785: 
  786:          $from->destroy();
  787:          
  788:          Versioned::set_reading_mode($oldMode);
  789:      } else {
* 790:          user_error("Can't find {$this->owner->URLSegment}/{$this->owner->ID} in stage $fromStage",
       E_USER_WARNING);
  791:      }
  792:  }
  793:  
  794:  /**
  795:   * Set the migrating version.
  796:   *

Trace
=====
user_error(Can't find /0 in stage Stage,512)
Versioned.php:790

Versioned->publish(Stage,Live)

call_user_func_array(Array,Array)
Object.php:731

Object->__call(publish,Array)
GridFieldBetterButtonsItemRequest.php:275

ButtonBlock->publish(Stage,Live)
GridFieldBetterButtonsItemRequest.php:275

GridFieldBetterButtonsItemRequest->publish(Array,Form,SS_HTTPRequest)

call_user_func_array(Array,Array)
Object.php:731

Object->__call(publish,Array)
Form.php:378

GridFieldAddNewMultiClassHandler->publish(Array,Form,SS_HTTPRequest)
Form.php:378

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:811

GridField->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:222

RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
RequestHandler.php:222

RequestHandler->handleRequest(SS_HTTPRequest,DataModel)
Controller.php:153

Controller->handleRequest(SS_HTTPRequest,DataModel)
LeftAndMain.php:443

LeftAndMain->handleRequest(SS_HTTPRequest,DataModel)
AdminRootController.php:93

AdminRootController->handleRequest(SS_HTTPRequest,DataModel)
Director.php:370

Director::handleRequest(SS_HTTPRequest,Session,DataModel)
Director.php:153

Director::direct(/admin/pages/edit/EditForm/field/Blocks/add-multi-class/ButtonBlock/ItemEditForm,DataModel)
main.php:177

from silverstripe-blocks.

sheadawson avatar sheadawson commented on July 30, 2024

I've tried to replicate this in the cms by saving a block on a page, and by saving a block in model admin, but in both cases the validation fails as expected, prompting the user to enter a block title.

screen shot 2015-03-28 at 1 24 17 pm

Do you have any suggestions to help me replicate the error you get?

from silverstripe-blocks.

micschk avatar micschk commented on July 30, 2024

Shea, sorry about this bugreport, it was more or less meant as a quick note
to look into further myself, but other stuff came up.

I suspect the error may be caused by the combination of
versioned/betterbuttons and a specific field used on the block instead of
the block module itself (namedlinkfield). Will update you after i've looked
into this.

(Report can probably be closed)

Op 28 mrt. 2015 03:25 schreef "Shea Dawson" [email protected]:

I've tried to replicate this in the cms by saving a block on a page, and
by saving a block in model admin, but in both cases the validation fails as
expected, prompting the user to enter a block title.

Do you have any suggestions to help me replicate the error you get?


Reply to this email directly or view it on GitHub.

from silverstripe-blocks.

sheadawson avatar sheadawson commented on July 30, 2024

Ok cool, will close for now

from silverstripe-blocks.

asecondwill avatar asecondwill commented on July 30, 2024

I get the same error. Was there ever a fix or conclusion to this?

from silverstripe-blocks.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.