View more context



Has anyone experienced the following error when wrapping a gridfield in uncheese display logic wrapper? [Emergency] Uncaught TypeError: Argument 1 passed to SilverStripe\Forms\CompositeField::push() must be an instance of SilverStripe\Forms\FormField, instance of UncleCheese\DisplayLogic\Criteria given


I found the problem. With wrapper it seems to require "->end()" on the end of the display logic.

Eduard Ichim

does anyone have any clue on ?

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.

491                     $parentPointer->push($currentPointer);
492                 } else {
493                     $withName = $parentPointer instanceof FormField
494                         ? " named '{$parentPointer->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         }
506         return $currentPointer;```
Hide attachment content

Did you resolve this? I have the same error. The error has come up during a upgrade from 3 to 4 on RedirectorPage only from what I can see.


Log an issue on github for the CMS repository :)


I'd try to reproduce in 4.5 vanilla (if I were in your position)


At worst the issue will be closed with "cannot reproduce", which will at least give you pointers as to whether or not it might be project specific (some kind of interference from an extension or something) or not


do you have a stack trace to go with that error?


If the stack trace has some kind of project specific reference in it (e.g. mysite/code/ThisExtensionThatDoesStuffForMySite.php) then that may also be a clue :)


Metadata is now a type of composite field rather than a tab IIRC, so I feel like the issue is probably project specific though.


some extension or module that needs updating. It's possible to be a core module though - there are a lot of supported modules! If you can identify one that is more specific (see the stack trace) then that'd probably point out how to get around this.


worst comes to worst, you'll have to fork and fix locally.


Thanks a bunch. And yeah, my guess is it's project specific. The site is massive. I'll update this thread with how I go.

Show less replies

I think I'm doing something silly but I cant seem to find the template for my custom page type. I have the page called CustomPage.php with the namespace Company\TestProject\Pages Then I have the silverstripe template in the directory: themes/app/templates/Company/TestProject/Pages/Layout/ Anyone see if Im doing anything wrong?

This is all I have for the CustomPage.php file:

  1. <?php
  3. namespace Company\TestProject\Pages;
  5. use Page;
  7. class CustomPage extends Page
  8. {
  9. private static $table_name = 'CustomPage';
  10. }

Upgrade created something similar for me, and everything is broken.


Only successful upgrade so far had zero custom classes.


My problem was I forgot to update the theme in yml


Looks fine: silly question, but is the page definitely set to that page type?


Also double check the directory names have the correct case if you haven’t already, e.g. Testproject vs TestProject