I changed a table name from 'match' to 'matchGame'. Then I edited all of my code so that matchGame was used everywhere. I then used the commands doctrine:import and generate:entities to update all the things for the database. However if I run my program now I get following error:
[Symfony\Component\Debug\Exception\ContextErrorException]
Catchable Fatal Error: Argument 1 passed to Login\LoginBundle\Entity\Tactic
s::setMatchMatchid() must be an instance of Login\LoginBundle\Entity\Match,
instance of Login\LoginBundle\Entity\Matchgame given, called in C:\wamp\ww
w\SocProNetbeans\src\Login\LoginBundle\Command\CreateSeasonCommand.php on l
ine 73 and defined in C:\wamp\www\SocProNetbeans\src\Login\LoginBundle\Enti
ty\Tactics.php line 632
What adjustment do I need to do to change this?
It looks like you've not changed the name of your Match entity class.
Related
I'm trying to implement the FriendsOfCake\Search plugin in a CakePHP. I'm not 100% sure that I've implemented the search type correctly, but when I submit my form to try and use a date to search I'm receiving the following Fatal Error:
Error: Call to a member function format() on a non-object
I'm assuming somewhere along the way my date isn't being formatted as a date object, but not sure where I'm needing to do that at, if at all. Here are the code snippets I'm working with.
UsersTable.php - Inside of my searchConfiguration() method
->compare('created_start', [
'field' => $this->aliasField('created')
])
index.ctp - Generation of my form
<?= $this->Form->label('created_start') ?>
<?= $this->Form->date('created_start') ?>
I think that's all, I have text boxes and select boxes working as a part of the form, it's just the date that I haven't been able to get up and running.
Here is the Stack Trace for the error message (I believe this is what was being asked for, it's the left hand column of my page.
Cake\Error\BaseErrorHandler->handleFatalError
Core/src/Error/BaseErrorHandler.php, line 90
Cake\Error\BaseErrorHandler->Cake\Error\{closure}
[internal function]
The full Error block says:
Error: Call to a member function format() on a non-object
File /var/www/<project_name>/vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php
Line: 94
Line 94 of the DataTimeType.php is a part of the toDatabase() method. It is attempting to convert a datetime object into a string to use with the database. Specifically line 94
return $value->format($this->_format);
Using Cake version 3.1.0
I have problem with my Symfony2 project. On the localhost it works fine, but on the server I got that error:
"Catchable Fatal Error: Argument 1 passed to
Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::initialize()
must be of the type array, string given, called in
/home/visset/ftp/cms/dashboard/app/cache/dev/classes.php on line 252
and defined"
I checked it and to initialize() function passed empty string.
What is the reason of that problem?
I had a problem like this:
The argument 2 just passed to Illuminate\Database\Query\Builder:: the__ construct() must be an instance of Illuminate\Database\Query\Grammars\Grammar, null given, called in E:\xampp\htdocs\skripsi\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Model.php on line 1899 and defined.
As has been explained in the https://github.com/jenssegers/laravel-mongodb#troubleshooting way to fix it is twofold. Already I did as instructed but still error as above. How do I fix it?
I have read the book till chapter 14: Registration and login but whenever I try to run the application i get the following error
I have uploaded the Github Repo
If anyone who has the code for the book please share
( ! ) Strict standards: Non-static method Framework\Core::initialize()
should not be called statically in
C:\wamp\www\SwiftMVC\public\index.php on line 8
( ! ) Notice: Undefined variable: this in
C:\wamp\www\SwiftMVC\framework\core.php on line 14
( ! ) Fatal error: Uncaught exception 'LogicException' with message
'Passed array does not specify an existing static method (first array
member is not a valid class name or object)' in
C:\wamp\www\SwiftMVC\framework\core.php on line 14 ( ! )
LogicException: Passed array does not specify an existing static
method (first array member is not a valid class name or object) in
C:\wamp\www\SwiftMVC\framework\core.php on line 14
The publisher only offers the source code separated in each chapter.
In case you don't already know it can be found under ...
http://www.apress.com/9781430241645
Open the tab 'Source Code/Downloads'.
I have read the book Pro PHP MVC by Chris Pitt, there are 2 things i am not sure about-
1. The Core class and how autoloading of classes is done.
2. ArrayMethods::last isn't defined anywhere, my guess is that it is simply returning the last element but not sure of it.
I am new to opencart, so please help me.
I am using opencart version 1.5.6, now whenever I edit and delete the product it shows me
Fatal error: Call to a member function productUpdateListen() on a non-object in /home/crazepur/public_html/admin/controller/catalog/product.php on line 78
and
Fatal error: Call to a member function deleteProduct() on a non-object in /home/crazepur/public_html/admin/controller/catalog/product.php on line 133 respectively.
Although it edit and delete the product.
Please help me how to fix it.
Code in Line 78 $this->openbay->productUpdateListen($this->request->get['product_id'], $this->request->post);
And code in line 133 $this->openbay->deleteProduct($product_id);
This means $this->openbay is not an object which contains function productUpdateListen() & deleteProduct(), probably it's NULL or false in some cases (nothing found) due to it's not accessible. Out of scope.
Try
var_dump($this->openbay);
Check the O/P
it's simple and the error-message says it all: your $this->openbay doesn't have those methods (productUpdateListen() and deleteProduct()) - most likely it isn't an object at all.
please debug your code since it's impossible to say what's going wrong wich so little information. to start, do a var_dump($this->openbay); right before the function-calls and check the output.