issue 3190
(Different cache results while using same queries) reported by andsermail
- I have a query construction like this:
$sql = 'SELECT * FROM `server` WHERE id = :id LIMIT 1';
$data = Yii::app()->db->cache(86400 * 30)->createCommand($sql)->bindParam(':id', $id)->queryRow();
The same data returned when changing $id.
I used this constructions:
$sql = 'SELECT * FROM `server` WHERE id = '.$id.' LIMIT 1';
$data = Yii::app()->db->cache(86400 * 30)->createCommand($sql)->queryRow();
PDO not used here. So it's not safe.
It's seems ok:
$data = Yii::app()->db->cache(86400 * 30)
->createCommand()
->select()
->from($this->tableName)
->where('id = :id', array(':id' => $id))
->queryRow();
I think it's a bug in caching logic. All this queries must return the same data.
I have a query construction like this:
$sql = 'SELECT * FROM `server` WHERE id = :id LIMIT 1';
$data = Yii::app()->db->cache(86400 * 30)->createCommand($sql)->bindParam(':id', $id)->queryRow();
The same data returned when changing $id.
I used this constructions:
$sql = 'SELECT * FROM `server` WHERE id = '.$id.' LIMIT 1';
$data = Yii::app()->db->cache(86400 * 30)->createCommand($sql)->queryRow();
PDO not used here. So it's not safe.
It's seems ok:
$data = Yii::app()->db->cache(86400 * 30)
->createCommand()
->select()
->from($this->tableName)
->where('id = :id', array(':id' => $id))
->queryRow();
I think it's a bug in caching logic. All this queries must return the same data.
2 hours ago
issue 3189
(yiiListView.update resets the pagination) reported by soft...@gmail.com
- What steps will reproduce the problem?
1. Show a CListView with many items so that the pagination will happen.
2. Go to the 2nd page.
3. Do some ajax updating of an item in the 2nd page.
4. Call yiiListView.update()
5. The CListView will be ajax updated, but it will reset the pagination and goes to the 1st page.
What is the expected output? What do you see instead?
The CListView should update its contents and remain in the 2nd page.
What version of the product are you using? On what operating system?
yii 1.1.9
Please provide any additional information below.
yiiListView.update() will not send the url param like "Model_page=?" when needed.
yiiCGridView.update() will send the pagination information when required, and it behaves like it should.
What steps will reproduce the problem?
1. Show a CListView with many items so that the pagination will happen.
2. Go to the 2nd page.
3. Do some ajax updating of an item in the 2nd page.
4. Call yiiListView.update()
5. The CListView will be ajax updated, but it will reset the pagination and goes to the 1st page.
What is the expected output? What do you see instead?
The CListView should update its contents and remain in the 2nd page.
What version of the product are you using? On what operating system?
yii 1.1.9
Please provide any additional information below.
yiiListView.update() will not send the url param like "Model_page=?" when needed.
yiiCGridView.update() will send the pagination information when required, and it behaves like it should.
r3561
(merge yiidoc to yii.) committed by qiang.xue
- merge yiidoc to yii.
merge yiidoc to yii.
14 hours ago
issue 3188
(CMenu::isItemActive not working properly for static routes) commented on by radek.an...@gmail.com
- This is for Yii 1.1.9
This is for Yii 1.1.9
14 hours ago
issue 3188
(CMenu::isItemActive not working properly for static routes) reported by radek.an...@gmail.com
-
URLManager configuration:
'urlManager'=>array(
'showScriptName' => false,
'urlFormat'=>'path',
'rules'=>array(
'/manager/archive' => array('/manager/event/','type'=>'old'),
...
CMenu in layout:
array('label'=>'Archive', 'url'=>array('/manager/archive/'), ),
Now, the CMenu::isItemActive is not working properly, because it does not see the statically aliased route.
I know I can override or use 'active' property, but I consider this as a bug, because it CMenu should take into consideration static routes and default controller name and it does not.
URLManager configuration:
'urlManager'=>array(
'showScriptName' => false,
'urlFormat'=>'path',
'rules'=>array(
'/manager/archive' => array('/manager/event/','type'=>'old'),
...
CMenu in layout:
array('label'=>'Archive', 'url'=>array('/manager/archive/'), ),
Now, the CMenu::isItemActive is not working properly, because it does not see the statically aliased route.
I know I can override or use 'active' property, but I consider this as a bug, because it CMenu should take into consideration static routes and default controller name and it does not.
15 hours ago
issue 3112
(CErrorHandler renders ajax errors incorrectly) commented on by f...@thefsb.org
- I appreciate this improvement. I would like to see the same for php errors in addition to exceptions.
As it stands, if a PHP error/warning is encountered with YII_DEBUG != true, the server returns an HTML page: "<h1>PHP Error [$code]</h1>\n<p>$message</p>\n".
I don't want PHP error messages going to the client.
Moreover, in general, you can't expect an ajax handler to be able to use that response.
I appreciate this improvement. I would like to see the same for php errors in addition to exceptions.
As it stands, if a PHP error/warning is encountered with YII_DEBUG != true, the server returns an HTML page: "<h1>PHP Error [$code]</h1>\n<p>$message</p>\n".
I don't want PHP error messages going to the client.
Moreover, in general, you can't expect an ajax handler to be able to use that response.
17 hours ago
issue 3187
(CSort : Enable sorting on aliased (for example calculated) a...) reported by adr...@netkin.fr
- What steps will reproduce the problem?
1.in a ActiveRecord class, define a public variable $aliased_attribute for example, and in search() function, add a calculated field to the criteria :
$criteria->select = '*, MAX(db_attribute) aliased_attribute';
2. allow this attribute to be sortable at the end of search() function :
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'sort' => array('*', 'aliased_attribute'),
));
3. In the view, add this aliased_attribute in CListView sortables attributes. The aliased_attribute should now be sortable.
What is the expected output? What do you see instead?
Sorting triggers an error, saying t.aliased_attribute is not defined.
I found a workaround overriding getOrderBy function in CSort class :
/**
* Fix for sorting on aliased attributes
*
* @return string the order-by columns represented by this sort object.
* This can be put in the ORDER BY clause of a SQL statement.
* @since 1.1.0
*/
public function getOrderBy() {
$directions = $this->getDirections();
if (empty($directions))
return is_string($this->defaultOrder) ? $this->defaultOrder : '';
else {
if ($this->modelClass !== null){
$staticModel = CActiveRecord::model($this->modelClass);
$schema = $staticModel->getDbConnection()->getSchema();
}
$orders = array();
foreach ($directions as $attribute => $descending) {
$definition = $this->resolveAttribute($attribute);
if (is_array($definition)) {
if ($descending)
$orders[] = isset($definition['desc']) ? $definition['desc'] : $attribute . ' DESC';
else
$orders[] = isset($definition['asc']) ? $definition['asc'] : $attribute;
} else if ($definition !== false) {
$attribute = $definition;
if (isset($schema)) {
if (($pos = strpos($attribute, '.')) !== false)
$attribute = $schema->quoteTableName(substr($attribute, 0, $pos)) . '.' . $schema->quoteColumnName(substr($attribute, $pos + 1));
else {
if (in_array($attribute, $staticModel->tableSchema->columnNames))
$attribute = CActiveRecord::model($this->modelClass)->getTableAlias(true) . '.' . $schema->quoteColumnName($attribute);
else
$attribute = $schema->quoteColumnName($attribute);
}
}
$orders[] = $descending ? $attribute . ' DESC' : $attribute;
}
}
return implode(', ', $orders);
}
}
What steps will reproduce the problem?
1.in a ActiveRecord class, define a public variable $aliased_attribute for example, and in search() function, add a calculated field to the criteria :
$criteria->select = '*, MAX(db_attribute) aliased_attribute';
2. allow this attribute to be sortable at the end of search() function :
return new CActiveDataProvider($this, array(
'criteria' => $criteria,
'sort' => array('*', 'aliased_attribute'),
));
3. In the view, add this aliased_attribute in CListView sortables attributes. The aliased_attribute should now be sortable.
What is the expected output? What do you see instead?
Sorting triggers an error, saying t.aliased_attribute is not defined.
I found a workaround overriding getOrderBy function in CSort class :
/**
* Fix for sorting on aliased attributes
*
* @return string the order-by columns represented by this sort object.
* This can be put in the ORDER BY clause of a SQL statement.
* @since 1.1.0
*/
public function getOrderBy() {
$directions = $this->getDirections();
if (empty($directions))
return is_string($this->defaultOrder) ? $this->defaultOrder : '';
else {
if ($this->modelClass !== null){
$staticModel = CActiveRecord::model($this->modelClass);
$schema = $staticModel->getDbConnection()->getSchema();
}
$orders = array();
foreach ($directions as $attribute => $descending) {
$definition = $this->resolveAttribute($attribute);
if (is_array($definition)) {
if ($descending)
$orders[] = isset($definition['desc']) ? $definition['desc'] : $attribute . ' DESC';
else
$orders[] = isset($definition['asc']) ? $definition['asc'] : $attribute;
} else if ($definition !== false) {
$attribute = $definition;
if (isset($schema)) {
if (($pos = strpos($attribute, '.')) !== false)
$attribute = $schema->quoteTableName(substr($attribute, 0, $pos)) . '.' . $schema->quoteColumnName(substr($attribute, $pos + 1));
else {
if (in_array($attribute, $staticModel->tableSchema->columnNames))
$attribute = CActiveRecord::model($this->modelClass)->getTableAlias(true) . '.' . $schema->quoteColumnName($attribute);
else
$attribute = $schema->quoteColumnName($attribute);
}
}
$orders[] = $descending ? $attribute . ' DESC' : $attribute;
}
}
return implode(', ', $orders);
}
}
Yesterday
24 hours ago
issue 3186
(SQLite Delete with Criteria and Order-By Fails Every Time) commented on by myselfas...@gmail.com
- Something like this. I have since removed the ->order assignment, but
re-added it here so that you could see it. I have not tested it, but it
should work.
$criteria = new CDbCriteria();
$criteria->condition = ('logtime < ' . (time() - $this->maxAge));
$criteria->order = 'logtime';
try
{
$numDeleted = YiiLog::model()->deleteAll($criteria);
}
catch(CDbException $ex)
{
Yii::log("ERROR: Could not delete old log entries: " .
$ex->getMessage());
return false;
}
Dustin
Something like this. I have since removed the ->order assignment, but
re-added it here so that you could see it. I have not tested it, but it
should work.
$criteria = new CDbCriteria();
$criteria->condition = ('logtime < ' . (time() - $this->maxAge));
$criteria->order = 'logtime';
try
{
$numDeleted = YiiLog::model()->deleteAll($criteria);
}
catch(CDbException $ex)
{
Yii::log("ERROR: Could not delete old log entries: " .
$ex->getMessage());
return false;
}
Dustin
31 hours ago
issue 3186
(SQLite Delete with Criteria and Order-By Fails Every Time) commented on by qiang.xue
- What is the code you use to delete?
What is the code you use to delete?
31 hours ago
issue 3183
(CActiveRecord::model() - The constructor fails to instantiat...) commented on by enrico.v...@gmail.com
- Yes, it has! cause the class extends ActiveRecord! I understand the nature of the problem and I solved by changing the name to the class.
I thought that this problem could be resolved at the code-level, but I understand that's a behavior of PHP language.
I apologize for the inconvenience, and congratulations for the framework.
Yes, it has! cause the class extends ActiveRecord! I understand the nature of the problem and I solved by changing the name to the class.
I thought that this problem could be resolved at the code-level, but I understand that's a behavior of PHP language.
I apologize for the inconvenience, and congratulations for the framework.
35 hours ago
issue 3186
(SQLite Delete with Criteria and Order-By Fails Every Time) reported by myselfas...@gmail.com
- What steps will reproduce the problem?
1. Delete from a SQLite table using a CDbCriteria object with a non-NULL "order" property.
What is the expected output? What do you see instead?
A return value of (0) or more affected rows (no CDbException or other failure).
What version of the product are you using? On what operating system?
1.1.5
Please provide any additional information below.
The final SQL sent to SQLite looks like:
DELETE FROM 'YiiLog' WHERE logtime < 1327783719 ORDER BY logtime
This is not a valid command (the ORDER BY clause is invalid). It must look like:
DELETE FROM 'YiiLog' INDEXED BY logtime WHERE logtime < 1327783764;
SQLite reference:
http://www.sqlite.org/lang_delete.html
Attached images:
1) Where PDO returns failure.
2) The produced SQL and the error message.
3) The corrected delete command.
Thanks.
Dustin Oprea
What steps will reproduce the problem?
1. Delete from a SQLite table using a CDbCriteria object with a non-NULL "order" property.
What is the expected output? What do you see instead?
A return value of (0) or more affected rows (no CDbException or other failure).
What version of the product are you using? On what operating system?
1.1.5
Please provide any additional information below.
The final SQL sent to SQLite looks like:
DELETE FROM 'YiiLog' WHERE logtime < 1327783719 ORDER BY logtime
This is not a valid command (the ORDER BY clause is invalid). It must look like:
DELETE FROM 'YiiLog' INDEXED BY logtime WHERE logtime < 1327783764;
SQLite reference:
http://www.sqlite.org/lang_delete.html
Attached images:
1) Where PDO returns failure.
2) The produced SQL and the error message.
3) The corrected delete command.
Thanks.
Dustin Oprea
39 hours ago
issue 3183
(CActiveRecord::model() - The constructor fails to instantiat...) Status changed by qiang.xue
- Check your Search class to see if it already has a method named 'search'. If so, PHP will treat it as constructor method.
Status: Invalid
Check your Search class to see if it already has a method named 'search'. If so, PHP will treat it as constructor method.
Status: Invalid
39 hours ago
issue 3185
(datetime type in postgresql migrations) reported by maciej.l...@gmail.com
- column types mapping for postgresql schema maps 'datetime' metadata to 'time' instead of 'timestamp';
This makes every table created by migration hold only time part while expected to hold both date and time.
What steps will reproduce the problem?
create migration which creates table:
$this->createTable( 'testTable', array( 'date_and_time'=>'datetime' ) );
run migrations and apply the new one to postgresql database.
What is the expected output? What do you see instead?
there should be a table with column capable to store date and time. Instead - the table has a column of type 'time'.
Proposed solution - change mapping for postgresql this way:
public $columnTypes=array(
'pk' => 'serial NOT NULL PRIMARY KEY',
'string' => 'character varying (255)',
'text' => 'text',
'integer' => 'integer',
'float' => 'double precision',
'decimal' => 'numeric',
/* below is modified mapping entry */
'datetime' => 'timestamp',
/* end of modyfications */
'timestamp' => 'timestamp',
'time' => 'time',
'date' => 'date',
'binary' => 'bytea',
'boolean' => 'boolean',
'money' => 'decimal(19,4)',
);
column types mapping for postgresql schema maps 'datetime' metadata to 'time' instead of 'timestamp';
This makes every table created by migration hold only time part while expected to hold both date and time.
What steps will reproduce the problem?
create migration which creates table:
$this->createTable( 'testTable', array( 'date_and_time'=>'datetime' ) );
run migrations and apply the new one to postgresql database.
What is the expected output? What do you see instead?
there should be a table with column capable to store date and time. Instead - the table has a column of type 'time'.
Proposed solution - change mapping for postgresql this way:
public $columnTypes=array(
'pk' => 'serial NOT NULL PRIMARY KEY',
'string' => 'character varying (255)',
'text' => 'text',
'integer' => 'integer',
'float' => 'double precision',
'decimal' => 'numeric',
/* below is modified mapping entry */
'datetime' => 'timestamp',
/* end of modyfications */
'timestamp' => 'timestamp',
'time' => 'time',
'date' => 'date',
'binary' => 'bytea',
'boolean' => 'boolean',
'money' => 'decimal(19,4)',
);
41 hours ago
issue 3184
(render problems ) reported by ket...@fastwebnet.it
- What steps will reproduce the problem?
1. i created a view with 2 variable $content1 and $content2
2. in $content1 there is a view with a grid
3. in $content2 there is simply an $echo 'YEAR='.$year;
4. as you can see in the action i render the both content.
5. attribute $model->data contain the year value once i filtered the grid in $content1 and i pass it to $content2
6. the render function works fine with $content1 because it update the table for each filter i apply, but $content2 is always static.
7. because the first time $model->data is null, this value is passed to $content2 but the render never shows it.
Can you help me to understand where is the mistake?
What is the expected output? What do you see instead?
$content2 should be YEAR=2012 or YEAR=2010 where '2012' or '2010' is the attribute in $model->data
What version of the product are you using? On what operating system?
i'm using yii 1.1.9 and operating system is Window 7 x32
Please provide any additional information below.
note that renderPartial works fine because right page is stored in $mov and $bank
but the render don't change $bank value.
What steps will reproduce the problem?
1. i created a view with 2 variable $content1 and $content2
2. in $content1 there is a view with a grid
3. in $content2 there is simply an $echo 'YEAR='.$year;
4. as you can see in the action i render the both content.
5. attribute $model->data contain the year value once i filtered the grid in $content1 and i pass it to $content2
6. the render function works fine with $content1 because it update the table for each filter i apply, but $content2 is always static.
7. because the first time $model->data is null, this value is passed to $content2 but the render never shows it.
Can you help me to understand where is the mistake?
What is the expected output? What do you see instead?
$content2 should be YEAR=2012 or YEAR=2010 where '2012' or '2010' is the attribute in $model->data
What version of the product are you using? On what operating system?
i'm using yii 1.1.9 and operating system is Window 7 x32
Please provide any additional information below.
note that renderPartial works fine because right page is stored in $mov and $bank
but the render don't change $bank value.
46 hours ago
issue 3183
(CActiveRecord::model() - The constructor fails to instantiat...) reported by enrico.v...@gmail.com
- 1. I have a Model Class called Search.
2. I'm trying to instantiate an object of this class through: $s = Search::model()->findAll();
3. following the flow in debug, the line 370 of CActiveRecord class, the line $model=self::$_models[$className]=new $className(null); , which should call the __ construct, attempts to invoke the search() function (in class Search).
- I'm using yii framework 1.1.7, on MacOSX.
- Not being a guru php5, the easiest way to solve this problem is to change the name of the model, unless you provide a better solution :)
Thanks.
1. I have a Model Class called Search.
2. I'm trying to instantiate an object of this class through: $s = Search::model()->findAll();
3. following the flow in debug, the line 370 of CActiveRecord class, the line $model=self::$_models[$className]=new $className(null); , which should call the __ construct, attempts to invoke the search() function (in class Search).
- I'm using yii framework 1.1.7, on MacOSX.
- Not being a guru php5, the easiest way to solve this problem is to change the name of the model, unless you provide a better solution :)
Thanks.
Last 7 days
Feb 10, 2012
issue 2774
(CDummyCache don't have a 'server' property) commented on by paystey...@gmail.com
- Why not have the dummy cache as the default in main.php, as it has no dependencies, then overwrite it with the cache configuration you want with the seperate config file? So memCache overrides dummy cache rather than the other way around.
Why not have the dummy cache as the default in main.php, as it has no dependencies, then overwrite it with the cache configuration you want with the seperate config file? So memCache overrides dummy cache rather than the other way around.
Feb 10, 2012
issue 3182
(Add new function getRealTableName) commented on by mr.miro...@gmail.com
- может вообще функцию quoteTableName() заменить на
PrepairTableName()
а в ней типо
public function PrepairTableName($table)
{
$table= $this->getRealTableName($table);
return $this->quoteSimpleTableName($table);
}
может вообще функцию quoteTableName() заменить на
PrepairTableName()
а в ней типо
public function PrepairTableName($table)
{
$table= $this->getRealTableName($table);
return $this->quoteSimpleTableName($table);
}
Feb 10, 2012
issue 3182
(Add new function getRealTableName) commented on by mr.miro...@gmail.com
- по факту эта функция должна применяется вместе с quoteTableName()
по факту эта функция должна применяется вместе с quoteTableName()
Feb 10, 2012
issue 3182
(Add new function getRealTableName) commented on by mr.miro...@gmail.com
- у себя сделал так
public function getTable($name,$refresh=false)
{
if($refresh===false && isset($this->_tables[$name]))
return $this->_tables[$name];
else
{
$realName = $this->getRealTableName($name);
и сама функция
public function getRealTableName($name = '')
{
if($this->_connection->tablePrefix!==null && strpos($name,'{{')!==false)
return preg_replace('/\{\{(.*?)\}\}/',$this->_connection->tablePrefix.'$1',$name);
else
return $name;
}
ее вызываю во всех функциях класса CDbSchema где это необходимо
теперь я могу абсолютно в любом запросе использовать плайсхолдеры
у себя сделал так
public function getTable($name,$refresh=false)
{
if($refresh===false && isset($this->_tables[$name]))
return $this->_tables[$name];
else
{
$realName = $this->getRealTableName($name);
и сама функция
public function getRealTableName($name = '')
{
if($this->_connection->tablePrefix!==null && strpos($name,'{{')!==false)
return preg_replace('/\{\{(.*?)\}\}/',$this->_connection->tablePrefix.'$1',$name);
else
return $name;
}
ее вызываю во всех функциях класса CDbSchema где это необходимо
теперь я могу абсолютно в любом запросе использовать плайсхолдеры
issue 3182
(Add new function getRealTableName) commented on by mr.miro...@gmail.com
- Следовательно через эту функцию прогнать все функции работы с таблицами
Следовательно через эту функцию прогнать все функции работы с таблицами
Feb 10, 2012
issue 3182
(Add new function getRealTableName) reported by mr.miro...@gmail.com
- Очень хотелось бы получить возможность задавать плайсхолдеры где угодно. Например тут
$this->addForeignKey('fk_userdevice_userid', '{{user_device}}', 'user', '{{user}}', 'id', 'CASCADE', 'RESTRICT');
вот одно из решений
add new function such
public function getRealTableName($name = '')
{
return preg_replace('/\{\{(.*?)\}\}/',$this->_connection->tablePrefix.'$1',$name);
}
and then
public function addForeignKey($name, $table, $columns, $refTable, $refColumns, $delete=null, $update=null)
{
$columns=preg_split('/\s*,\s*/',$columns,-1,PREG_SPLIT_NO_EMPTY);
$table = $this->getRealTableName($table);
$refTable = $this->getRealTableName($refTable);
foreach($columns as $i=>$col)
$columns[$i]=$this->quoteColumnName($col);
$refColumns=preg_split('/\s*,\s*/',$refColumns,-1,PREG_SPLIT_NO_EMPTY);
foreach($refColumns as $i=>$col)
$refColumns[$i]=$this->quoteColumnName($col);
$sql='ALTER TABLE '.$this->quoteTableName($table)
.' ADD CONSTRAINT '.$this->quoteColumnName($name)
.' FOREIGN KEY ('.implode(', ', $columns).')'
.' REFERENCES '.$this->quoteTableName($refTable)
.' ('.implode(', ', $refColumns).')';
if($delete!==null)
$sql.=' ON DELETE '.$delete;
if($update!==null)
$sql.=' ON UPDATE '.$update;
return $sql;
}
public function getTable($name,$refresh=false)
{
if($refresh===false && isset($this->_tables[$name]))
return $this->_tables[$name];
else
{
if($this->_connection->tablePrefix!==null && strpos($name,'{{')!==false)
$realName=$this->getRealTableName($name);
else
$realName=$name;
Очень хотелось бы получить возможность задавать плайсхолдеры где угодно. Например тут
$this->addForeignKey('fk_userdevice_userid', '{{user_device}}', 'user', '{{user}}', 'id', 'CASCADE', 'RESTRICT');
вот одно из решений
add new function such
public function getRealTableName($name = '')
{
return preg_replace('/\{\{(.*?)\}\}/',$this->_connection->tablePrefix.'$1',$name);
}
and then
public function addForeignKey($name, $table, $columns, $refTable, $refColumns, $delete=null, $update=null)
{
$columns=preg_split('/\s*,\s*/',$columns,-1,PREG_SPLIT_NO_EMPTY);
$table = $this->getRealTableName($table);
$refTable = $this->getRealTableName($refTable);
foreach($columns as $i=>$col)
$columns[$i]=$this->quoteColumnName($col);
$refColumns=preg_split('/\s*,\s*/',$refColumns,-1,PREG_SPLIT_NO_EMPTY);
foreach($refColumns as $i=>$col)
$refColumns[$i]=$this->quoteColumnName($col);
$sql='ALTER TABLE '.$this->quoteTableName($table)
.' ADD CONSTRAINT '.$this->quoteColumnName($name)
.' FOREIGN KEY ('.implode(', ', $columns).')'
.' REFERENCES '.$this->quoteTableName($refTable)
.' ('.implode(', ', $refColumns).')';
if($delete!==null)
$sql.=' ON DELETE '.$delete;
if($update!==null)
$sql.=' ON UPDATE '.$update;
return $sql;
}
public function getTable($name,$refresh=false)
{
if($refresh===false && isset($this->_tables[$name]))
return $this->_tables[$name];
else
{
if($this->_connection->tablePrefix!==null && strpos($name,'{{')!==false)
$realName=$this->getRealTableName($name);
else
$realName=$name;
Feb 10, 2012
issue 2774
(CDummyCache don't have a 'server' property) commented on by malcolm....@gmail.com
- I ran into the same issue. What was your solution? I'm hesitant to change the way we merge configs
I ran into the same issue. What was your solution? I'm hesitant to change the way we merge configs
issue 3173
(activeCheckBox click on checkbox but still marked as uncheck...) commented on by kashan.a...@gmail.com
- Is there a solution for this issue?
issue 3180
(jquery.yiiactiveform.js attribute argument on $.fn.yiiactive...) commented on by ari...@gmail.com
- i believe in the js file query.yiiactiveform.js line 110 in this code, when attaching change, blur and keyup
events, it passes "this" that refers to a form element and is passed to the validate function,
the validate function tries to get the settings properties such as validationDelay etc on the
form element, and these properties are undefined in the form element
$.each(settings.attributes, function () {
if (this.validateOnChange) {
$form.find('#' + this.inputID).change(function () {
validate(this);
}).blur(function () {
if (this.status !== 2 && this.status !== 3) {
validate(this);
}
});
}
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (this.value !== getAFValue($(this))) {
validate(this);
}
});
}
});
i believe in the js file query.yiiactiveform.js line 110 in this code, when attaching change, blur and keyup
events, it passes "this" that refers to a form element and is passed to the validate function,
the validate function tries to get the settings properties such as validationDelay etc on the
form element, and these properties are undefined in the form element
$.each(settings.attributes, function () {
if (this.validateOnChange) {
$form.find('#' + this.inputID).change(function () {
validate(this);
}).blur(function () {
if (this.status !== 2 && this.status !== 3) {
validate(this);
}
});
}
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (this.value !== getAFValue($(this))) {
validate(this);
}
});
}
});
Feb 10, 2012
issue 3180
(jquery.yiiactiveform.js attribute argument on $.fn.yiiactive...) commented on by ari...@gmail.com
- i believe in the js file query.yiiactiveform.js in this code, when attaching change, blur and keyup
events, it passes "this" that refers to a form element and is passed to the validate function,
the validate function tries to get the settings properties such as validationDelay etc on the
form element, and these properties are undefined in the form element
$.each(settings.attributes, function () {
if (this.validateOnChange) {
$form.find('#' + this.inputID).change(function () {
validate(this);
}).blur(function () {
if (this.status !== 2 && this.status !== 3) {
validate(this);
}
});
}
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (this.value !== getAFValue($(this))) {
validate(this);
}
});
}
});
i believe in the js file query.yiiactiveform.js in this code, when attaching change, blur and keyup
events, it passes "this" that refers to a form element and is passed to the validate function,
the validate function tries to get the settings properties such as validationDelay etc on the
form element, and these properties are undefined in the form element
$.each(settings.attributes, function () {
if (this.validateOnChange) {
$form.find('#' + this.inputID).change(function () {
validate(this);
}).blur(function () {
if (this.status !== 2 && this.status !== 3) {
validate(this);
}
});
}
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (this.value !== getAFValue($(this))) {
validate(this);
}
});
}
});
Feb 10, 2012
issue 3180
(jquery.yiiactiveform.js attribute argument on $.fn.yiiactive...) commented on by ari...@gmail.com
- i believe in the js file query.yiiactiveform.js in this code, when attaching change, blur and keyup
events, it passes "this" that refers to a form element and is passed to the validate function,
the validate function tries to get the settings properties such as validationDelay etc on the
form element which is undefined, so the settings doesn't effect the workflow
$.each(settings.attributes, function () {
if (this.validateOnChange) {
$form.find('#' + this.inputID).change(function () {
validate(this);
}).blur(function () {
if (this.status !== 2 && this.status !== 3) {
validate(this);
}
});
}
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (this.value !== getAFValue($(this))) {
validate(this);
}
});
}
});
i believe in the js file query.yiiactiveform.js in this code, when attaching change, blur and keyup
events, it passes "this" that refers to a form element and is passed to the validate function,
the validate function tries to get the settings properties such as validationDelay etc on the
form element which is undefined, so the settings doesn't effect the workflow
$.each(settings.attributes, function () {
if (this.validateOnChange) {
$form.find('#' + this.inputID).change(function () {
validate(this);
}).blur(function () {
if (this.status !== 2 && this.status !== 3) {
validate(this);
}
});
}
if (this.validateOnType) {
$form.find('#' + this.inputID).keyup(function () {
if (this.value !== getAFValue($(this))) {
validate(this);
}
});
}
});
issue 3181
(yii-blog-1.1.9.pdf typo) reported by joeycb...@gmail.com
- What steps will reproduce the problem?
1. Open yii-blog-1.1.9.pdf;
2. Goto page 24, under section 3.1.3 "Adding url Property"
3. Read last sentence in 3rd paragraph.
What is the expected output? What do you see instead?
The word "Beautifying URLs" with a link should appear before the period. Instead, I'm seeing a fragmented sentence.
What version of the product are you using? On what operating system?
Blog tutorial 1.1.9 on Debian wheezy with Document viewer 3.2.1
Please provide any additional information below.
What steps will reproduce the problem?
1. Open yii-blog-1.1.9.pdf;
2. Goto page 24, under section 3.1.3 "Adding url Property"
3. Read last sentence in 3rd paragraph.
What is the expected output? What do you see instead?
The word "Beautifying URLs" with a link should appear before the period. Instead, I'm seeing a fragmented sentence.
What version of the product are you using? On what operating system?
Blog tutorial 1.1.9 on Debian wheezy with Document viewer 3.2.1
Please provide any additional information below.
Feb 10, 2012
issue 3180
(jquery.yiiactiveform.js attribute argument on $.fn.yiiactive...) Owner changed by mdomba@gmail.com
- Can you explain a bit more... what is the use case when this is not working for you?
NOTE: The documentation for validationDelay specify that it's applied only to AJAX validation, this is used to reduce server loads (prevent too many AJAX calls)... and this option is set/used with the validateOnChange and/or validateOnType options.
Owner:
Can you explain a bit more... what is the use case when this is not working for you?
NOTE: The documentation for validationDelay specify that it's applied only to AJAX validation, this is used to reduce server loads (prevent too many AJAX calls)... and this option is set/used with the validateOnChange and/or validateOnType options.
Owner:
Feb 09, 2012
issue 3158
(Clearing db query cache) commented on by andsermail
- Cache must be cleaned exactly for this query:
'SELECT * FROM `table` WHERE id = :id LIMIT 1'
PS. I must use Yii::app()->cache->flush() for clean cache of this query now, but it's not good, because all cache will be cleaned.
Cache must be cleaned exactly for this query:
'SELECT * FROM `table` WHERE id = :id LIMIT 1'
PS. I must use Yii::app()->cache->flush() for clean cache of this query now, but it's not good, because all cache will be cleaned.
Feb 09, 2012
issue 2771
(Avoiding form submission on enter in a CGridView filter fiel...) commented on by s.simon...@ivideon.ru
- @rodolfo
You didn't understand, I was proposing a patch, not a function replacement. :)
Full function should look like this:
$(document).on('change keyup', inputSelector, function (event) {
if (event.type !== 'keyup' || event.keyCode !== 13) return;
var data = $(inputSelector).serialize();
if (settings.pageVar !== undefined) {
data += '&' + settings.pageVar + '=1';
}
$('#' + id).yiiGridView('update', {data: data});
});
@rodolfo
You didn't understand, I was proposing a patch, not a function replacement. :)
Full function should look like this:
$(document).on('change keyup', inputSelector, function (event) {
if (event.type !== 'keyup' || event.keyCode !== 13) return;
var data = $(inputSelector).serialize();
if (settings.pageVar !== undefined) {
data += '&' + settings.pageVar + '=1';
}
$('#' + id).yiiGridView('update', {data: data});
});
Feb 09, 2012
issue 3180
(jquery.yiiactiveform.js attribute argument on $.fn.yiiactive...) reported by ari...@gmail.com
- What steps will reproduce the problem?
1. set clientOptions example validationDelay on cactiveform and enable ajax and client validation
2. on javascript validation the validationDelay of the attribute is undefined and not delayed
What is the expected output? What do you see instead?
the clientOptions validationDelay works, but it doesnt because the setting is not passed with the attribute in validate function
What version of the product are you using? On what operating system?
1.1.9, mac os lion
Please provide any additional information below.
in jquery.yiiactiveform.js the attribute argument on $.fn.yiiactiveform validate method does not contain settings when called
What steps will reproduce the problem?
1. set clientOptions example validationDelay on cactiveform and enable ajax and client validation
2. on javascript validation the validationDelay of the attribute is undefined and not delayed
What is the expected output? What do you see instead?
the clientOptions validationDelay works, but it doesnt because the setting is not passed with the attribute in validate function
What version of the product are you using? On what operating system?
1.1.9, mac os lion
Please provide any additional information below.
in jquery.yiiactiveform.js the attribute argument on $.fn.yiiactiveform validate method does not contain settings when called