Yii2.0 user-management Module Migrations Error - php

I am trying to install user-management module in Yii2.
I am getting an error while running the migrations command for this module.
Here is the fresh Stack trace from my terminal:
$ sudo php yii migrate --migrationPath=vendor/webvimark/module-user-management/migrations
Yii Migration Tool (based on Yii v2.0.3)
Total 10 new migrations to be applied:
m140608_173539_create_user_table
m140611_133903_init_rbac
m140808_073114_create_auth_item_group_table
m140809_072112_insert_superadmin_to_user
m140809_073114_insert_common_permisison_to_auth_item
m141023_141535_create_user_visit_log
m141116_115804_add_bind_to_ip_and_registration_ip_to_user
m141121_194858_split_browser_and_os_column
m141201_220516_add_email_and_email_confirmed_to_user
m141207_001649_create_basic_user_permissions
Apply the above migrations? (yes|no) [no]:yes
*** applying m140608_173539_create_user_table
Exception: Trying to get property of non-object (/var/www/html/***/vendor/webvimark/module-user-management/migrations/m140608_173539_create_user_table.php:16)
#0 /var/www/html/***/vendor/webvimark/module-user-management/migrations/m140608_173539_create_user_table.php(16): yii\base\ErrorHandler->handleError(8, 'Trying to get p...', '/var/www/html/m...', 16, Array)
#1 /var/www/html/***/vendor/yiisoft/yii2/db/Migration.php(81): m140608_173539_create_user_table->safeUp()
#2 /var/www/html/***/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(492): yii\db\Migration->up()
#3 /var/www/html/***/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(129): yii\console\controllers\BaseMigrateController->migrateUp('m140608_173539_...')
#4 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#5 /var/www/html/***/vendor/yiisoft/yii2/base/InlineAction.php(55): call_user_func_array(Array, Array)
#6 /var/www/html/***/vendor/yiisoft/yii2/base/Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#7 /var/www/html/***/vendor/yiisoft/yii2/console/Controller.php(91): yii\base\Controller->runAction('', Array)
#8 /var/www/html/***/vendor/yiisoft/yii2/base/Module.php(455): yii\console\Controller->runAction('', Array)
#9 /var/www/html/***/vendor/yiisoft/yii2/console/Application.php(161): yii\base\Module->runAction('migrate', Array)
#10 /var/www/html/***/vendor/yiisoft/yii2/console/Application.php(137): yii\console\Application->runAction('migrate', Array)
#11 /var/www/html/***/vendor/yiisoft/yii2/base/Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#12 /var/www/html/***/yii(23): yii\base\Application->run()
#13 {main}
*** failed to apply m140608_173539_create_user_table (time: 0.004s)
Migration failed. The rest of the migrations are canceled.
I am not sure, what am I doing wrong here.

