Eduard Ichim

Ok that is cool but how do you get a token value to put it in the <input type="hidden" name="SecurityID" value="" class="hidden" /> field?

Eduard Ichim

How can you manually validate CSRF without using the SilverStripe\Forms\Form::class?

Eduard Ichim

Figured it out! It was the unclecheese/betterbuttons; please ignore this issue

Eduard Ichim

This might be a hint or a separate problem, I've notice after I've added the relationship (I'm in the nothing happens stage) if I try to add a different kind of many relationship I get back Ajax requests to this URL require an X-Pjax header. which is a 400 Bad Request

Eduard Ichim

Hey guys, I'm facing this issue and I'm not sure what it is and if you guys are experiencing it as well. I've got a Page, which has a many relationship, and I'm using GridField::class to create the relationship in the CMS. First time when I add a item everything works perfectly, I click "save and close" redirects be back to the Page with the item in the table, if I wish to add another item, the URL changes, I can see the ajax request with the HTML response for the page to add the item BUT the view doesn't change at all, no loading icon nothing... is looks like I've never click the button... No errors in the console either...

  1. $heroImages = GridField::create(
  2. 'HeroCarouselImages',
  3. 'Hero Images',
  4. $this->HeroCarouselImages(),
  5. GridFieldConfig_RelationEditor::create()->addComponent(new GridFieldOrderableRows('SortID')));
  6. $heroImages->getConfig()
  7. ->getComponentByType(GridFieldAddNewButton::class)
  8. ->setButtonName('Add Hero Image');
  9. $heroImages->getConfig()
  10. ->getComponentByType(GridFieldDataColumns::class)
  11. ->setDisplayFields([
  12. 'CMSThumbnail' => 'Thumbnail',
  13. 'Title' => 'Title'
  14. ]);
  15. $fields->addFieldToTab('Root.Images', $heroImages);
Eduard Ichim

does anyone have any clue on https://silverstripe-users.slack.com/archives/C36U3BDHN/p1578916747182000 ?

Show 1 attachment(s)
Eduard Ichim

Hi folks, I'm getting this error and I'm not sure if it's SS or my configuration... Steps to follow: 1. Create a page (page type something you normally use for content) 2. Mark it as a page type "Redirector Page"; At this point if you wish to edit the page, change it to some other page type you get Tried to add a tab to object 'SilverStripe\Forms\Tab' named 'Main' - 'Metadata' didn't exist.



Source
491                     $parentPointer-&gt;push($currentPointer);
492                 } else {
493                     $withName = $parentPointer instanceof FormField
494                         ? " named '{$parentPointer-&gt;getName()}'"
495                         : null;
496                     $parentPointerClass = get_class($parentPointer);
497                     user_error(
498                         "FieldList::addFieldToTab() Tried to add a tab to object"
499                         . " '{$parentPointerClass}'{$withName} - '{$part}' didn't exist.",
500                         E_USER_ERROR
501                     );
502                 }
503             }
504         }
505 
506         return $currentPointer;```
Hide attachment content