Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 30 12:19
    marcovtwout commented #4458
  • Sep 30 12:12
    marcovtwout milestoned #4484
  • Sep 30 12:10
    marcovtwout closed #4487
  • Sep 30 12:10
    marcovtwout commented #4487
  • Sep 30 11:31
    marcovtwout commented #4366
  • Sep 30 11:31
    marcovtwout commented #4366
  • Sep 30 10:45
    juslintek commented #4366
  • Sep 30 10:44
    juslintek commented #4366
  • Sep 30 10:42
    marcovtwout commented #4366
  • Sep 30 10:38
    marcovtwout demilestoned #4484
  • Sep 30 09:22
    marcovtwout commented #4484
  • Sep 30 09:04
    marcovtwout commented #4484
  • Sep 30 07:39
    marcovtwout closed #4480
  • Sep 30 07:39
    marcovtwout commented #4480
  • Sep 30 07:38
    marcovtwout closed #4469
  • Sep 30 07:35
    samdark milestoned #4484
  • Sep 30 07:35
    samdark labeled #4484
  • Sep 30 06:58
    jannis701 commented #4484
  • Sep 30 06:56
    jannis701 commented #4484
  • Sep 29 10:04
    marcovtwout commented #4484
Bulgakov Roman
@dikderoy

this error happens only on CentOS machines with any precompiled version of PHP5.5 & 5.6

while testing it - code falls on CentOS and works fine on Ubuntu LTS 14.04

Iterator here is an actually native PHP Iterator interface which is used by yii component
but somehow PHP makes a mistake while resolving namespaces....
Alexander Makarov
@samdark
xicond
@xicond
How to make all attributes rule, bydefault setAs safe on model form ?
Bulgakov Roman
@dikderoy
@xicond override a rules() callback with such behavior perhaps?)
xicond
@xicond
Is that
Is that the layout used by current yiiframework.ru?
Alexander Makarov
@samdark
no
Doroftey Alexandr
@stixlink
Всем привет!
почему код Yii::app()->assetManager->publish( Yii::getPathOfAlias('ext.js')).'/main.js' на дев сервере возвращает путь assets/5f285af/main.js а на боевом /assets/5f285af/main.js ?
то есть на локальном не подключится скрипт если урл будет site.com/blabla/bla
sorry, wrong chat
ajithfort
@ajithfort
hi
Can i close a modal with jquery?
When i tried i am getting a TypeError: $(…).modal is not a function ERROR
xicond
@xicond
What's modal u use ? Is it from jqueryui ? Is jqueryui loaded? Since u didn't use zii, u need to call for loader jqueryui on yii
ajithfort
@ajithfort
@xicond i found out the error. It was due to the order in which js files have been loading
xicond
@xicond

if I have

'urlManager' => array(
  'rules' => array(
‘form/<gender:(male|female)>' => ’site/form’,
‘contact’ => ‘site/form’,
…
)),

I wanna $_GET[‘gender’] auto transform tobe man|woman, How is it?
I wanna $this->createUrl(‘site/form’,[‘gender’=>’other']); to result "contact?gender=other" since other not in regex (male|female), How is it ?

Rohit Suthar
@rohitsuthar
hello..
xicond
@xicond
How to know weather the urlRule exist ?
ajithfort
@ajithfort
hi how can i use order by field in yii1?
$first_array = Yii::app()->db->createCommand()
->select('*')
->from('form_fields')
->where(array('not in', 'id', $sorted_array))
->andWhere('form_id=:form_id', array(':form_id'=>$form_id))
->orderByField()
->queryAll();
when i try like this i get an error like this CDbCommand and its behaviors do not have a method or closure named "orderByField".
Alex
@Alex-Bond
->orderBy('id')
try this
$query->orderBy([
'id' => SORT_ASC,
'name' => SORT_DESC,
]);
let me check that github link :-)
Alex
@Alex-Bond
$query->orderBy([
'id' => SORT_ASC,
'name' => SORT_DESC,
]);
i copy it from oficial docs
ajithfort
@ajithfort
i tried like this $first_array = Yii::app()->db->createCommand()
->select('*')
->from('form_fields')
->where(array('not in', 'id', $sorted_array))
->andWhere('form_id=:form_id', array(':form_id'=>$form_id))
->orderBy(['id' => SORT_ASC,'name' => SORT_DESC,])
->queryAll();
and i got this error CDbCommand and its behaviors do not have a method or closure named "orderBy".
:worried:
Alex
@Alex-Bond
try just order
ajithfort
@ajithfort
ok its working partially just some command error
CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column '4' in 'order clause'. The SQL statement executed was: SELECT *
FROM form_fields
WHERE (id NOT IN ('3', '1', '6')) AND (form_id=:form_id)
ORDER BY 4, 3
i will make it work hopefully :smile:
Alex
@Alex-Bond
dont tell id of column in order
tell hit full name of columns
him*
ajithfort
@ajithfort
just got my sql query working SELECT * FROM form_fields
WHERE id IN ("3","1","6")
ORDER BY FIELD (id, "3","1","6")
:sparkles:
xicond
@xicond

use ->order() then

$first_array = Yii::app()->db->createCommand()
->select('*')
->from('form_fields')
->where(array('not in', 'id', $sorted_array))
->andWhere('form_id=:form_id', array(':form_id'=>$form_id))
->order(['id' => SORT_ASC,'name' => SORT_DESC,])
->queryAll();

shzaur
@shzaur
This message was deleted
xicond
@xicond
why getPathInfo and createUrl remove ended slash , How to keep it ?
xicond
@xicond
I've got figure it out by urlSuffix