View more context

 

muskie9

it'll definitely be a little rough around the edges to start lol

CptPillow

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

CptPillow

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 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->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         }
505 
506         return $currentPointer;```
Hide attachment content
Jack

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.

nightjarnz

Log an issue on github for the CMS repository :)

nightjarnz

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

nightjarnz

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

nightjarnz

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

nightjarnz

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

nightjarnz

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

nightjarnz

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.

nightjarnz

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

Jack

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
jkersu

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/CustomPage.ss Anyone see if Im doing anything wrong?

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

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

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

cmcramer

Only successful upgrade so far had zero custom classes.

jkersu

My problem was I forgot to update the theme in yml

kinglozzer

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

kinglozzer

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