Make sure you included module in your application config:
'modules' => [
'user-management' => [
'class' => 'webvimark\modules\UserManagement\UserManagementModule',
// Here you can set your handler to change layout for any controller or action
// Tip: you can use this event in any module
'on beforeAction' => function (\yii\base\ActionEvent $event) {
if ($event->action->uniqueId == 'user-management/auth/login') {
$event->action->controller->layout = 'loginLayout.php';
};
},
],
],
It's covered in extension readme.
It's falling when accessing non-existing module in this line:
$this->createTable(Yii::$app->getModule('user-management')->user_table, array(

Related

In Container.php line 767: Class mailer does not exist

I am very new to PHP, can someone help me to fix this issue. When i run the command composer install, I am getting this error.
[2020-12-08 10:28:26] production.ERROR: Class mailer does not exist {"exception":"[object] (ReflectionException(code: -1): Class mailer does not exist at /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php:767)
[stacktrace]
#0 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(767): ReflectionClass->__construct('mailer')
#1 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(646): Illuminate\Container\Container->build('mailer')
#2 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(601): Illuminate\Container\Container->resolve('mailer', Array)
#3 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734): Illuminate\Container\Container->make('mailer', Array)
#4 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Container/Container.php(1210): Illuminate\Foundation\Application->make('mailer')
#5 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(161): Illuminate\Container\Container->offsetGet('mailer')
#6 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(130): Illuminate\Support\Facades\Facade::resolveFacadeInstance('mailer')
#7 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(217): Illuminate\Support\Facades\Facade::getFacadeRoot()
#8 /var/www/cachet/app/Exceptions/Handler.php(83): Illuminate\Support\Facades\Facade::__callStatic('send', Array)
#9 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(314): CachetHQ\Cachet\Exceptions\Handler->report(Object(ErrorException))
#10 /var/www/cachet/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(118): Illuminate\Foundation\Http\Kernel->reportException(Object(ErrorException))
#11 /var/www/cachet/public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#12 {main}
"}

Lumen/Laravel Error - ReflectionException: Class App\Http\Controllers\Photos\TestController does not exist

I am trying to organize my project (lumen / laravel) in such a way that my controls are in subfolders to have more control. I am following the official lumen guide (https://lumen.laravel.com/docs/6.x/controllers) but the problem is as follows:
In my route file (routes/web.php) I have the following code:
<?php
$router->get('test', 'Photos\TestController#show');
And my controller is located in the path app/Http/Controllers/Photos/TestController.php and has the following code:
<?php
namespace App\Http\Controllers;
class TestController extends Controller
{
public function show(){
return "hello";
}
}
But at the time of making a request to the url http://localhost/myproject/public/test I get the following message:
Click to view
And in my log file (storage/logs/lumen-xx-xx-xx.log) I get the following error:
[2020-01-19 02:59:12] local.ERROR: ReflectionException: Class App\Http\Controllers\Photos\TestController does not exist in C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php:803
Stack trace:
#0 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(803): ReflectionClass->__construct('App\\Http\\Contro...')
#1 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(681): Illuminate\Container\Container->build('App\\Http\\Contro...')
#2 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(629): Illuminate\Container\Container->resolve('App\\Http\\Contro...', Array)
#3 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Application.php(267): Illuminate\Container\Container->make('App\\Http\\Contro...', Array)
#4 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(311): Laravel\Lumen\Application->make('App\\Http\\Contro...')
#5 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(278): Laravel\Lumen\Application->callControllerAction(Array)
#6 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(263): Laravel\Lumen\Application->callActionOnArrayBasedRoute(Array)
#7 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(165): Laravel\Lumen\Application->handleFoundRoute(Array)
#8 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(416): Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(Object(Laravel\Lumen\Http\Request))
#9 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(171): Laravel\Lumen\Application->sendThroughPipeline(Array, Object(Closure))
#10 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(108): Laravel\Lumen\Application->dispatch(NULL)
#11 C:\xampp\htdocs\colegio\public\index.php(28): Laravel\Lumen\Application->run()
#12 {main}
Next Illuminate\Contracts\Container\BindingResolutionException: Target class [App\Http\Controllers\Photos\TestController] does not exist. in C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php:805
Stack trace:
#0 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(681): Illuminate\Container\Container->build('App\\Http\\Contro...')
#1 C:\xampp\htdocs\colegio\vendor\illuminate\container\Container.php(629): Illuminate\Container\Container->resolve('App\\Http\\Contro...', Array)
#2 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Application.php(267): Illuminate\Container\Container->make('App\\Http\\Contro...', Array)
#3 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(311): Laravel\Lumen\Application->make('App\\Http\\Contro...')
#4 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(278): Laravel\Lumen\Application->callControllerAction(Array)
#5 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(263): Laravel\Lumen\Application->callActionOnArrayBasedRoute(Array)
#6 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(165): Laravel\Lumen\Application->handleFoundRoute(Array)
#7 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(416): Laravel\Lumen\Application->Laravel\Lumen\Concerns\{closure}(Object(Laravel\Lumen\Http\Request))
#8 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(171): Laravel\Lumen\Application->sendThroughPipeline(Array, Object(Closure))
#9 C:\xampp\htdocs\colegio\vendor\laravel\lumen-framework\src\Concerns\RoutesRequests.php(108): Laravel\Lumen\Application->dispatch(NULL)
#10 C:\xampp\htdocs\colegio\public\index.php(28): Laravel\Lumen\Application->run()
#11 {main} {"exception":"[object] (Illuminate\\Contracts\\Container\\BindingResolutionException(code: 0): Target class [App\\Http\\Controllers\\Photos\\TestController] does not exist. at C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php:805)
[stacktrace]
#0 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(681): Illuminate\\Container\\Container->build('App\\\\Http\\\\Contro...')
#1 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(629): Illuminate\\Container\\Container->resolve('App\\\\Http\\\\Contro...', Array)
#2 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Application.php(267): Illuminate\\Container\\Container->make('App\\\\Http\\\\Contro...', Array)
#3 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(311): Laravel\\Lumen\\Application->make('App\\\\Http\\\\Contro...')
#4 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(278): Laravel\\Lumen\\Application->callControllerAction(Array)
#5 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(263): Laravel\\Lumen\\Application->callActionOnArrayBasedRoute(Array)
#6 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(165): Laravel\\Lumen\\Application->handleFoundRoute(Array)
#7 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(416): Laravel\\Lumen\\Application->Laravel\\Lumen\\Concerns\\{closure}(Object(Laravel\\Lumen\\Http\\Request))
#8 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(171): Laravel\\Lumen\\Application->sendThroughPipeline(Array, Object(Closure))
#9 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(108): Laravel\\Lumen\\Application->dispatch(NULL)
#10 C:\\xampp\\htdocs\\colegio\\public\\index.php(28): Laravel\\Lumen\\Application->run()
#11 {main}
[previous exception] [object] (ReflectionException(code: -1): Class App\\Http\\Controllers\\Photos\\TestController does not exist at C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php:803)
[stacktrace]
#0 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(803): ReflectionClass->__construct('App\\\\Http\\\\Contro...')
#1 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(681): Illuminate\\Container\\Container->build('App\\\\Http\\\\Contro...')
#2 C:\\xampp\\htdocs\\colegio\\vendor\\illuminate\\container\\Container.php(629): Illuminate\\Container\\Container->resolve('App\\\\Http\\\\Contro...', Array)
#3 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Application.php(267): Illuminate\\Container\\Container->make('App\\\\Http\\\\Contro...', Array)
#4 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(311): Laravel\\Lumen\\Application->make('App\\\\Http\\\\Contro...')
#5 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(278): Laravel\\Lumen\\Application->callControllerAction(Array)
#6 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(263): Laravel\\Lumen\\Application->callActionOnArrayBasedRoute(Array)
#7 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(165): Laravel\\Lumen\\Application->handleFoundRoute(Array)
#8 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(416): Laravel\\Lumen\\Application->Laravel\\Lumen\\Concerns\\{closure}(Object(Laravel\\Lumen\\Http\\Request))
#9 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(171): Laravel\\Lumen\\Application->sendThroughPipeline(Array, Object(Closure))
#10 C:\\xampp\\htdocs\\colegio\\vendor\\laravel\\lumen-framework\\src\\Concerns\\RoutesRequests.php(108): Laravel\\Lumen\\Application->dispatch(NULL)
#11 C:\\xampp\\htdocs\\colegio\\public\\index.php(28): Laravel\\Lumen\\Application->run()
#12 {main}
"}
I would like to know what I am doing wrong, since I read the documentation several times and I still can't find the solution, I also searched the internet and nobody has asked about it. Thank you very much in advance.
Since your controllers are located in a subfolder, therefore you need to change also the namespace of it by adding the subfolder of it like below.
namespace App\Http\Controllers\Photos
Then to be able to extend your controller to a Controller class. Put this code also.
use App\Http\Controllers\Controller

Getting an error while connecting to the BigTable using Google's PHP client library

I've created a BigTable instance in my GC account and when I'm trying to connect to it using Google's library (this is a sample code from Google's docs):
require 'vendor/autoload.php';
use Google\Cloud\Bigtable\BigtableClient;
/** Uncomment and populate these variables in your code */
$project_id = 'my_project_id';
$instance_id = 'table_instance';
$table_id = 'table_name';
// Connect to an existing table with an existing instance.
$dataClient = new BigtableClient([
'projectId' => $project_id,
]);
$table = $dataClient->table($instance_id, $table_id);
$key = 'r1';
// Read a row from my-table using a row key
$row = $table->readRow($key);
$column_family_id = 'cf1';
$column_id = 'c1';
// Get the Value from the Row, using the column_family_id and column_id
$value = $row[$column_family_id][$column_id][0]['value'];
printf("Row key: %s\nData: %s\n", $key, $value);
I'm getting an error:
Fatal error: Uncaught BadMethodCallException: Streaming calls are not supported while using the REST transport. in /srv/vendor/google/gax/src/Transport/HttpUnaryTransportTrait.php:119 Stack trace: #0 /srv/vendor/google/gax/src/Transport/HttpUnaryTransportTrait.php(63): Google\ApiCore\Transport\RestTransport->throwUnsupportedException() #1 /srv/vendor/google/gax/src/GapicClientTrait.php(479): Google\ApiCore\Transport\RestTransport->startServerStreamingCall(Object(Google\ApiCore\Call), Array) #2 /srv/vendor/google/gax/src/Middleware/CredentialsWrapperMiddleware.php(61): Google\Cloud\Bigtable\V2\Gapic\BigtableGapicClient->Google\ApiCore\{closure}(Object(Google\ApiCore\Call), Array) #3 /srv/vendor/google/gax/src/Middleware/FixedHeaderMiddleware.php(67): Google\ApiCore\Middleware\CredentialsWrapperMiddleware->__invoke(Object(Google\ApiCore\Call), Array) #4 /srv/vendor/google/gax/src/Middleware/RetryMiddleware.php(85): Google\ApiCore\Middleware\FixedHeaderMiddleware->__invoke(Object(Google\ApiCore\Call), Array) #5 /srv/vendor/google/gax/src/Middleware/OptionsFilterMiddleware.php(64): Google\ApiCore\Middleware\RetryMiddleware->__invoke(Object(Google\ApiCore\Call), Array) #6 /srv/vendor/google/gax/src/GapicClientTrait.php(462): Google\ApiCore\Middleware\OptionsFilterMiddleware->__invoke(Object(Google\ApiCore\Call), Array) #7 /srv/vendor/google/cloud-bigtable/src/V2/Gapic/BigtableGapicClient.php(357): Google\Cloud\Bigtable\V2\Gapic\BigtableGapicClient->startCall('ReadRows', 'Google\\Cloud\\Bi...', Array, Object(Google\Cloud\Bigtable\V2\ReadRowsRequest), 3) #8 [internal function]: Google\Cloud\Bigtable\V2\Gapic\BigtableGapicClient->readRows('projects/project...', Array) #9 /srv/vendor/google/cloud-core/src/ExponentialBackoff.php(80): call_user_func_array(Array, Array) #10 /srv/vendor/google/cloud-bigtable/src/ResumableStream.php(96): Google\Cloud\Core\ExponentialBackoff->execute(Array, Array) #11 /srv/vendor/google/cloud-bigtable/src/ChunkFormatter.php(168): Google\Cloud\Bigtable\ResumableStream->readAll() #12 [internal function]: Google\Cloud\Bigtable\ChunkFormatter->readAll() #13 /srv/vendor/google/cloud-bigtable/src/Table.php(331): Generator->current() #14 /srv/index.php(24): Google\Cloud\Bigtable\Table->readRow('r1') #15 {main} thrown in /srv/vendor/google/gax/src/Transport/HttpUnaryTransportTrait.php on line 119
Any help?
OK, I figured it out.
For those who facing the same problem:
create/add a line into your php.ini file:
extension=grpc.so
php.ini should be in the same directory with app.yaml

Schema error for magento-mongodb integration

I have followed the URL git project to connect magento with mongodb. Everything seems to be perfect while integrating.But the problem is when i tried to change any configuration through admin panel(Tried to add a product through admin panel) then its showing some schema error in Cm/Mongo/Model/Indexer/Schema.php file.Can any one suggest me to solve this error.Here are I am posting the error code.
Error:
2014-03-17T09:41:24+00:00 DEBUG (7): Exception message: Notice: Trying to get property of non-object in /var/www/mage2/app/code/community/Cm/Mongo/Model/Indexer/Schema.php on line 45
Trace: #0 /var/www/mage2/app/code/community/Cm/Mongo/Model/Indexer/Schema.php(45): mageCoreErrorHandler(8, 'Trying to get p...', '/var/www/mage2/...', 45, Array)
#1 /var/www/mage2/app/code/community/Cm/Mongo/Model/Indexer.php(116): Cm_Mongo_Model_Indexer_Schema->getEntityIndexers('catalog_product')
#2 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(331): Cm_Mongo_Model_Indexer->matchEntityAndType('catalog_product', 'mass_action')
#3 [internal function]: Mage_Index_Model_Process->indexEvents('catalog_product', 'mass_action')
#4 /var/www/mage2/app/code/core/Mage/Index/Model/Indexer.php(324): call_user_func_array(Array, Array)
#5 /var/www/mage2/app/code/core/Mage/Index/Model/Indexer.php(171): Mage_Index_Model_Indexer->_runAll('indexEvents', Array)
#6 /var/www/mage2/app/code/core/Mage/CatalogInventory/Model/Observer.php(949): Mage_Index_Model_Indexer->indexEvents('catalog_product', 'mass_action')
#7 /var/www/mage2/app/code/core/Mage/Core/Model/App.php(1338): Mage_CatalogInventory_Model_Observer->reindexProductsMassAction(Object(Varien_Event_Observer))
#8 /var/www/mage2/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_CatalogInventory_Model_Observer), 'reindexProducts...', Object(Varien_Event_Observer))
#9 /var/www/mage2/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('after_reindex_p...', Array)
#10 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(224): Mage::dispatchEvent('after_reindex_p...')
#11 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#12 /var/www/mage2/app/code/core/Mage/Index/Model/Process.php(249): Mage_Index_Model_Process->reindexEverything()
#13 /var/www/mage2/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(178): Mage_Index_Model_Process->reindexEverything()
#14 /var/www/mage2/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->massReindexAction()
#15 /var/www/mage2/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('massReindex')

Pagination error when upgrade from cakephp 1.3 to 2.0

I am upgrading cakephp 1.3 to 2.0
I am getting below error in error log
Error: [MissingTableException] Table aros_acos for model Permission was not found in datasource default.
Exception Attributes: array (
'table' => 'aros_acos',
'class' => 'Permission',
'ds' => 'default',
)
Request URL: /users/show?%2Fusers%2Fshow=
Stack Trace:
#0 /lib/Cake/Model/Model.php(3498): Model->setSource('aros_acos')
#1 /lib/Cake/Model/Datasource/DboSource.php(1063): Model->getDataSource()
#2 /lib/Cake/Model/Model.php(2902): DboSource->read(Object(User), Array)
#3 /lib/Cake/Model/Model.php(2874): Model->_readDataSource('count', Array)
#4 /app/Controller/Component/PaginationComponent.php(212): Model->find('count', 'status!='DL'')
#5 /app/Controller/UsersController.php(108): PaginationComponent->init('status!='DL'')
#6 [internal function]: UsersController->show()
#7 /lib/Cake/Controller/Controller.php(490): ReflectionMethod->invokeArgs(Object(UsersController), Array)
#8 /lib/Cake/Routing/Dispatcher.php(185): Controller->invokeAction(Object(CakeRequest))
#9 /lib/Cake/Routing/Dispatcher.php(160): Dispatcher->_invoke(Object(UsersController), Object(CakeRequest), Object(CakeResponse))
#10 /app/webroot/index.php(108): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse))
UsersController.php error section
$criteria = "status!='1'";
$this->Pagination->direction = 'ASC';
$this->Pagination->sortBy = 'username';
//********
$this->Pagination->setPageLimit($page_limit);
list($order, $limit, $page) = $this->Pagination->init($criteria); // Added
PaginationComponent.php
$count = $this->controller->{$this->modelClass}->find('count', $criteria);
Please let me know what is going wrong.
Thanks,
Have you even tried to read and understand the error message? Debugging starts by reading (and understanding) error messages if you get some.
[MissingTableException] Table aros_acos for model Permission was not found in datasource default.
That means that the table aros_acos doesn't exist in your database.

Categories