Silverstripe 4: Use submitted forms as a managed model - silverstripe

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?

Related

Error while pressing the button " type object "my model" has no attribute "my action" - Odoo 10

I'm working on Odoo 10. When I click on the button, get mentioned error.
I want to convert a contact in partner so I need create a new line in another table with the values I put in the .create(vals).
The following links are some extracts of my code , hope you can help me.
my class : model.py
my view : model_view.xml
my error : server trace back
I don't understand your code at all. You inherit a model called test.res.partner and I don't know if you already created it. That may be the issue.
It could be also the fact that you may no be importing your model.py file if this module inherits another one that you have already created.
In general this message indicates that the method convert_prospect does not exist in the model test.res.partner.
But seeing how you write your view (like using xpath in a view that does not inherit from another one) you should rework your fundamentals.
Ah and don't call that prospect() at the end.

Errors in Drupal 7 - Trying to get property of non-object in taxonomy_overview_terms()

I would love to get some help here. I enabled the forums module which is part of Drupal core. When I go to add a container, I get the following error:
Notice: Trying to get property of non-object in taxonomy_overview_terms() (line 279 of D:\Development\drupal\sites\all\modules\taxonomy\taxonomy.admin.inc).
Notice: Trying to get property of non-object in taxonomy_overview_terms() (line 403 of D:\Development\drupal\sites\all\modules\taxonomy\taxonomy.admin.inc).
Notice: Trying to get property of non-object in taxonomy_overview_terms() (line 405 of D:\Development\drupal\sites\all\modules\taxonomy\taxonomy.admin.inc).
I have tried to delete the tables and reinstall the module. I have the same module enabled on another one of our sites (which is identical in structure). But I do not get these errors on it. Anyone know how to fix this?
Thanks!
FWIW I debugged a similar issue and found that the 'forum' vocabulary nav variable (forum_nav_vocabulary) was not set in my installation, and that just plain breaks things. In the forum module there are a number of calls to variable_get('forum_nav_vocabulary', ''), but unfortunately if it is not set, using an empty vid has not been properly catered for.
If you set it, make sure to use the vid and not the machine name (i.e. the number, not the name). You will need to do this with drush, via the db, or using devel module's variable editor.

Configuration SonataMediaBundle from the Symfony2 framework

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

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