CGridView::updateSelector bug #1080

Closed
alxkolm opened this Issue Jul 31, 2012 · 5 comments

Comments

2 participants

alxkolm commented Jul 31, 2012

Tokens {page} and {sort} in CGridView::updateSelector not replaced with proper selectors.
They insert directly:

jQuery('#itemGrid').yiiGridView({'ajaxUpdate':['itemGrid'],'ajaxVar':'ajax','pagerClass':'pager','loadingClass':'grid-view-loading','filterClass':'filters','tableClass':'items','selectableRows':1,'enableHistory':false,'updateSelector':'{page}, {sort}','pageVar':'page'});
});

jQuery throw exception:

Uncaught Error: Syntax error, unrecognized expression: {page}
Member

mdomba commented Jul 31, 2012

This replacement happens on the client not on the server, so the above call is correct... did you clean the assets folder ?

mdomba was assigned Jul 31, 2012

alxkolm commented Jul 31, 2012

yes, but bug still

Member

mdomba commented Jul 31, 2012

https://github.com/yiisoft/yii/blob/master/framework/zii/widgets/assets/gridview/jquery.yiigridview.js#L76

This is the line that makes the replacement... check that you have this version in your assets folder

alxkolm commented Jul 31, 2012

sorry, there are old jquery.yiigridview.js

alxkolm commented Jul 31, 2012

thanks

alxkolm closed this Jul 31, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment