I am getting the same error with a similar setup, albeit using Propel. Here is a proposed fix from a couple years ago that did not work for me: http://trac.symfony-project.org/ticket/5851
Hopefully it works for you and hopefully someone knows a fix for me! On Jan 23, 7:45 pm, bertzzie <[email protected]> wrote: > Hi, > I'm using Symfony 1.4.8 and get some strange behaviour in the Admin > Generator. > I want to use custom object_action in the generator, so I add it like > this in my generator.yml: > > <pre> > list: > title: List of Books > display: [userID, returnTime, created_at] > layout: stacked > params: %%sfGuardUser%% borrows %%borrowedBooks%%. <br> > Return Time: %%returnTime%% > table_method: getLibraryData > max_per_page: 15 > object_actions: > _edit: ~ > _delete: ~ > return: { label: Return Book, action: listReturn } > actions: > _new: { label: Borrow Book } > </pre> > > And here's the routing.yml generated by the Admin Generator: > > <pre> > borrow_header: > class: sfDoctrineRouteCollection > options: > model: borrowHeader > module: borrow > prefix_path: /borrow > column: borrowID > with_wildcard_routes: true > </pre> > > The schema: > <pre> > book: > tableName: book > options: > type: InnoDB > columns: > bookID: > type: integer > primary: true > autoincrement: true > bookTitle: > type: string(255) > price: > type: decimal > stock: > type: integer > ISBN: > type: string(13) > publisher: > type: string(255) > author: > type: string(255) > borrowed: > type: boolean > relations: > borrowHeader: > class: borrowHeader > local: bookID > foreign: borrowID > refClass: borrowDetail > > borrowHeader: > tableName: borrowHeader > options: > type: InnoDB > actAs: [Timestampable] > columns: > borrowID: > type: integer > primary: true > autoincrement: true > userID: > type: integer > lastReturnTime: > type: timestamp > relations: > sfGuardUser: > local: userID > foreign: id > buku: > class: book > local: borrowID > foreign: bookID > refClass: borrowDetail > > borrowDetail: > tableName: borrowDetail > options: > type: InnoDB > actAs: > Timestampable: > created: > name: returnTime > type: timestamp > updated: > name: returnTime > type: timestamp > columns: > borrowID: > type: integer > primary: true > bookID: > type: integer > primary: true > fine: > type: decimal > bookLost: > type: boolean > relations: > peminjamanHeader: > local: borrowID > foreign: borrowID > buku: > local: bookID > foreign: bookID > </pre> > > When I added the object_action, it generates route using this format: > <pre>/module/listReturn/action?borrow_id=1</pre>, not the expected > <pre>/module/1/listReturn</pre>. I've been googling for a while, and > found > this:http://oldforum.symfony-project.org/index.php/m/91713/?srch=generator..., > but I think it's an old bug that should've fixed. So, what am I doing > it wrong here? > > Thanks before. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
