Search Results

Search found 6564 results on 263 pages for 'symfony forms'.

Page 10/263 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Symfony/Propel NestedSet left/right ID corruption/adjustment

    - by Mike Crowe
    Hi folks, I have a nested set application that seems to be getting corrupted. Here's what I'm seeing: We're using nested sets for a binary tree (any node can have 2 children). It appears to be working fine, but some event causes a discrepancy. For instance, when I do a getNumberOfDescendants() for the root node, it will slowly increase as this event happens. However, displaying the tree works fine, as does inserting (apparently). Has anybody seen anything like this before? For instance, my repair program shows this as the repairs that it makes: User pxxxxx left 0=>0, right 145=>129 User axxxxx left 1=>1, right 124=>106 User mxxxxx left 119=>117, right 120=>118 User fxxxxx left 125=>107, right 144=>128 User fxxxxx left 126=>108, right 131=>113 User rxxxxx left 127=>109, right 128=>110 User mxxxxx left 129=>111, right 130=>112 User mxxxxx left 132=>114, right 143=>127 User cxxxxx left 133=>115, right 142=>126 User gxxxxx left 134=>116, right 137=>121 User mxxxxx left 135=>119, right 136=>120 User jxxxxx left 138=>122, right 141=>125 User axxxxx left 139=>123, right 140=>124 I thought at first it was when I deleted a user, but it has since occurred w/o that event. Anybody know of a cause that might generate this? I've tested ad nauseum on my local machine, but I can't duplicate it. I do have an issue where my production box is PHP 5.2.0, whereas my test device is 5.2.10. Could that be an issue? TIA Mike

    Read the article

  • Join query in doctrine symfony

    - by THOmas
    I have two tables userdetails and blog question The schema is UserDetails: connection: doctrine tableName: user_details columns: id: type: integer(8) fixed: false name: type: string(255) fixed: false BlogQuestion: connection: doctrine tableName: blog_question columns: question_id: type: integer(8) fixed: false unsigned: false primary: true autoincrement: true blog_id: type: integer(8) fixed: false user_id: type: integer(8) fixed: false question_title: type: string(255) I am using one join query for retrieving all the questions and user details from this two tables My join query is $q = Doctrine_Query::create() ->select('*') ->from('BlogQuestion u') ->leftJoin('u.UserDetails p'); $q->execute(); But it is showing this error Unknown relation alias UserDetails Pls anybody help me Thanks in advance

    Read the article

  • Question about the code of the backend of symfony

    - by user248959
    Hi, this is the index action and template generated at the backend for the model "coche". public function executeIndex(sfWebRequest $request) { // sorting if ($request->getParameter('sort') && $this->isValidSortColumn($request->getParameter('sort'))) { $this->setSort(array($request->getParameter('sort'), $request->getParameter('sort_type'))); } // pager if ($request->getParameter('page')) { $this->setPage($request->getParameter('page')); } $this->pager = $this->getPager(); $this->sort = $this->getSort(); } This is the index template: <?php use_helper('I18N', 'Date') ?> <?php include_partial('coche/assets') ?> <div id="sf_admin_container"> <h1><?php echo __('Coche List', array(), 'messages') ?></h1> <?php include_partial('coche/flashes') ?> <div id="sf_admin_header"> <?php include_partial('coche/list_header', array('pager' => $pager)) ?> </div> <div id="sf_admin_bar"> <?php include_partial('coche/filters', array('form' => $filters, 'configuration' => $configuration)) ?> </div> <div id="sf_admin_content"> <form action="<?php echo url_for('coche_coche_collection', array('action' => 'batch')) ?>" method="post"> <?php include_partial('coche/list', array('pager' => $pager, 'sort' => $sort, 'helper' => $helper)) ?> <ul class="sf_admin_actions"> <?php include_partial('coche/list_batch_actions', array('helper' => $helper)) ?> <?php include_partial('coche/list_actions', array('helper' => $helper)) ?> </ul> </form> </div> <div id="sf_admin_footer"> <?php include_partial('coche/list_footer', array('pager' => $pager)) ?> </div> </div> In the template there is this line: include_partial('coche/filters', array('form' => $filters, 'configuration' => $configuration)) ?> but i can not find the variables $this-filters and $this-configuration in the index action. How is that possible? Javi

    Read the article

  • Retrieving related data in the Symfony Admin Generator

    - by bjoern
    I have a problem with the Admin Generator. The Table of Pages have the column sf_guard_user_id. The rest of the table looks as this part of the generator.yml in the line display, list: title: Pages display: [=title, sfGuardUser, views, state, privacy, created_at, updated_at] sort: [created_at, desc] fields: sfGuardUser: { label: Author } created_at: { label: Published, date_format: dd.MM.y } updated_at: { label: Updated, date_format: dd.MM.y } table_method: retrieveUserList Now the sf_guard_user_id is been replaced and the username ist displayed. Don't get me wrong, that works fine. But how can I get other variables from the sfGuarsUser relation? When I only add salt or another variable to display I get this, Unknown record property / related component "salt" on "simplePage" But why?

    Read the article

  • Symfony fk issue on insertion

    - by Daniel Hertz
    Hi, I posted a similar problem but it could not be resolved. I create a relational database of users and groups but for some reason I cannot insert test data with fixtures properly. Here is a sample of the schema: User: actAs: { Timestampable: ~ } columns: name: { type: string(255), notnull: true } email: { type: string(255), notnull: true, unique: true } nickname: { type: string(255), unique: true } password: { type: string(300), notnull: true } image: { type: string(255) } Group: actAs: { Timestampable: ~ } columns: name: { type: string(500), notnull: true } image: { type: string(255) } type: { type: string(255), notnull: true } created_by_id: { type: integer } relations: User: { onDelete: SET NULL, class: User, local: created_by_id, foreign: id, foreignAlias: groups_created } FanOf: actAs: { Timestampable: ~ } columns: user_id: { type: integer, primary: true } group_id: { type: integer, primary: true } relations: User: { onDelete: CASCADE, local: user_id, foreign: id, foreignAlias: fanhood } Group: { onDelete: CASCADE, local: group_id, foreign: id, foreignAlias: fanhood } And this is the data i try to input: User: user1: name: Danny email: [email protected] nickname: danny password: f05050400c5e586fa6629ef497be Group: group1: name: Mets type: sports FanOf: fans1: user_id: user1 group_id: group1 I keep getting this error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`krowdd`.`fan_of`, CONSTRAINT `fan_of_user_id_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE) The users and groups are clearly being created before the "fanhood" is so why am I getting this error?? Thanks!

    Read the article

  • Symfony routing with an API Web Service

    - by fesja
    Hi, I'm finishing the API of our web service. Now I'm thinking on how to make the route changes, so if we decide to make a new version we don't break the first API. right now: url: /api/:action param: { module: api, action: :action } requirements: sf_format: (?:xml|json) what i've thought: url: /api/v1/:module/:action param: { module: api1, action: :action } requirements: sf_format: (?:xml|json) url: /api/v2/:module/:action param: { module: api2, action: :action } requirements: sf_format: (?:xml|json) That's easy, but the perfect solution would be to have the following kind of route # Automatically redirects to one module or another url: /api/v:version/:module/:action param: { module: api:version, action: :action } requirements: sf_format: (?:xml|json) any ideas on how to do it? what do you recommend us to do? thanks!

    Read the article

  • Symfony + JQueryUI Tabs navigation menu question

    - by Andy Poquette
    I'm trying to use the tabs purely as a navigational menu, loading my pages in the tabs, but being able to bookmark said tabs, and have the address bar correspond with the action I'm executing. So here is my simple nav partial: <div id='tabs'> <ul> <li id='home'><a href="<?php echo url_for('post/index') ?>" title="Home">Home</a></li> <li id='test'><a href="<?php echo url_for('post/test') ?>" title="Test">Test</a></li> </ul> </div> And the simple tabs intializer: $(document).ready(function() { $('#tabs').tabs({spinner: '' }); }); My layout just displays $sf_content. I want to display the content for the action I'm executing (currently home or test) in the tab, via ajax, and have the tab be bookmarkable. I've googled this like 4000 times and I can't find an example of what I'm trying to do. If anyone has a resource they know of, I can look it up, or if you can help, I would greatly appreciate it. Thank you in advance.

    Read the article

  • Symfony/Doctrine: Unserialize in action vs template

    - by Tom
    Hi, Can anyone tell me why calling "unserialize" works fine in an action but gives an offset error in a template? It's basically possible to unserialize a database text result into a variable in an action and pass it to template, in which case it displays fine: $this->clean = unserialize($this->raw); <?php echo $clean ?> But not if called directly in a template: <?php echo unserialize($raw) ?> Would be interested in knowing why this is so and whether there's some workaround. Thanks.

    Read the article

  • Symfony sfDoctrinePager with multiple tables

    - by Zoja
    I was wondering how to get this to run. In my application I have a Category table and Product table. I need to have a pager which combines both Categories and Products for display in one list (first categories then products). Is there a way to get this going ? I tried left joining in the pager's query, but doesn't seem to do the trick.

    Read the article

  • Overriding Doctrine_Record (sfDoctrineRecord) instance methods in Doctrine PHP Symfony

    - by notbrain
    My background is in Propel, so I was hoping it would be a simple thing to override a magical getter in a Doctrine_Record (sfDoctrineRecord), but I'm getting either a Segfault or the override method is simply ignored in favor of the one in the superclass. https://gist.github.com/697008eaf4d7b606286a class FaqCategory extends BaseFaqCategory { public function __toString() { return $this->getCategory(); } // doesn't work // override getDisplayName to fall back to category name if getDisplayName doesn't exist public function getDisplayName() { // also tried parent::getDisplayName() but got segfault(!) if(isset($this->display_name)) { $display_name = $this->display_name; } else { $display_name = $this->category; } return $display_name; } } What is the proper Doctrine way to extend/override methods on an instance of Doctrine_Record (via sfDoctrineRecord extends Doctrine_Record)? This has to be doable...or should I be looking at the Template documentation? Thanks, Brian

    Read the article

  • Symfony custom route works with frontend_dev.php but not with index.php

    - by dazhall
    Am I missing something or should my custom route work with the index.php (or nothing) instead of frontend_dev.php? I'm getting a 500 error when I go to the model, and a 404 for the show page. My route is: project_show: url: /project/:slug class: sfDoctrineRoute options: { model: Project, type: object } param: { module: project, action: show } Any help would be much appreciated! Thanks! Darren.

    Read the article

  • Modify action names for route collections in Symfony?

    - by James Skidmore
    When creating an sfPropelRouteCollection, how can I edit the action names that the collection will generate? For example: # Routing for "product" CRUD product: class: sfPropelRouteCollection options: model: Product module: product actions: [new, create, edit, update, delete] How can I change the actual action that is called for any of the new/create/edit/update/delete methods? I'd like for them to call "ajaxNew," "ajaxCreate," etc. so the URL would look something like "product/ajaxNew", or the action for "update" would be "ajaxUpdate". Let me know if I need to clarify further. Thanks.

    Read the article

  • [symfony] sfGuardDoctrine plugin and form messages

    - by David
    I'm using the sfGuardDoctrine plugin, and I would like to customize the form validation messages. How could I acomplish this? I can't find anything in the documentation. The only way I have found is to copy sfGuardValidatorUser.class into /apps/frontend/lib/validator, but I would like to know if there is some way to just override the error message, not override the entire validator...

    Read the article

  • Symfony debug toolbar working intermittently

    - by Stick it to THE MAN
    I am using SF 1.3.2 with Propel ORM on Ubuntu 9.10 Recently, my debug toolbar has been working intermittently, sometimes, for no apparent reason, clicking it does not display/hide the debugging windows, forcing me to resort to looking directly at the log files. AFAIK, nothing has changed on my machine. Is this a know bug, are there work arounds/fix for this?

    Read the article

  • Couldn't get last insert identifier symfony sql server through ODBC

    - by JaSk
    Im getting that error every time I try to add a new set of data to my sql server 2008 database. I'm running windows 7 on my development machine. my current config is: all: doctrine: class: sfDoctrineDatabase param: dsn: 'odbc:Driver={SQL Server Native Client 10.0};Server=localhost;database=jobeet;' username: sa password: **** thanks to every one.

    Read the article

  • Doctrine/symfony: getSqlQuery() output in phpMyAdmin/SQL tab

    - by user248959
    Hi, i have created this query that works OK: $q1 = Doctrine_Query::create() ->from('Usuario u') ->leftJoin('u.AmigoUsuario a ON u.id = a.user2_id OR u.id = a.user1_id') ->where("a.user2_id = ? OR a.user1_id = ?", array($id,$id)) ->andWhere("u.id <> ?", $id) ->andWhere("a.estado LIKE ?", 1); echo $q1->getSqlQuery(); The calling to getSqlQuery outputs this clause: SELECT s.id AS s_id, s.username AS s_username, s.algorithm AS s_algorithm, s.salt AS s_salt, s.password AS s__password, s.is_active AS s__is_active, s.is_super_admin AS s__is_super_admin, s.last_login AS s__last_login, s.email_address AS s__email_address, s.nombre_apellidos AS s__nombre_apellidos, s.sexo AS s__sexo, s.fecha_nac AS s__fecha_nac, s.provincia AS s_provincia, s.localidad AS s_localidad, s.fotografia AS s_fotografia, s.avatar AS s_avatar, s.avatar_mensajes AS s__avatar_mensajes, s.created_at AS s__created_at, s.updated_at AS s__updated_at, a.id AS a__id, a.user1_id AS a__user1_id, a.user2_id AS a__user2_id, a.estado AS a__estado FROM sf_guard_user s LEFT JOIN amigo_usuario a ON ((s.id = a.user2_id OR s.id = a.user1_id)) WHERE ((a.user2_id = ? OR a.user1_id = ?) AND s.id < ? AND a.estado LIKE ?) If i take that clause to phpmyadmin SQL tab i get this error 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? OR a.user1_id = ?) AND s.id < ? AND a.estado LIKE ?) LIMIT 0, 30' at line 1 Why i'm getting this error? Regards Javi

    Read the article

  • Data-separation in a Symfony Multi-tenant app using Doctrine

    - by Prasad
    I am trying to implement a multi-tenant application, that is - data of all clients in a single database - each shared table has a tenant_id field to separate data I wish to achieve data separation by adding where('tenant_id = ', $user->getTenantID()) {pseudoc-code} to all SELECT queries I could not find any solution up-front, but here are possible approaches I am considering. 1) crude approach: customizing all fetchAll and fetchOne functions in every class (I will go mad!) 2) using listeners: possibly coding for the preDqlSelect event and adding the 'where' to all queries 3) override buildQuery(): could not find an example of this for front-end 4) implement contentformfilter: again need a pointer Would appreciate if someone could validate these & comment on efficieny, suitability. Also, if anyone has achieved multitenancy using another strategy, pl share. Thanks

    Read the article

  • Can default Symfony form-save actions be used to post data via AJAX?

    - by Prasad
    I was playing around with Symfony, jQuery, jqGrid & AJAX. For each new post submission, I am doing the foll: adding a routing entry in routing.yml defining a new action in the Actions file for the module. THis reads params, assigns values & saves the object As in the case of jqGrid, the 'Add Row' form is not a Symfony form. Is there a way to fool Symfony and post data to the executeCreate action to store a new entry. If not, does Symfony provide a way to quickly generate web services for AJAX requests for each of the modules? Is this a sensible feature? What I am going to have to do other-wise, is to create routing create a new Action get all parameters instantiate object assign values & save Any help in doing this faster will be appreciated. Thanks in advance

    Read the article

  • What is the best IDE to use with the Symfony framework?

    - by Failpunk
    I'm looking for an IDE with use with the Symfony Framework. I have a bit of experience using the NetBeans 6.5 IDE but it does not always seem to complete the class methods, plus it doesn't seem to have any PHP code snippets built in. Here are the features I would ideally like to have, in order of importance, from an IDE: Code completion of all the Symfony and Propel class methods (I can never remember them) Code templates,(class skeletons, HTML structures, Symfony templates?) Straight-forward code debugging Source Control

    Read the article

  • Model-layer validation in Doctrine, Symfony

    - by Andree
    Hi there, I have a schema.yml containing something similiar to the following: Character: tableName: characters actAs: { Timestampable: ~ } columns: id: { type: integer(4), primary: true, autoincrement: true } name: { type: string(255), notnull: true, notblank: true, minlength: 3 } I define the minlength of the column name to be 3. I created a unit test to test the minlength validation, and I found out that the validation is not working. $character = new Character(); $character->set('name', 'Dw'); $t->ok(! $character->isValid()); # This test failed Can someone tell me what might be the problem here? Thanks, Andree

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >