We tagged this version as 0.2.0 since we still consider this plugin as beta version (but usable on production) but the big news is the support of symfony 1.4! For this specific support I must thank you 2 people that submited 2 patches to make this compatibility possible. Thanks to ( jtexier , "merci Jerome ;-)") and dalexandre and of course I must named jeremyb for his dedication to the project, he did most of the latest development.
I also setup a live demo to allow you to play a little bit with the plugin. It is currently basic but we will add more stuff step by step.
What's new:
- Theme switcher integrated
- user interface fixes and enhancements
- Symfony 1.4 compatibility
You can have some more details on my previous post.
The plugin is available as usual on github, I published as well the packaged plugin on symfony website.
Looks great, thank you!
ReplyDeletegreat. in the demo installation if you try to batch delete things it leads to an error page. i suspect this is due to a bug vs csrf handling in symfony 1.3/1.4 (it's the same bug i had with previous versions and i don't know how to fix it)
ReplyDeleteIt looks great but ... do you think that "hidding" the filters in a button/dialog box is a good idea ?
ReplyDeleteCould be very confusing if you've forgotten that a filter was set (you can't see that a filter is set without clicking on the filter button ?)
Hi,
ReplyDeleteI've ever seen this plugin with the previous version and I really like the new one.
On problem stay for me : if Javascript is inactive, you loose filters and actions for example and the tabs in new/edit action.
I work with the accessibility notion and for me, it's really an issue.
Do you have planed this ?
Hello
ReplyDeletethis is a nice plugin, unfortunately I had tried to reach Gerald before for some questions and he should be pretty busy, there is a small bug on the batch actions as described before ... here is the solution:
you should change the partial :
plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/template/templates/_list_batch_actions.php
line: 9 from:
[?php $form = new sfForm(); if ($form->isCSRFProtected()): ?]
to:
[?php $form = new BaseForm(); if ($form->isCSRFProtected()): ?]
Hope this help for anybody using this great plugin
Regards
Adrian
great, i've applied the patch and it works IF you make another little modification in plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/parts/batchAction.php change
ReplyDelete$validator = new sfValidatorDoctrineChoice(array( 'model' => 'getModelClass() ?>'));
to
$validator = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'getModelClass() ?>'));
@gunzip: thanks for the bug report, I will look at it. I did not test this feature, maybe there are some changes with sf1.3/1.4. @edsadr gave the solution, I will commit a new version later....oups I did not see your last comment, great you fix it! I will put everything on github later today.
ReplyDelete@vjousse: we did not like the idea to have filters always visible, what you focus on is the list. Our plan is actually to put a flag or something on the filter button when there are filters used. We have not yet done this.
@anonymous: yes accessibility is also a concern for us but we have not yet look at it in details. Hopefully we can fix this issue too. Thanks to push us in that way.
Very nice plugin. However, you should remove all the .DS_Store hidden files that are a pain for non mac users.
ReplyDeleteMany thanks for this plugin, really really Great!
ReplyDeleteinput tag page is not ready ? I make some changes to do that in plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/parts/batchAction.php:
After checkCRSFPritection in executeBatch()and before checks ids tab :
if($request->getParameter('page') != $this->getPage())
{
$this->setPage($request->getParameter('page'));
$this->redirect('@getUrlForAction('list') ?>');
}
Is the right way or i missed something ?
Geoff
The batch action do not run
ReplyDeleteSQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
and it do no run in the live demo too.
Someone can help me please.
(sorry for my english)
@geoff well done, but I've done some corrections, now working for me:
ReplyDeleteif($request->getParameter('page') != $this->getPage())
{
$this->setPage($request->getParameter('page'));
$this->redirect('@getUrlForAction('list') ?>');
}
@mods delete the above post, as it was wrong copy&pasted
ReplyDelete@geoff well done, but I've done some corrections, now working for me:
if($request->getParameter('page') != $this->getPage())
{
$this->setPage($request->getParameter('page'));
$this->redirect('@getUrlForAction('list') ?>');
}
Seems like echo and $this are not beeing there, are cut out!
ReplyDeleteThere is a Problem with "ech.o" and "$.this"
ReplyDeleteokay someone delete all my posts, thx
ReplyDeletefix for the pager (when self typing in the pages):
ReplyDeletein: batchAction.php
if($request->getParameter('page') != $this->getPage())
{
$page_my = $request->getParameter('page');
// page request is bigger then pages available, go to last page
// go to first, on other extreme
if ($this->getPager()->getLastPage() < $page_my)
$page_my = $this->getPager()->getLastPage();
else if ($this->getPager()->getFirstPage() > $page_my)
$page_my = $this->getPager()->getFirstPage();
$this->setPage($page_my);
$this->redirect('@getUrlForAction('list') ?>');
}
>>> thomas said...
ReplyDeleteThe batch action do not run
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
and it do no run in the live demo too.
=======
I hate to bring this up, too, but it doesn't work for me, either. If I switch to the ugly 'admin' plugin in 1.4 Doctrine it works fine. I am pulling my hair out a bit and I can see the query being triggered by sfValidatorDoctrineChoice.
When I comment this code in batchAction, it works (but I obviously lose the functionality). Maybe you can advise?
This is the code I comment:
$validator = new sfValidatorDoctrineChoice(array('model' => 'getModelClass() ?>'));
try
{
// validate ids
$ids = $validator->clean($ids);
// execute batch
$this->$method($request);
}
catch (sfValidatorError $e)
{
$this->getUser()->setFlash('error', 'A problem occurs when deleting the selected items as some items do not exist anymore.');
}
Ok, I found it. The batch action bug is in batchAction.php.
ReplyDeleteChange line 29 to read:
$validator = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => 'getModelClass() ?>'));
(Add 'multiple' => true)
Maybe a dumb question: The Theme doesn't looku quit elike that in the demo tith a default install. Is the demo highly customized (UI icons, pager icons, etc.) or is it a newer version?
ReplyDelete@Rolf Ernst:
ReplyDeleteGreat!! You save my afternoon.
Thx :)
is there any way to enable it across all admin modules? including the sfGuard ones.
ReplyDeleteHi, that plugin is very nice, but i have a little problem. the plugin works fine with all admin module automatic generates, but with sfDoctrineGuard, in sfGuardUser when i click reset in filters window, i have a routing error:
ReplyDeleteAction "guard/users" does not exist.
If you cant see the error and answer me, i'll thank you.
[Sorry for the bad English redacted]
ReplyDeleteChanges paging I got in the comments resulted in problems in batchDelete because there was not checked if the page parameter, and always redirected to the list.
Following is the changed code working:
if($request->hasParameter('page') && $request->getParameter('page') != $this->getPage())
{
$page_my = $request->getParameter('page');
// page request is bigger then pages available, go to last page
// go to first, on other extreme
if ($this->getPager()->getLastPage() < $page_my)
$page_my = $this->getPager()->getLastPage();
else if ($this->getPager()->getFirstPage() > $page_my)
$page_my = $this->getPager()->getFirstPage();
$this->setPage($page_my);
$this->redirect('@getUrlForAction('list') ?>');
}
Not sure about the various versions for the pager but I am running 1.4 and while the above example is correct (mostly) the redirect must look like this:
ReplyDelete$this->redirect('@getUrlForAction('list') ?>');
(Just pick the same redirect code as for the id redirect.)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ReplyDeleteWARNING: Wordpress apparently strings out part of the string (i.e. it doesn't include the php part.) So my solution also looks wrong.
Just pick the redirect from a few lines below. If has the string php and echo in it (I cannot post it here since the comments strip it for security, I guess).
I'd wrap your pager fix, also:
ReplyDeleteif ($request->hasParameter('page')) {
// pager fix here..
}
Or you may be wondering what happened to your batch actions for four days, crawling the web wondering why nobody seems to have this problem EXCEPT YOU.
Merry xmas!
After installing the plugin and setting the theme to "jroller", I get this:
ReplyDeleteFatal error: Class 'BaseIncentivesGeneratorConfiguration' not found in /data/work_area/shayr/redchurch/apps/backend/modules/incentives/lib/incentivesGeneratorConfiguration.class.php on line 12
Anyone know what's going on? I've posted on several boards and heard nothing... Help!