Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Conversation

lsmith77
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets
License MIT
Doc PR

It seems like there is no output for "show" anymore when using SontaAdminBundle 2.3:
http://cmf.liip.ch/en/admin/cmf/menu/menu/cms/menu/main/show

@rande any tip for how to fix this?

@lsmith77
Copy link
Member Author

@dbu @dantleech @wouterj BTW I think we will have to check out all symfony-cmf repos to apply similar fixes where we so far have not yet done these ..

@lsmith77
Copy link
Member Author

I am going through all the bundles ..

@lsmith77
Copy link
Member Author

the issue seems to be related to sonata-project/SonataAdminBundle@0c1c26b

however I am not sure where these "showgroups" come from or what their structure is supposed to be. I also do not really see what button to click to get to the show view. I assume its only really relevant when using ACLs?

@lsmith77
Copy link
Member Author

or @pulzarraider can you give us a hint here?

@ElectricMaxxx
Copy link
Member

I have had an equal issue last week. I am using SonatAdmin 2.3.0 in my current project. There i needed to activate the VIEW Role for the admin, but i think we are using ROLE_SONATA_SUPER_ADMIN for all, right? So all should be available. And the route shouldn't be there without the access.
Second thing that i did was:

protected function configureListFields(ListMapper $listMapper)
{
   $listMapper
   ....
       ->add('_action', 'actions', array('show' =>  array()))
       ;
}

Atm i see no other chance to get the show buttons, then adding the _action.

@pulzarraider
Copy link
Contributor

It seems like there is no output for "show" anymore when using SontaAdminBundle 2.3

@lsmith77 I think this is related to renaming the deprecated configureShowField to configureShowFields. See the upgrade file.

@lsmith77
Copy link
Member Author

yes thx! that fixed it but two issues remain:

  1. not sure if this previously worked for some reason but it now does not properly convert the content object to a string
  2. is this compatible with previous versions of SonataAdminBundle?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pulzarraider enabling this leads to:

 Warning: nl2br() expects parameter 1 to be string, object given in /Users/lsmith/htdocs/cmf-sandbox/app/cache/dev/twig/5d/57/427a5055c1fe6f361ce05b279511ed2128aed189da5655c02b82365229e1.php on line 53

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbu: hmm maybe this has been broken ever since we removed the default __toString() method?

@lsmith77
Copy link
Member Author

ok .. it seems like the method has been available since 2.2, so 2) is answered. 1) imho is answered as well .. we broke this when we dropped the __toString() method and the test pass even with this warning in the output.

lsmith77 added a commit that referenced this pull request Oct 13, 2014
fix test setup, added php 5.6 to test matrix
@lsmith77 lsmith77 merged commit a936046 into master Oct 13, 2014
@lsmith77 lsmith77 deleted the fix_tests branch October 13, 2014 14:50
@pulzarraider
Copy link
Contributor

configureShowFields was available already in 2.0.

@lsmith77
Copy link
Member Author

created sonata-project/SonataDoctrinePhpcrAdminBundle#306 as a follow up

@dbu dbu mentioned this pull request Oct 13, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants