Configuration SonataMediaBundle from the Symfony2 framework - symfony

I finished configuring SonataMediaBundle successfully then the page
/formation/web/app_dev.php/admin/dashboard
is displayed.
But when I click "list" (menu Media), I get this error:
An exception has been thrown during the rendering of a template
("Parameter "id" for route "admin_sonata_media_media_edit" must match
"[^/]++" ("" given) to generate a corresponding URL.") in
SonataMediaBundle:MediaAdmin:list_custom.html.twig at line 17.
Any ideas?

I think your problem is based on this known issue:
Sonata type model - hide/delete the "create" button · Issue #530 · sonata-project/SonataAdminBundle
It is recommended to update to Doctrine 2.4

Related

Silverstripe 4: Use submitted forms as a managed model

I am trying to use the SilverStripe\UserForms\Model\Submission\SubmittedForm class as a managed model in my silverstripe 4 admin.
I am upgrading my site from ss3 to ss4 and am having an issue trying to use this class as a managed model. The 'submitted forms' tab appears but when I click to change to the tab I am getting the following error:
error-log.ERROR: Uncaught Exception Error: "Call to a member function canCreate() on null" at /var/www/html/vendor/silverstripe/userforms/code/Model/Submission/SubmittedForm.php:133)
Does anyone know why this is happening or anything I can do to fix it?

translation.warning with list item in Symfony2

Currently on Symfony2, I had log message such as translation.WARNING: Translation not found. {"id":"Electronique","domain":"messages","locale":"fr"} [] corresponding to list item.
Any ideas how to avoid this log message ?
Thanks

no DTD found in Symfony2.3

I am using Symfony2.3 _ Sonata Admin + Sonata E-commerce Bundle All installation is successfully done.
But When I go Back-end url as login then show me :
An exception has been thrown during the rendering of a template ("[ERROR 522] Validation failed: no DTD found ! (in n/a - line 2, column 21)
[ERROR 1877] Element '{urn:oasis:names:tc:xliff:document:1.2}trans-unit': Duplicate key- sequence ['sonata.invoice.references.date'] in key identity-constraint '{urn:oasis:names:tc:xliff:document:1.2}K_unit_id'. (in /var/www/xyz.com/web/ - line 172, column 0)") in SonataUserBundle:Admin:Security/login.html.twig at line 14.
I don't know why ?
I am totally confuse?
Any one know this ?
Indeed, this has been fixed here: https://github.com/sonata-project/ecommerce/commit/1aee2f8f78eb38a42b5f84260348262af8c2312d#diff-d0af37f82ac64ab8fc32c34c2f39b110
You should update your dependencies to fix the problem. Thank you.
You have probably duplicated translation key in your translation file. Symfony can't create translation cache files.

Tridion UI 2012 - Error "The item tcm:280-29837-64 does not exist."

When we are trying to create a new page through a PageType in Tridion UI.It is throwing below error --
"The item tcm:280-29837-64 does not exist."
Is it the Id of the page which i want to create,as it is no more exists in the tridion?
Could any body help me out in this regard ?
Note :-we defined the pagetype to those pages which already exist and published.
Edit-1 When we click on the 'Create Page' button(see the attached screenshot), above mentioned error Pops up.
In the cd_core.log file below error and warning comes --
ERROR XMLConfigurationReader - Error while validating file 'cd_ambient_conf.xml' with schema 'schemas/cd_ambient_conf.xsd'. cvc-complex-type.2.4.a: Invalid content was found starting with element 'ClaimStoreProvider'. One of '{Cookies}' is expected.
WARN AmbientDataContext - There is no current ambient data context - the ambient data framework is not properly initialised
Edit-2 Now errors related to AmbientDataWork are resolved but we are still getting same issue. There are two options in UI (a) "New Page" (b) Create and insert Content. This error also comes when we go with the option "Create and Insert Content". On each click of "Create Page" or "Create and insert Content" it generate a new Id(XXX-59248 -64 then XXX-59249- 64 etc) for page and same way for component also and throws above mentioned error message.
Note:- We are using IIS 6.
Edit-3 - I am using VB script in my page templates.
If someone is using VB script page template,it is required to install UI_2012.0.0.81248 hotfixes to create new pages in UI 2012.
I was not aware about this so fact of using VB script is not mentioned anywhere in the question .So I am updating my question again to assist community member in right direction.
It "looks like" the creation of the page somehow fails on the CM side (but i'm doing an awful lot of interpretation here based on very limited data...).
Can you verify
1. that you can create pages in the content management explorer in the publication with ID 280
2. that your blueprint context settings for UI 2012 are correct (should the new page/component be created in the publication with ID 280?)
3. that you have no workflow or event system interfering with the creation of the page
I would also expect an event log entry in the Tridion/Tridion Content Manager event log which would contain a detailed stack trace...

How to use GET and POST Arguments in Symfony2

We are transforming PHP Application to Symfony2 Application.
Most of the pages we are completely writing new but some pages we decided to keep it as it is. i.e I want to use the same php without any major change.
In the php page we used GET['prospect_id'], GET['executive_id'] and many other arguments. Both GET and Post methods. When I view the page in Symfony1.4 there is no error or warning.
But when I view in Symfony 2 I am getting undefined index error.
How can I solve the issue?
EDIT: if GET['prospect_id'] is null there is no error in Symfony 1.4 but i'm getting undefined index notice in Symfony2. There are many variables like that. Is it necessary to define variable before use it. How to avoid this notice message.
What i want is if i am using $_GET['xxx']. symfony2 should not show any notice or error. i want to escape from that.
Use (in Symfony2) the controllers request-object, to get those params:
$this->request->get('prospect_id');
$this->request->get('executive_id');
You can also set default values, if there is no value given. Take a look at this documentation.

Resources