Closed alexius closed 1 year ago
@alexius "It happens during opening the page of web site." is not enough info for anyone to reproduce your issue. Please provide detailed code/steps if you think this is a framework bug that should be investigated and fixed. If you need general support, try options here: https://www.yiiframework.com/community
@marcovtwout I will try to get more info. For now, it's difficult to say what exactly produces this error.
So far this doesn't look like a framework issue, closing.
There is another problem too - when we use the cache (php8+Yii+Redis), we get this problem:
Fatal error: Uncaught CDbException: The table "tablename" for active record class "TablenameRecord" cannot be found in the database. in /srv/www/htdocs/.../framework/db/ar/CActiveRecord.php on line 2391 CDbException: The table "tablename" for active record class "TablenameRecord" cannot be found in the database. in /srv/www/htdocs/.../framework/db/ar/CActiveRecord.php on line 2391
When we cancel the use of the cache, the error disappears. Just comment out these lines in main.conf:'cache'=>array( 'class'=>'CRedisCache', 'hostname'=> 'localhost', 'port'=>6379, 'database'=>1, )
The table is existed in DB.
Here is a trace:
CActiveRecord->getTableSchema( ) | .../CActiveRecord.php:1526 CActiveRecord->getMetaData( ) | .../CActiveRecord.php:663 CActiveRecordMetaData->__construct( $model = class TablenameRecord { private ${CComponent}_e = NULL; private ${CComponent}_m = NULL; private ${CModel}_errors = []; private ${CModel}_validators = NULL; private ${CModel}_scenario = ''; private ${CActiveRecord}_new = FALSE; private ${CActiveRecord}_attributes = []; private ${CActiveRecord}_related = []; private ${CActiveRecord}_c = NULL; private ${CActiveRecord}_pk = NULL; private ${CActiveRecord}_alias = 't' } ) | .../CActiveRecord.php:413
What steps will reproduce the problem?
It happens during opening the page of web site.
What is the expected result?
The page should by loaded normally.
What do you get instead?
Got fatal error.
Additional info