From pierre.rineau at makina-corpus.com Sun May 3 12:17:48 2009 From: pierre.rineau at makina-corpus.com (Pierre Rineau) Date: Sun, 03 May 2009 14:17:48 +0200 Subject: [development] Custom module, do you think I should add it to cvs.drupal.org ? In-Reply-To: <1241123552.2153.10.camel@blaster> References: <088e01c9c9d0$63ee6c40$0200a8c0@structworks.com> <1241123552.2153.10.camel@blaster> Message-ID: <1241353068.28758.0.camel@blaster> And I did some patches, look at your issue queue. This module is great, keep going! On Thu, 2009-04-30 at 22:32 +0200, Pierre Rineau wrote: > Nice! I did not found it because I was looking for D6 module. If you > don't have a working D6 version and you want a port, private mail me, > I'll do it. > > Thanks. > > On Thu, 2009-04-30 at 22:15 +0200, Daniel F. Kudwien wrote: > > I'll happily review your patches for http://drupal.org/project/compact_forms > > > > sun > > > > > -----Original Message----- > > > From: development-bounces at drupal.org > > > [mailto:development-bounces at drupal.org] On Behalf Of Pierre Rineau > > > Sent: Thursday, April 30, 2009 10:02 PM > > > To: development at drupal.org > > > Subject: Re: [development] Custom module, do you think I > > > should add it to cvs.drupal.org ? > > > > > > In fact, empty text in form inputs is a really common > > > feature! But it won't be useful if there is no advertisement > > > and if no people use it. > > > > > > In my company, for each project, we have to write manually > > > the snippet, maybe for other people it wont help, but here, > > > we are really going to use it. > > > > > > What I'm really looking for commiting it, is the community to > > > help to get some more cool features and more configurability > > > around this stuff. > > > > > > If anyone seems interested to help me evolving such module, > > > tell me, and I will commit it, else I won't. > > > > > > Pierre. > > > > > > From enboig at gmail.com Mon May 4 09:01:24 2009 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Mon, 4 May 2009 11:01:24 +0200 Subject: [development] views2: how to add "link to node" in custom filed Message-ID: <45a29f450905040201o695cbcd8wac30211c2e1a65e5@mail.gmail.com> I have created a custom node and now I am addint "views support" to it. I have a custom field which should be a link to the full node; I added: $data['node_cc_projects']['long_name'] = array( 'title' => "long name", //trans 'help' => 'long name of the node.', //trans 'field' => array( 'field' => 'long_name', 'handler' => 'views_handler_field_node', 'click sortable' => TRUE, ), 'sort' => array( 'handler' => 'views_handler_sort', ), 'filter' => array( 'handler' => 'views_handler_filter_string', ), ); but the link created is "?q=node/" without the node number. What am I missing? thanks -- *La vida ?s com una taronja, qu? esperes a exprimir-la? *Si creus que l'educaci? ?s cara, prova la ignor?ncia. *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From enboig at gmail.com Mon May 4 10:01:15 2009 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Mon, 4 May 2009 12:01:15 +0200 Subject: [development] views2: how to add "link to node" in custom filed In-Reply-To: <45a29f450905040201o695cbcd8wac30211c2e1a65e5@mail.gmail.com> References: <45a29f450905040201o695cbcd8wac30211c2e1a65e5@mail.gmail.com> Message-ID: <45a29f450905040301k253246cauc5dc7b9d2ea0652@mail.gmail.com> I solved it adding a "nid" field and inserting it inside the view, but exluding it from visibility. On Mon, May 4, 2009 at 11:01 AM, Llu?s wrote: > I have created a custom node and now I am addint "views support" to > it. I have a custom field which should be a link to the full node; I > added: > > ?$data['node_cc_projects']['long_name'] = array( > ? ?'title' => "long name", //trans > ? ?'help' => 'long name of the node.', //trans > ? ?'field' => array( > ? ? ?'field' => 'long_name', > ? ? ?'handler' => 'views_handler_field_node', > ? ? ?'click sortable' => TRUE, > ? ?), > ? ?'sort' => array( > ? ? ?'handler' => 'views_handler_sort', > ? ?), > ? ?'filter' => array( > ? ? ?'handler' => 'views_handler_filter_string', > ? ?), > ?); > > but the link created is "?q=node/" without the node number. What am I missing? > > thanks > > -- > *La vida ?s com una taronja, qu? esperes a exprimir-la? > *Si creus que l'educaci? ?s cara, prova la ignor?ncia. > *La vida ?s com una moneda, la pots gastar en el que vulguis per? > nom?s una vegada. > *Abans d'imprimir aquest missatge, pensa en el medi ambient. > -- *La vida ?s com una taronja, qu? esperes a exprimir-la? *Si creus que l'educaci? ?s cara, prova la ignor?ncia. *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From victorkane at gmail.com Mon May 4 11:34:26 2009 From: victorkane at gmail.com (Victor Kane) Date: Mon, 4 May 2009 08:34:26 -0300 Subject: [development] views2: how to add "link to node" in custom filed In-Reply-To: <45a29f450905040301k253246cauc5dc7b9d2ea0652@mail.gmail.com> References: <45a29f450905040201o695cbcd8wac30211c2e1a65e5@mail.gmail.com> <45a29f450905040301k253246cauc5dc7b9d2ea0652@mail.gmail.com> Message-ID: could you share that code? Victor Kane http://awebfactory.com.ar On Mon, May 4, 2009 at 7:01 AM, Llu?s wrote: > I solved it adding a "nid" field and inserting it inside the view, but > exluding it from visibility. > > > On Mon, May 4, 2009 at 11:01 AM, Llu?s wrote: > > I have created a custom node and now I am addint "views support" to > > it. I have a custom field which should be a link to the full node; I > > added: > > > > $data['node_cc_projects']['long_name'] = array( > > 'title' => "long name", //trans > > 'help' => 'long name of the node.', //trans > > 'field' => array( > > 'field' => 'long_name', > > 'handler' => 'views_handler_field_node', > > 'click sortable' => TRUE, > > ), > > 'sort' => array( > > 'handler' => 'views_handler_sort', > > ), > > 'filter' => array( > > 'handler' => 'views_handler_filter_string', > > ), > > ); > > > > but the link created is "?q=node/" without the node number. What am I > missing? > > > > thanks > > > > -- > > *La vida ?s com una taronja, qu? esperes a exprimir-la? > > *Si creus que l'educaci? ?s cara, prova la ignor?ncia. > > *La vida ?s com una moneda, la pots gastar en el que vulguis per? > > nom?s una vegada. > > *Abans d'imprimir aquest missatge, pensa en el medi ambient. > > > > > > -- > *La vida ?s com una taronja, qu? esperes a exprimir-la? > *Si creus que l'educaci? ?s cara, prova la ignor?ncia. > *La vida ?s com una moneda, la pots gastar en el que vulguis per? > nom?s una vegada. > *Abans d'imprimir aquest missatge, pensa en el medi ambient. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From enboig at gmail.com Mon May 4 11:55:01 2009 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Mon, 4 May 2009 13:55:01 +0200 Subject: [development] views2: how to add "link to node" in custom filed In-Reply-To: References: <45a29f450905040201o695cbcd8wac30211c2e1a65e5@mail.gmail.com> <45a29f450905040301k253246cauc5dc7b9d2ea0652@mail.gmail.com> Message-ID: <45a29f450905040455h61636r4c522dceb56eda4a@mail.gmail.com> I copied it from node.views.inc; I tried using "Node: nid" and setting it as "hidden", but it didn't work, don't know why. $data['node_cc_projects']['nid'] = array( 'title' => "Project NID", //trans 'help' => 'Nid del projecte.', //trans // Information for displaying the nid 'field' => array( 'handler' => 'views_handler_field_node', 'click sortable' => TRUE, ), // Information for accepting a nid as an argument 'argument' => array( 'handler' => 'views_handler_argument_node_nid', 'parent' => 'views_handler_argument_numeric', // make sure parent is included 'name field' => 'title', // the field to display in the summary. 'numeric' => TRUE, 'validate type' => 'nid', ), // Information for accepting a nid as a filter 'filter' => array( 'handler' => 'views_handler_filter_numeric', ), // Information for sorting on a nid. 'sort' => array( 'handler' => 'views_handler_sort', ), ); On Mon, May 4, 2009 at 1:34 PM, Victor Kane wrote: > could you share that code? > > Victor Kane > http://awebfactory.com.ar > > On Mon, May 4, 2009 at 7:01 AM, Llu?s wrote: >> >> I solved it adding a "nid" field and inserting it inside the view, but >> exluding it from visibility. >> >> >> On Mon, May 4, 2009 at 11:01 AM, Llu?s wrote: >> > I have created a custom node and now I am addint "views support" to >> > it. I have a custom field which should be a link to the full node; I >> > added: >> > >> > ?$data['node_cc_projects']['long_name'] = array( >> > ? ?'title' => "long name", //trans >> > ? ?'help' => 'long name of the node.', //trans >> > ? ?'field' => array( >> > ? ? ?'field' => 'long_name', >> > ? ? ?'handler' => 'views_handler_field_node', >> > ? ? ?'click sortable' => TRUE, >> > ? ?), >> > ? ?'sort' => array( >> > ? ? ?'handler' => 'views_handler_sort', >> > ? ?), >> > ? ?'filter' => array( >> > ? ? ?'handler' => 'views_handler_filter_string', >> > ? ?), >> > ?); >> > >> > but the link created is "?q=node/" without the node number. What am I >> > missing? >> > >> > thanks >> > >> > -- >> > *La vida ?s com una taronja, qu? esperes a exprimir-la? >> > *Si creus que l'educaci? ?s cara, prova la ignor?ncia. >> > *La vida ?s com una moneda, la pots gastar en el que vulguis per? >> > nom?s una vegada. >> > *Abans d'imprimir aquest missatge, pensa en el medi ambient. >> > >> >> >> >> -- >> *La vida ?s com una taronja, qu? esperes a exprimir-la? >> *Si creus que l'educaci? ?s cara, prova la ignor?ncia. >> *La vida ?s com una moneda, la pots gastar en el que vulguis per? >> nom?s una vegada. >> *Abans d'imprimir aquest missatge, pensa en el medi ambient. > > -- *La vida ?s com una taronja, qu? esperes a exprimir-la? *Si creus que l'educaci? ?s cara, prova la ignor?ncia. *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From larry at garfieldtech.com Mon May 4 13:49:15 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Mon, 4 May 2009 08:49:15 -0500 Subject: [development] views2: how to add "link to node" in custom filed In-Reply-To: <45a29f450905040301k253246cauc5dc7b9d2ea0652@mail.gmail.com> References: <45a29f450905040201o695cbcd8wac30211c2e1a65e5@mail.gmail.com> <45a29f450905040301k253246cauc5dc7b9d2ea0652@mail.gmail.com> Message-ID: <200905040849.15952.larry@garfieldtech.com> A field handler can implement another method to specify additional fields that it will need beyond the exact one mapped in the data hook. I forget the exact format off hand, but I know the views module uses it somewhere, probably as part of the title or "link to node" fields provided by the main system. On Monday 04 May 2009 5:01:15 am Llu?s wrote: > I solved it adding a "nid" field and inserting it inside the view, but > exluding it from visibility. > > On Mon, May 4, 2009 at 11:01 AM, Llu?s wrote: > > I have created a custom node and now I am addint "views support" to > > it. I have a custom field which should be a link to the full node; I > > added: > > > > $data['node_cc_projects']['long_name'] = array( > > 'title' => "long name", //trans > > 'help' => 'long name of the node.', //trans > > 'field' => array( > > 'field' => 'long_name', > > 'handler' => 'views_handler_field_node', > > 'click sortable' => TRUE, > > ), > > 'sort' => array( > > 'handler' => 'views_handler_sort', > > ), > > 'filter' => array( > > 'handler' => 'views_handler_filter_string', > > ), > > ); > > > > but the link created is "?q=node/" without the node number. What am I > > missing? > > > > thanks > > > > -- > > *La vida ?s com una taronja, qu? esperes a exprimir-la? > > *Si creus que l'educaci? ?s cara, prova la ignor?ncia. > > *La vida ?s com una moneda, la pots gastar en el que vulguis per? > > nom?s una vegada. > > *Abans d'imprimir aquest missatge, pensa en el medi ambient. -- Larry Garfield larry at garfieldtech.com From eric.schaefer at eas-consulting.de Mon May 4 16:42:28 2009 From: eric.schaefer at eas-consulting.de (Eric Schaefer) Date: Mon, 4 May 2009 18:42:28 +0200 Subject: [development] {variable} entry format Message-ID: <34f8975d0905040942r39aaf59an2c217388198405e3@mail.gmail.com> Hi List, I was always wondering about the format of the value column in the {variable} table (e.g. s:7:"garland";) Why the length of the string? Some kind of optimization? Regards, Eric From gabor at hojtsy.hu Mon May 4 16:45:01 2009 From: gabor at hojtsy.hu (=?ISO-8859-1?Q?G=E1bor_Hojtsy?=) Date: Mon, 4 May 2009 18:45:01 +0200 Subject: [development] {variable} entry format In-Reply-To: <34f8975d0905040942r39aaf59an2c217388198405e3@mail.gmail.com> References: <34f8975d0905040942r39aaf59an2c217388198405e3@mail.gmail.com> Message-ID: <86ca3ccb0905040945x3d05410eu9d0e2a51c341eb52@mail.gmail.com> Hi Eric, This is a serialized PHP structure. The reason we store it this way is that it allows us to store complex structures, like arrays and objects in the same field. G?bor On Mon, May 4, 2009 at 6:42 PM, Eric Schaefer wrote: > Hi List, > > I was always wondering about the format of the value column in the > {variable} table (e.g. s:7:"garland";) > Why the length of the string? Some kind of optimization? > > Regards, > Eric > From subscribe at courtnage.ca Mon May 4 16:44:49 2009 From: subscribe at courtnage.ca (Ryan Courtnage) Date: Mon, 4 May 2009 10:44:49 -0600 Subject: [development] {variable} entry format In-Reply-To: <34f8975d0905040942r39aaf59an2c217388198405e3@mail.gmail.com> References: <34f8975d0905040942r39aaf59an2c217388198405e3@mail.gmail.com> Message-ID: On Mon, May 4, 2009 at 10:42 AM, Eric Schaefer wrote: > Hi List, > > I was always wondering about the format of the value column in the > {variable} table (e.g. s:7:"garland";) > Why the length of the string? Some kind of optimization? It's just the result of php's serialize() function: http://ca3.php.net/serialize > > Regards, > Eric > From eric.schaefer at eas-consulting.de Mon May 4 17:30:26 2009 From: eric.schaefer at eas-consulting.de (Eric Schaefer) Date: Mon, 4 May 2009 19:30:26 +0200 Subject: [development] {variable} entry format In-Reply-To: References: <34f8975d0905040942r39aaf59an2c217388198405e3@mail.gmail.com> Message-ID: <34f8975d0905041030q535647adw8742aaa1015ed971@mail.gmail.com> 2009/5/4 Ryan Courtnage : > It's just the result of php's serialize() function: > http://ca3.php.net/serialize Thanks, Eric From cxjohnson at gmail.com Mon May 4 19:11:07 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Mon, 4 May 2009 14:11:07 -0500 Subject: [development] Database / SQL future thoughts Message-ID: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> Folks who care about the direction and performance of the Drupal database (and developers just generally interested in database backends for applications) should read this blog posting by Bob Cringley -- and more importantly, the comments written by some folks who know way more about databases than Mr. Cringely: http://www.cringely.com/2009/05/the-sequel-dilemma/ David Strauss and Larry Garfield, as our two current DB experts (IMHO, of course) -- I'd especially like you to digest the more pertinent comments and think about how we can simplify our database access, and hence optimize our performance. I'm about to go off an research Hadoop a bit, but my gut feeling is the comments which say SSD and proper, simple use of SQL and good data paths will be the right answer for the next decade or so are probably on the right mark. ..chris From karoly at negyesi.net Mon May 4 19:22:21 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Mon, 4 May 2009 12:22:21 -0700 Subject: [development] Database / SQL future thoughts In-Reply-To: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> Message-ID: <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> One comment here.. the field API storage is pluggable. From yched.drupal at free.fr Mon May 4 20:22:51 2009 From: yched.drupal at free.fr (Yves Chedemois) Date: Mon, 04 May 2009 22:22:51 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> Message-ID: <49FF4E9B.5060606@free.fr> Karoly Negyesi a ecrit le 04/05/2009 21:22: > One comment here.. the field API storage is pluggable. > ... but some work is still needed for this feature to be really usable : http://drupal.org/node/443422 We need people to jump in, here :-) Yves From mail at webthatworks.it Mon May 4 22:18:06 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Tue, 5 May 2009 00:18:06 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> Message-ID: <20090505001806.481fbe3d@dawn.webthatworks.it> On Mon, 4 May 2009 14:11:07 -0500 Chris Johnson wrote: > Folks who care about the direction and performance of the Drupal > database (and developers just generally interested in database > backends for applications) should read this blog posting by Bob > Cringley -- and more importantly, the comments written by some > folks who know way more about databases than Mr. Cringely: > > http://www.cringely.com/2009/05/the-sequel-dilemma/ > David Strauss and Larry Garfield, as our two current DB experts > (IMHO, of course) -- I'd especially like you to digest the more > pertinent comments and think about how we can simplify our > database access, and hence optimize our performance. I'm about to > go off an research Hadoop a bit, but my gut feeling is the > comments which say SSD and proper, simple use of SQL and good data > paths will be the right answer for the next decade or so are > probably on the right mark. I'd say it depends on the application (and no... drupal is not *one* application). If you're google you really don't care to lose some data and you don't care about transactions (most of the times). Most of what drupal does don't need transactions even if once you've several thousands of custom node types that are valuable and not just crap on the net you'd be a bit disappointed if the node-kernel remains orphan of the extra data just because something went wrong halfway... Furthermore... don't expect that anything that is not SQL and works better will be easy to understand... unless once more your data is crap and your application is simple (concurrency, coherency...). At the language level I won't bet we are going to see any revolution, so it will still be a good bet to have a good SQL abstraction layer, hopefully that will support some more coherency/concurrency features. Visual Basic, PHP, MySQL etc... were/are popular because they were easy and cheap and mostly they dealt with crap (nothing you will kill a self-proclaimed programmer for[1]). What alternative to SQL are we going to see that will overcome the cost of learning something new and offer anything better? For a long time MySQL was just a SQL interface to the filesystem... that should be a starting point to understand the real value and importance of SQL and not confusing it with the RDBMS "debate". Transaction, concurrency, coherency and building good system design aren't easy. A SQL interface is going to stay there for longer (linq anyone?). So part of the future is Hbase, part is not... and there are money in both camps. I'd say anyway that generally there are more money in the business that care about transactions and coherency (unless it is politics). BTW Amazon does have to care much more about transactions than Google. No surprise they aren't using MySQL. [1] F: hey Silvio, we lost all our invoices record S: never mind we just deleted the false accounting crime -- Ivan Sergio Borgonovo http://www.webthatworks.it From larry at garfieldtech.com Tue May 5 01:11:37 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Mon, 4 May 2009 20:11:37 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: <49FF4E9B.5060606@free.fr> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> Message-ID: <200905042011.37830.larry@garfieldtech.com> On Monday 04 May 2009 3:22:51 pm Yves Chedemois wrote: > Karoly Negyesi a ecrit le 04/05/2009 21:22: > > One comment here.. the field API storage is pluggable. > > ... but some work is still needed for this feature to be really usable : > http://drupal.org/node/443422 > > We need people to jump in, here :-) > > Yves I'd go a step farther and say that the field system backend is not pluggable in any useful sense until/unless it becomes at *least* per-object-type. Per-field is the ideal, but object type is the absolute minimum to call it "pluggable" with a straight face. -- Larry Garfield larry at garfieldtech.com From m at ooh.dk Tue May 5 09:10:38 2009 From: m at ooh.dk (=?UTF-8?B?TWlra2VsIEjDuGdo?=) Date: Tue, 5 May 2009 11:10:38 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <200905042011.37830.larry@garfieldtech.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> Message-ID: <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> On Tue, May 5, 2009 at 3:11 AM, Larry Garfield wrote: > On Monday 04 May 2009 3:22:51 pm Yves Chedemois wrote: >> Karoly Negyesi a ecrit le 04/05/2009 21:22: >> > One comment here.. the field API storage is pluggable. >> >> ... but some work is still needed for this feature to be really usable : >> http://drupal.org/node/443422 >> >> We need people to jump in, here :-) >> >> Yves > > I'd go a step farther and say that the field system backend is not pluggable in > any useful sense until/unless it becomes at *least* per-object-type. ?Per-field > is the ideal, but object type is the absolute minimum to call it "pluggable" > with a straight face. > > -- > Larry Garfield > larry at garfieldtech.com > I think we're comparing pears to apples here. This is not a question of SQL vs. not-SQL, but more a question of database architecture ? relational vs. document oriented. I think that relational databases will still have their uses with data that are inherently relational and carefully structured. That is not the way the winds are currently blowing with CCK and fields in core where the database schema is mutable and constantly evolving, so here the document databases could of help, but so could materialized views (not related to Views the module) or sharding. It all depends on usage and the amount of time you're willing to spend optimising and caching. I don't think that swapping the persistence layer out is going to make anything inherently more scalable, and it is not the first thing I'd do. Look at Facebook ? to my knowledge, they're still using MySQL combined with memcache and oodles of RAM. Being able to scale to their size and no further would be good enough for my usage ;) -- Regards, Mikkel H?gh From drupal at mamasam.net Tue May 5 13:51:08 2009 From: drupal at mamasam.net (Bertrand Mansion) Date: Tue, 5 May 2009 15:51:08 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> Message-ID: On Tue, May 5, 2009 at 11:10 AM, Mikkel H?gh wrote: > On Tue, May 5, 2009 at 3:11 AM, Larry Garfield wrote: >> On Monday 04 May 2009 3:22:51 pm Yves Chedemois wrote: >>> Karoly Negyesi a ecrit le 04/05/2009 21:22: >>> > One comment here.. the field API storage is pluggable. >>> >>> ... but some work is still needed for this feature to be really usable : >>> http://drupal.org/node/443422 >>> >>> We need people to jump in, here :-) >>> >>> Yves >> >> I'd go a step farther and say that the field system backend is not pluggable in >> any useful sense until/unless it becomes at *least* per-object-type. ?Per-field >> is the ideal, but object type is the absolute minimum to call it "pluggable" >> with a straight face. >> >> -- >> Larry Garfield >> larry at garfieldtech.com >> > > I think we're comparing pears to apples here. This is not a question > of SQL vs. not-SQL, but more a question of database architecture ? > relational vs. document oriented. > > I think that relational databases will still have their uses with data > that are inherently relational and carefully structured. > > That is not the way the winds are currently blowing with CCK and > fields in core where the database schema is mutable and constantly > evolving, so here the document databases could of help, but so could > materialized views (not related to Views the module) or sharding. > > It all depends on usage and the amount of time you're willing to spend > optimising and caching. I don't think that swapping the persistence > layer out is going to make anything inherently more scalable, and it > is not the first thing I'd do. > > Look at Facebook ? to my knowledge, they're still using MySQL combined > with memcache and oodles of RAM. Being able to scale to their size and > no further would be good enough for my usage ;) Facebook has access to more hardware than the average Drupal developer and is also using Cassandra http://incubator.apache.org/cassandra/ Drupal doesn't really need a relational DB and actually doesn't use the relational features properly (for example, the way tags are stored is not efficient). That's one of the reasons why it is slow and doesn't scale very well. But going for another storage system would be better if implemented as a fork, IMO. -- Bertrand Mansion Mamasam From Greg at GrowingVentureSolutions.com Tue May 5 14:18:14 2009 From: Greg at GrowingVentureSolutions.com (Greg Knaddison) Date: Tue, 5 May 2009 08:18:14 -0600 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> Message-ID: <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> This is some interesting feedback. I'd love to hear more of your thoughts so I can understand it better. On Tue, May 5, 2009 at 7:51 AM, Bertrand Mansion wrote: > Drupal doesn't really need a relational DB and actually doesn't use > the relational features properly (for example, the way tags are stored > is not efficient). That's one of the reasons why it is slow and > doesn't scale very well. These are some pretty sweeping claims. Can you expand on them? 1. Tags are stored inefficiently (I can't think of a way to store them that is better for every use) 2. Drupal doesn't scale very well (I've seen enough claims otherwise - is there a particular problem you can point to?) > But going for another storage system would be better if implemented as > a fork, IMO. Various people just rewrote the entire DB API, so it is possible to make massive API changes within a release cycle. Why do you feel a fork is necessary? Thanks, Greg -- Greg Knaddison http://knaddison.com | 303-800-5623 | http://growingventuresolutions.com From drupal at mamasam.net Tue May 5 15:07:25 2009 From: drupal at mamasam.net (Bertrand Mansion) Date: Tue, 5 May 2009 17:07:25 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: Hi Greg, On Tue, May 5, 2009 at 4:18 PM, Greg Knaddison wrote: > This is some interesting feedback. ?I'd love to hear more of your > thoughts so I can understand it better. > > On Tue, May 5, 2009 at 7:51 AM, Bertrand Mansion wrote: >> Drupal doesn't really need a relational DB and actually doesn't use >> the relational features properly (for example, the way tags are stored >> is not efficient). That's one of the reasons why it is slow and >> doesn't scale very well. > > These are some pretty sweeping claims. ?Can you expand on them? These are not claims, but only my opinion, based on my experiences with Drupal. > 1. Tags are stored inefficiently (I can't think of a way to store them > that is better for every use) What do you mean by "every use" ? If you are interested in reading about tags and SQL, here are some pointers: http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html http://laughingmeme.org/2005/04/07/in-lieu-of-the-promised-article-on-tags-and-sql/ The way Drupal stores tags hierarchy is also inefficient. > 2. Drupal doesn't scale very well (I've seen enough claims otherwise - > is there a particular problem you can point to?) Lots of problems for me, but that's off topic. Sessions, cache, sql queries, table structures, file storage, architecture and callback hell, etc. It's currently the best CMS for PHP I know, but still, it is sluggish (yes, this is subjective). >> But going for another storage system would be better if implemented as >> a fork, IMO. > > Various people just rewrote the entire DB API, so it is possible to > make massive API changes within a release cycle. ?Why do you feel a > fork is necessary? Moving to something like CouchDB as was suggested in the thread or some other datastores (someone mentioned Hadoop but I think he meant BigTable, Dynamo or Tokyo Cabinet...) would need more than just rewriting the DB API in my opinion. That's why I can only imagine this as a fork. That would be my reply to the first post. -- Bertrand Mansion Mamasam From enboig at gmail.com Tue May 5 15:26:25 2009 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Tue, 5 May 2009 17:26:25 +0200 Subject: [development] views: chaining tables Message-ID: <45a29f450905050826oa163174jd2c6fd94bcda12a0@mail.gmail.com> I am have a node view which should show data from a 3rd table: node->vid relates to node_cc_proveidors->vid node_cc_assentaments->provedir_nid relates to node_cc_proveidors->nid So starting from {node} I should get node_cc_assentaments->valor ; in SQL what I want is similar to: SELECT title, valor FROM cc2_node node LEFT JOIN cc2_node_cc_proveidors node_cc_proveidors ON node_cc_proveidors.vid = node.vid LEFT JOIN cc2_node_cc_assentaments node_cc_assentaments ON node_cc_assentaments.proveidor_nid = node_cc_proveidors.nid WHERE type IN ('proveidor') Any hint? thanks Right now my view looks like this. array( 'left_field' => 'vid', 'left_table' => 'node', 'field' => 'vid', ), 'cc_proviedors_assentaments' => array( //alias for {node_cc_assentaments} 'left_table' => 'node_cc_assentaments', 'left_field' => 'proveidor_nid', 'table' => 'node_cc_assentaments', 'field' => 'nid', ) ); $data['node_cc_proveidors']['nif'] = array( 'title' => 'Nif del prove?dor', //trans 'help' => '.', //trans 'field' => array( 'field' => 'nif', 'handler' => 'views_handler_field', 'click sortable' => TRUE, ), 'filter' => array( 'handler' => 'views_handler_filter_string', ), 'argument' => array( 'handler' => 'views_handler_argument_string', ), 'sort' => array( 'handler' => 'views_handler_sort', ), ); $data['cc_proviedors_assentaments']['table']['group'] = 'ComptaCAU Prove?dors 2'; //trans $data['cc_proviedors_assentaments']['table']['join'] = array( 'node_cc_proveidors' => array( 'left_table' => 'node_cc_assentaments', 'left_field' => 'nid', 'field' => 'proveidor_nid', 'table' => 'cc_assentaments', ), ); $data['cc_proviedors_assentaments']['nid'] = array( 'title' => 'Diners gastats al proveidor', //trans 'help' => 'Llista totes les despeses del prove?dor, permetent agrupar-les i fer totals.', //trans 'field' => array( 'real field' => 'valor', 'handler' => 'views_handler_field', 'click sortable' => TRUE, ), ); return $data; } -- *La vida ?s com una taronja, qu? esperes a exprimir-la? *Si creus que l'educaci? ?s cara, prova la ignor?ncia. *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From gerhard at killesreiter.de Tue May 5 16:08:33 2009 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Tue, 05 May 2009 18:08:33 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: <4A006481.4010400@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bertrand Mansion schrieb: > On Tue, May 5, 2009 at 4:18 PM, Greg Knaddison > wrote: >> This is some interesting feedback. I'd love to hear more of your >> thoughts so I can understand it better. >> >> On Tue, May 5, 2009 at 7:51 AM, Bertrand Mansion wrote: >>> Drupal doesn't really need a relational DB and actually doesn't use >>> the relational features properly (for example, the way tags are stored >>> is not efficient). That's one of the reasons why it is slow and >>> doesn't scale very well. >> These are some pretty sweeping claims. Can you expand on them? > > These are not claims, but only my opinion, based on my experiences > with Drupal. With which types of sites did you make these experiences? >> 1. Tags are stored inefficiently (I can't think of a way to store >> them that is better for every use) > > What do you mean by "every use" ? He probably means "every possible use-case". > If you are interested in reading about tags and SQL, here are some pointers: > http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html > http://laughingmeme.org/2005/04/07/in-lieu-of-the-promised-article-on-tags-and-sql/ > > The way Drupal stores tags hierarchy is also inefficient. We just agree to some terminology. In the Drupalverse, we have 1) a term, which is part of a vocabulary. The vocabulary can be hierarchical or not, and allow some other special cases. 2) a tag, this is a special case of a term, namely a term from a vocabulary that has the "free tagging" bit switched on. This also means the vocabulary has no hierarchy. Drupal 6 is in particular problematic if you have a) a lot of nodes b) which have several terms each (doesn't matter which type) and c) have many revisions. In Drupal 5 terms where not revisioned, in D6 they are and this causes mySQL to sift through far more entries than it had to before. drupal.org's handbooks and projects are use cases for this. >> 2. Drupal doesn't scale very well (I've seen enough claims otherwise - >> is there a particular problem you can point to?) > > Lots of problems for me, but that's off topic. No, we are on the development list where can discuss such topics. > Sessions, cache, sql queries, table structures, file storage, > architecture and callback hell, etc. You should probably open new threads for each topic in order no not clutter this one too much. > It's currently the best CMS for PHP I know, but still, it is > sluggish (yes, this is subjective). Very. >>> But going for another storage system would be better if implemented as >>> a fork, IMO. >> Various people just rewrote the entire DB API, so it is possible to >> make massive API changes within a release cycle. Why do you feel a >> fork is necessary? > > Moving to something like CouchDB as was suggested in the thread or Somebody (David?) brought up the topic of CouchDB, but I am not aware of a serious development effort. > some other datastores (someone mentioned Hadoop but I think he meant > BigTable, Dynamo or Tokyo Cabinet...) would need more than just > rewriting the DB API in my opinion. That's why I can only imagine > this as a fork. That would be my reply to the first post. I don't think that a Drupal fork would be viable. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkoAZIEACgkQfg6TFvELooQ/uwCfcQT8jlJzYQLgtHfB7XQha5KC racAoIrjNmAuejqz1D5m6w5cbNpZuJ0u =w+4e -----END PGP SIGNATURE----- From mail at webthatworks.it Tue May 5 16:19:07 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Tue, 5 May 2009 18:19:07 +0200 Subject: [development] global object to push stuff into Message-ID: <20090505181907.745845b2@dawn.webthatworks.it> I was looking at nodewords (aka Meta tags) and I developed my own mini module to push stuff into . nodewords grab informations from "core" or very popular modules to add stuff into meta and it provides a basic api to other modules. But somehow meta are a standard part of a web page and drupal provide just drupal add_html_head/drupal_get_html_head. So there is no way to edit in a structured way head. A common use would be to add keywords or replace them and support keywords/description for content that is not node-based. If there was such a structured object to deal with META it would be easier for modules and non-node content to place stuff there. And in spite of writing an "additional" snippet of code to nodewords to support different modules, other modules will just have to pass what they want to this object. I already wrote a module that provide such object to give a structured access to HEAD and provide some helper to easily access, overwrite, add description, keywords and canonical url + support for nearly arbitrary head tags. I`m going to build up a nodewords clone to experiment with an hybrid approach that will offer modules to push stuff into HEAD and pull stuff from core object as nodewords already does. Of course I already have some other module that push stuff into meta. There could be a head_alter hook or something similar. I was wondering if a more structured access to HEAD would gain any traction in core or there is already someone working on it to get an idea of the direction core may take. thanks -- Ivan Sergio Borgonovo http://www.webthatworks.it From cxjohnson at gmail.com Tue May 5 16:23:24 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Tue, 5 May 2009 11:23:24 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <32994.193.26.4.35.1241527564.squirrel@sflink.net> <9ea8d6030905050800n28cc1fb4n712791e76997155@mail.gmail.com> Message-ID: <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> Perhaps before this discussion gets too far astray -- or maybe such digression is impossible to avoid! :-) My point in posting this was to elicit folks who were interested in the database usage and performance for the core parts of Drupal, and in particular the folks who I through the past years have observed as being especially astute and involved (and if I left your name off that short list, it's only because I forgot your name or other such failure on my part -- no slight or insult intended). I was particularly hopeful that folks would read the comments, and take to heart those written in favor of SQL, such as those by Robert Young. I didn't want to bias the conversation by injecting my opinion too early, but I'm in the camp that says things like BigTable are really just reinventions of older technology, AND that the death of RDBMS/SQL is not nearly as soon as some might think. For Drupal, I think it may make sense to attempt to make the SQL as simple as possible, avoiding the really complex capabilities and doing more of that work in PHP, where most of the developers actually have some expertise. This is especially true since MySQL's MyISAM table engine is really poor at doing anything beyond that. If we were to move to using MVCC[1] engines like Postgres, Oracle and MySQL with InnoDB or Falcon, then more complex SQL would be useful. Unfortunately, most Drupal developers don't have the SQL skills needed, and even worse, most people are not going to have the ability to physically optimize the database for performance (i.e. skilled DBA person, access to MySQL settings at most hosting services, etc.). Hence, the former course of using only the simplest, most primitive SQL statements appeals to me for Drupal. It's that last point I'd really like to have criticized. Is it possible to do that? Especially in light of DBTNG, where is the line between simple statements and complex statements? Lastly, although many Drupal-based sites are database limited, many are PHP-code interpretation (# of files/lines parsed) or bandwidth (fast JS/image pages) limited, too. My goal is simple: make my hundred module websites respond in less than 2 seconds! :-D Thanks for participating in this discussion, no matter which tangent you're on. ..chris [1] http://en.wikipedia.org/wiki/Multiversion_concurrency_control From jeff at viapositiva.net Tue May 5 16:41:47 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Tue, 5 May 2009 11:41:47 -0500 Subject: [development] global object to push stuff into In-Reply-To: <20090505181907.745845b2@dawn.webthatworks.it> References: <20090505181907.745845b2@dawn.webthatworks.it> Message-ID: On May 5, 2009, at 11:19 AM, Ivan Sergio Borgonovo wrote: > So there is no way to edit in a structured way head. In Drupal 7, I'd really love to see the globally alterable $page array become a place where this stuff lives. hook_page_alter already exists... --Jeff From jeff at viapositiva.net Tue May 5 15:40:14 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Tue, 5 May 2009 10:40:14 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: On May 5, 2009, at 10:07 AM, Bertrand Mansion wrote: >> 1. Tags are stored inefficiently (I can't think of a way to store >> them >> that is better for every use) > > What do you mean by "every use" ? > > If you are interested in reading about tags and SQL, here are some > pointers: > http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html > http://laughingmeme.org/2005/04/07/in-lieu-of-the-promised-article-on-tags-and-sql/ When Greg says, "Every use" he means that Drupal allows tags and taxonomy terms in general to be used for a lot of metadata related purposes. It's possible to optimize the storage and retrieval mechanism for specific use cases (like user-specific flickr-style tags, or hierarchical categorization), but the optimizations for those use cases are at odds with each other. What works for one will make the others punishingly inefficient. Thus, Drupal currently uses a 'best-compromise' schema that allows it to capture as much information as possible (hierarchy, weight, association, etc.) and relies on caching at a later point to smooth out hot spots. There may well be further improvements that can be eked out, and there may be opportunities for optimization that have been missed -- and there may even be a case to be made for splitting taxonomy into real "tags" and "hierarchical category" so that the system can be better optimized. But I'm not sure that you're really clear on how Drupal actually works under the hood; the article you pointed to explicitly described Drupal's tag storage schema and outlined its advantages. If you go back and read the article, it's the "Toxi Solution." --Jeff Eaton -------------- next part -------------- An HTML attachment was scrubbed... URL: From catch56 at googlemail.com Tue May 5 16:52:11 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Tue, 5 May 2009 17:52:11 +0100 Subject: [development] Database / SQL future thoughts In-Reply-To: <4A006481.4010400@killesreiter.de> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> <4A006481.4010400@killesreiter.de> Message-ID: There are plenty of places in Drupal where we can optimize the database before leaving SQL behind. Search can already be factored out to highly optimised systems like Apache Solr, but we still support SQL based search in core (and it was made a lot faster for Drupal 6 than in Drupal 5). So while I think pluggable field storage will be great, it's not going to get us out of optimising for MySQL any time soon. There's also a big difference between indexing content where the primary record is still in the database, and swapping out the database entirely. On taxonomy specifically theres two issues with our current storage: queries joining on the term_node table (as already pointed out by Killes) - if you have conditions on one table and order by on another, then MySQL can't use indexes efficiently. The term_node table might disappear completely in Drupal 7 if vocabulary associations with nodes move to the field API - http://drupal.org/node/412518 - field API storage has it's own performance issues, but we need to deal with those anyway. Or we might end up having both field tables and term_node. The other problem with taxonomy storage is term hierarchy. http://drupal.org/node/344019 is being worked on (storing hierarchies with nested sets keyed by rational numbers to save recursively walking up and down trees) so we could do queries on the taxonomy tree efficiently. There's also contrib modules for implementations of nested sets and materialized path (for Drupal 5 / 6). Both issues desperately need more eyes on them though, and sadly the discussion so far suggests that the people writing of taxonomy's storage haven't even bothered to look for them. Nat From larry at garfieldtech.com Tue May 5 17:12:45 2009 From: larry at garfieldtech.com (larry at garfieldtech.com) Date: Tue, 05 May 2009 12:12:45 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <32994.193.26.4.35.1241527564.squirrel@sflink.net> <9ea8d6030905050800n28cc1fb4n712791e76997155@mail.gmail.com> <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> Message-ID: <4A00738D.3070208@garfieldtech.com> Chris Johnson wrote: *snip* > Hence, the former course of using only the simplest, most primitive > SQL statements appeals to me for Drupal. > > It's that last point I'd really like to have criticized. Is it > possible to do that? Especially in light of DBTNG, where is the line > between simple statements and complex statements? Simple vs. complex is not a binary statement anyway, but a continuum. In D7, some queries are more verbose than they used to be (complex update statements, for instance) but a lot of more horrifically complex queries are now quite easy. So we've effectively flattened the curve and moved most DB interaction into the "Can't click and drool but you can do a lot more" realm. The other advantage is that we have, at least, points at which DB-specific optimizations can be made. Mostly we're only doing that for modifier queries (insert and merge, specifically), because that's where the SQL syntax differs the most. Restructuring a SELECT statement is an order of magnitude harder, and as the article notes much of it has to be done on the DB side anyway, not the application side. (Some queries simply cannot avoid filesort in MySQL; other DBs may offer workarounds.) The other catch is that Drupal's heavily-modifiable design often precludes "one query to rule them all" design, as that requires knowing everything you'll need before hand. With modules and hooks, you almost never do. See also this great read: http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx Really, I see "object store" databases (CouchDB and friends) as simply solving a different problem space that formerly was crammed into SQL out of "it's the only tool available". RDBMSs are still around, and will remain around, for a LOOOONG time. Just look at a typical file system on your computer. I'd bet good money it's hierarchical, despite the supposed advantages of "huge-data-soup-with-craploads-of-indexes" architecture. However, that exact architecture ran the Palm OS for years. The author may or may not be right about Oracle and MySQL, but either way I'm not worried that SQL databases will go away any time in the next decade. They may have reached a maturity point and not change dramatically (dear god I hope so), but SQL is not going anywhere. There may be advantages to having an "object store" general front-end that can then be connected to CouchDB or similar (hm, another handlers use case...), but that's separate from having an SQL interface in core. They're just different tools for different problems. For most of our problems, simple relational models are perfectly fine. > Lastly, although many Drupal-based sites are database limited, many > are PHP-code interpretation (# of files/lines parsed) or bandwidth > (fast JS/image pages) limited, too. My goal is simple: make my > hundred module websites respond in less than 2 seconds! :-D With the registry now in place we really need to start properly splitting up core modules to reduce code weight. :-) --Larry Garfield From drupal at mamasam.net Tue May 5 18:54:23 2009 From: drupal at mamasam.net (Bertrand Mansion) Date: Tue, 5 May 2009 20:54:23 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: On Tue, May 5, 2009 at 5:40 PM, Jeff Eaton wrote: > > On May 5, 2009, at 10:07 AM, Bertrand Mansion wrote: > > 1. Tags are stored inefficiently (I can't think of a way to store them > > that is better for every use) > > What do you mean by "every use" ? > > If you are interested in reading about tags and SQL, here are some pointers: > http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html > http://laughingmeme.org/2005/04/07/in-lieu-of-the-promised-article-on-tags-and-sql/ > > When Greg says, "Every use" he means that Drupal allows tags and taxonomy > terms in general to be used for a lot of metadata related purposes. It's > possible to optimize the storage and retrieval mechanism for specific use > cases (like user-specific flickr-style tags, or hierarchical > categorization), but the optimizations for those use cases are at odds with > each other. What works for one will make the others punishingly inefficient. > Thus, Drupal currently uses a 'best-compromise' schema that allows it to > capture as much information as possible (hierarchy, weight, association, > etc.) and relies on caching at a later point to smooth out hot spots. > There may well be further improvements that can be eked out, and there may > be opportunities for optimization that have been missed -- and there may > even be a case to be made for?splitting?taxonomy into real "tags" and > "hierarchical category" so that the system can be better?optimized. But I'm > not sure that you're really clear on how Drupal actually works under the > hood; the article you pointed to explicitly described Drupal's tag storage > schema and outlined its advantages. If you go back and read the article, > it's the "Toxi Solution." Well, I think I know everything there is to know about Drupal. I have been developing modules for it for 4 years now and deployed a dozen of websites for customers, some quite large... I think it is a good opportunity now, with the emergence of these new databases, to think about what we have been doing for years, and how. Instead of being arrogant and underestimating others, you should start by asking yourself if there really isn't any other way to better manage tags (and cache, and sessions, and hierarchies, and callbacks, and file storage, etc). -- Bertrand Mansion Mamasam From karoly at negyesi.net Tue May 5 19:12:00 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Tue, 5 May 2009 12:12:00 -0700 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: <7e270cea0905051212p1c8450f4nc1db830cfd0cced7@mail.gmail.com> > Instead of being arrogant and underestimating others, you should start > by asking yourself if there really isn't any other way to better > manage tags (and cache, and sessions, and hierarchies, and callbacks, > and file storage, etc). cache and sessions are in memcached for any big site. The module is well maintained there is ongoing work about hierarchies as catch told you. dunno whats your problem with callbacks. file storage, there is ongoing work to support stream wrappers and imo then you can write your own. Where do you want to help today? From catch56 at googlemail.com Tue May 5 19:16:07 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Tue, 5 May 2009 20:16:07 +0100 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: Bertrand Mansion wrote: > Instead of being arrogant and underestimating others, you should start > by asking yourself if there really isn't any other way to better > manage tags People are already asking these questions - I linked to the patches a couple of hours ago. Similarly people are working on the other things you mentioned - but you haven't referenced any of that work in your e-mails to this list, so it's impossible to tell if you're familiar with it or not: > cache, and sessions http://drupal.org/project/memcache (cache and sessions) http://drupal.org/project/cacherouter http://groups.drupal.org/handlers >, and hierarchies menu system rewrite for Drupal 6 and the tree parsing patch for D7. Also http://drupal.org/project/leftandright and http://drupal.org/project/lineage in contrib > and file storage, etc). http://drupal.org/project/cdn So if you know everything there is to know about all of these efforts (and others which I didn't mention) - presumably you could explain how you evaluated and rejected them already? Nat From nan_wich at bellsouth.net Tue May 5 19:24:03 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Tue, 5 May 2009 15:24:03 -0400 Subject: [development] Database / SQL future thoughts In-Reply-To: Message-ID: Bertrand Mansion wrote: > I think I know everything there is to know about Drupal. Wow, in another two years I can say this? I don't think so. I'd be willing to bet there is at least one thing even Dries doesn't know about Drupal. > Instead of being arrogant... Hmm... Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.18/2096 - Release Date: 5/4/2009 5:51 PM From gerhard at killesreiter.de Tue May 5 19:27:20 2009 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Tue, 05 May 2009 21:27:20 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: <4A009318.20909@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bertrand Mansion schrieb: > Well, I think I know everything there is to know about Drupal. I > have been developing modules for it for 4 years now and deployed a Even after using Drupal for twice that time I'd never make such a claim. > dozen of websites for customers, some quite large... I think it is a > good opportunity now, with the emergence of these new databases, to > think about what we have been doing for years, and how. > > Instead of being arrogant and underestimating others, Kettle, black? > you should start by asking yourself if there really isn't any other > way to better manage tags (and cache, and sessions, and hierarchies, > and callbacks, and file storage, etc). I think you should crawl back under your rock. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkoAkxcACgkQfg6TFvELooT3bACdEdgTlpGsptgxlj03KMWXIyUX ba0Anjn+mquHkxTXnZI+P6/w2EMsuUK2 =Ukcq -----END PGP SIGNATURE----- From jeff at viapositiva.net Tue May 5 19:30:56 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Tue, 5 May 2009 14:30:56 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <7e270cea0905041222t6b597e7dp619504998199fccd@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: On May 5, 2009, at 1:54 PM, Bertrand Mansion wrote: > Well, I think I know everything there is to know about Drupal. I have > been developing modules for it for 4 years now and deployed a dozen of > websites for customers, some quite large... I think it is a good > opportunity now, with the emergence of these new databases, to think > about what we have been doing for years, and how. > > Instead of being arrogant and underestimating others, you should start > by asking yourself if there really isn't any other way to better > manage tags (and cache, and sessions, and hierarchies, and callbacks, > and file storage, etc). You're quite right, Bertrand, and I apologize for the snarkiness of my comment. Since that article you pointed to described Drupal's tagging system *without* suggesting it was a fundamentally flawed approach, I assumed you were not familiar with the Taxonomy system's internals. This is not a matter of arrogance but of misinterpreting your statement. As I'm sure you know from being on the devel list, there is an unending stream of "Drupal Should Do X Like Y, And Here's A Blog Post To Prove It" comments that are not necessarily rooted in familiarity with the way the system already works. Greg's statement, though, stands: Taxonomy as it presently stands is a generalized metadata system, and the optimizations discussed in the first two parts of the article you linked to are not possible without building an entirely different set of specialized systems. The third model, explained in the article that you linked to, is what Drupal uses currently. A number of other developers have suggested that other approaches might be good -- rather than tying ourselves to a relational model, we should consider treating nodes as cached objects, for example. Doing so would probably yield some great improvements for the specific use cases we optimize the storage mechanism for. I could be wrong, but at present the use of a traditional SQL backend is still our best bet for a generalized system that allows users to design their schemas and their views in an ad-hoc fashion without writing code. Is there any way that something other than SQL could leverage multiple loosely connected systems like CCK, Taxonomy, and Views without crippling performance in other areas? That's not a rhetorical question; I'm curious and would like to know if I'm overlooking some fundamental issues. --Jeff Eaton From jeff at viapositiva.net Tue May 5 20:18:30 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Tue, 5 May 2009 15:18:30 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: On May 5, 2009, at 3:12 PM, Bertrand Mansion wrote: > For CCK, it wouldn't even be needed because Tokyo Cabinet tables, like > CouchDB's, can have arbitrary number of fields. It is your application > which decides which fields are required, not your database. Right. That's the easy part, though -- Drupal is a generalized web CMS and the problem is not "storing buckets of data" but "storing them in a way that is flexible enough for ad-hoc queries to be done efficiently using tools like Views." I think it's fair to say that CCK is useful, but without Views and its level of "smart" flexibility, Drupal would not be the success that it is today. Am I mistaken in thinking that the loss of efficient ad-hoc queries is one of the tradeoffs inherent in moving to the 'bucket of data' model? --Jeff From drupal at mamasam.net Tue May 5 20:12:44 2009 From: drupal at mamasam.net (Bertrand Mansion) Date: Tue, 5 May 2009 22:12:44 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <49FF4E9B.5060606@free.fr> <200905042011.37830.larry@garfieldtech.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: On Tue, May 5, 2009 at 9:30 PM, Jeff Eaton wrote: > On May 5, 2009, at 1:54 PM, Bertrand Mansion wrote: > >> Well, I think I know everything there is to know about Drupal. I have >> been developing modules for it for 4 years now and deployed a dozen of >> websites for customers, some quite large... I think it is a good >> opportunity now, with the emergence of these new databases, to think >> about what we have been doing for years, and how. >> >> Instead of being arrogant and underestimating others, you should start >> by asking yourself if there really isn't any other way to better >> manage tags (and cache, and sessions, and hierarchies, and callbacks, >> and file storage, etc). > > You're quite right, Bertrand, and I apologize for the snarkiness of my > comment. Since that article you pointed to described Drupal's tagging system > *without* suggesting it was a fundamentally flawed approach, I assumed you > were not familiar with the Taxonomy system's internals. This is not a matter > of arrogance but of misinterpreting your statement. As I'm sure you know > from being on the devel list, there is an unending stream of "Drupal Should > Do X Like Y, And Here's A Blog Post To Prove It" comments that are not > necessarily rooted in familiarity with the way the system already works. > > Greg's statement, though, stands: Taxonomy as it presently stands is a > generalized metadata system, and the optimizations discussed in the first > two parts of the article you linked to are not possible without building an > entirely different set of specialized systems. The third model, explained in > the article that you linked to, is what Drupal uses currently. > > A number of other developers have suggested that other approaches might be > good -- rather than tying ourselves to a relational model, we should > consider treating nodes as cached objects, for example. Doing so would > probably yield some great improvements for the specific use cases we > optimize the storage mechanism for. I could be wrong, but at present the use > of a traditional SQL backend is still our best bet for a generalized system > that allows users to design their schemas and their views in an ad-hoc > fashion without writing code. > > Is there any way that something other than SQL could leverage multiple > loosely connected systems like CCK, Taxonomy, and Views without crippling > performance in other areas? That's not a rhetorical question; I'm curious > and would like to know if I'm overlooking some fundamental issues. This is exactly what I am investigating for another project where I use Tokyo Tyrant with PHP. I don't have figures yet nor concrete solutions, but I find it very interesting and challenging to try to think differently. In an application I wrote, I chose to manage my tags differently (only one table with lots of redundancy but fast), and it worked well. In another application, I also tried another way to deal with child/parent relations (not the celko's way but using LIKE, depths and paths) and it also worked well, was easier to manage and faster. With these new databases, at first, I found it very difficult to forget everything about relational DBs and ORM like solutions where a table looks like an object. I am almost sure that Drupal, like any other CMS, could take advantage from systems like CouchDB or Tokyo Cabinet (or others). Take for example the 'node' and 'node_revision' tables, in such DBs they wouldn't need to be separate entities. CouchDB has versioning. Tokyo Cabinet can compress your data on the fly so you can store many versions of your node without having to worry about relations. For CCK, it wouldn't even be needed because Tokyo Cabinet tables, like CouchDB's, can have arbitrary number of fields. It is your application which decides which fields are required, not your database. I find it quite exciting, you should see for yourself. PS: I'll release a PHP class that talks with Tokyo Tyrant soon, probably in PEAR. -- Bertrand Mansion Mamasam From drupal at mamasam.net Tue May 5 20:28:58 2009 From: drupal at mamasam.net (Bertrand Mansion) Date: Tue, 5 May 2009 22:28:58 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: On Tue, May 5, 2009 at 10:18 PM, Jeff Eaton wrote: > > On May 5, 2009, at 3:12 PM, Bertrand Mansion wrote: > >> For CCK, it wouldn't even be needed because Tokyo Cabinet tables, like >> CouchDB's, can have arbitrary number of fields. It is your application >> which decides which fields are required, not your database. > > > Right. That's the easy part, though -- Drupal is a generalized web CMS and > the problem is not "storing buckets of data" but "storing them in a way that > is flexible enough for ad-hoc queries to be done efficiently using tools > like Views." I think it's fair to say that CCK is useful, but without Views > and its level of "smart" flexibility, Drupal would not be the success that > it is today. > > Am I mistaken in thinking that the loss of efficient ad-hoc queries is one > of the tradeoffs inherent in moving to the 'bucket of data' model? Actually, "views" are inside the database: http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views For example, the Views module would create views in the database directly, instead of storing SQL queries in a table and executing them later. That's more logical. -- Bertrand Mansion Mamasam From merlin at logrus.com Tue May 5 20:55:04 2009 From: merlin at logrus.com (Earl Miles) Date: Tue, 05 May 2009 13:55:04 -0700 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <52d800cd0905050210y3e15825fm8b4c6d94bfc4bacd@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> Message-ID: <4A00A7A8.2070502@logrus.com> Bertrand Mansion wrote: > Actually, "views" are inside the database: > http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views > For example, the Views module would create views in the database > directly, instead of storing SQL queries in a table and executing them > later. That's more logical. That's only more logical if you don't actually know what Views does. Views SQL is not generated ahead of time and then just run on demand, it is created as needed based upon the data available. Quite an amount of that data can change at runtime. From drupal at mamasam.net Tue May 5 21:49:36 2009 From: drupal at mamasam.net (Bertrand Mansion) Date: Tue, 5 May 2009 23:49:36 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <4A00A7A8.2070502@logrus.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> <4A00A7A8.2070502@logrus.com> Message-ID: On Tue, May 5, 2009 at 10:55 PM, Earl Miles wrote: > Bertrand Mansion wrote: >> >> Actually, "views" are inside the database: >> http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views >> For example, the Views module would create views in the database >> directly, instead of storing SQL queries in a table and executing them >> later. That's more logical. > > That's only more logical if you don't actually know what Views does. Views > SQL is not generated ahead of time and then just run on demand, it is > created as needed based upon the data available. Quite an amount of that > data can change at runtime. Yes, it is more logical to have views inside the database, because it is a database feature, than to store chunks of SQL and serialized PHP in a database table... I guess you haven't thought about what you posted before you posted it. Obviously, it is an habit for people to be insulting here. -- Bertrand Mansion Mamasam From gerhard at killesreiter.de Tue May 5 21:53:02 2009 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Tue, 05 May 2009 23:53:02 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> <4A00A7A8.2070502@logrus.com> Message-ID: <4A00B53E.1070606@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bertrand Mansion schrieb: > On Tue, May 5, 2009 at 10:55 PM, Earl Miles wrote: >> Bertrand Mansion wrote: >>> Actually, "views" are inside the database: >>> http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views >>> For example, the Views module would create views in the database >>> directly, instead of storing SQL queries in a table and executing them >>> later. That's more logical. >> That's only more logical if you don't actually know what Views does. Views >> SQL is not generated ahead of time and then just run on demand, it is >> created as needed based upon the data available. Quite an amount of that >> data can change at runtime. > > Yes, it is more logical to have views inside the database, because it > is a database feature, than to store chunks of SQL and serialized PHP > in a database table... I guess you haven't thought about what you > posted before you posted it. > > Obviously, it is an habit for people to be insulting here. > I so wish I was the list admin, I'd kick you. Since I am not, I'll just filter you. Good riddance, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkoAtT4ACgkQfg6TFvELooT0sgCcC0cLjRAJ1cFv8vLnRmz+7xFC 9EkAn1hz0wHOJWX4zp5ftq47rZ0a85hi =b29V -----END PGP SIGNATURE----- From merlin at logrus.com Tue May 5 22:00:03 2009 From: merlin at logrus.com (Earl Miles) Date: Tue, 05 May 2009 15:00:03 -0700 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> <4A00A7A8.2070502@logrus.com> Message-ID: <4A00B6E3.9020709@logrus.com> Bertrand Mansion wrote: > On Tue, May 5, 2009 at 10:55 PM, Earl Miles wrote: >> Bertrand Mansion wrote: >>> Actually, "views" are inside the database: >>> http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views >>> For example, the Views module would create views in the database >>> directly, instead of storing SQL queries in a table and executing them >>> later. That's more logical. >> That's only more logical if you don't actually know what Views does. Views >> SQL is not generated ahead of time and then just run on demand, it is >> created as needed based upon the data available. Quite an amount of that >> data can change at runtime. > > Yes, it is more logical to have views inside the database, because it > is a database feature, than to store chunks of SQL and serialized PHP > in a database table... I guess you haven't thought about what you > posted before you posted it. Let's see. As the author of Views, I would say I am the supreme authority on what it does. Your response indicates you believe I am wrong, and that by stating you are NOT the supreme authority on what the Views module does, and in fact appear to now understand what Views really does, I am being insulting. Please let me quote: You: > ...instead of storing SQL queries... Me: > ...Views SQL is not generated ahead of time and then just run on demand, it is created as needed... You: > ...than to store chunks of SQL...in a database table... > ...I guess you haven't thought about what you posted before you posted it... Perhaps you misunderstand what 'not generated ahead of time' means, or 'created as needed'. It certainly does NOT mean 'stores chunks of SQL' in the database. Please tell me how I can construe this as ANYTHING other than "You don't actually know what Views does." If I am being insulting with this, it is only because you are presuming. When your presumptions are corrected, you get offended. Please, 1) stop presuming, 2) stop being offended. And above all, this did not belong in my personal mailbox. For that, I do feel free to be offensive: If you feel I have offended you on a public list, suck it. From cxjohnson at gmail.com Tue May 5 22:02:42 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Tue, 5 May 2009 17:02:42 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: <4A00A7A8.2070502@logrus.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> <4A00A7A8.2070502@logrus.com> Message-ID: <9ea8d6030905051502s22c42be3ve81cb52eba5c5fe2@mail.gmail.com> At first, the descriptions of CouchDB and Tokyo Cabinets sounded suspiciously like multivalued databases, such as Reality and UniVerse (both circa 1970). CouchDB is a RESTful web service package, which has a storage engine that uses MVCC (Postgres, Oracle, InnoDB), and b-tree indexes (used by most RDBMSs), with sequence ids (supported by most RDBMSs). So, really comparing CouchDB to MySQL or Postgres is to compare apples and baked tarts made with apples. The Tokyo Cabinet SourceForge project says: "Tokyo Cabinet is a library of routines for managing a database. The database is a simple data file containing records, each is a pair of a key and a value. Every key and value is serial bytes with variable length. Both binary data and character string can be used as a key and a value. There is neither concept of data tables nor data types. Records are organized in hash table, B+ tree, or fixed-length array. As for database of hash table, each key must be unique within a database, so it is impossible to store two or more records with a key overlaps." A blog writer says: "Tokyo Cabinet is a simple, small, fast key/value store. Similar to DBM, it?s a very basic database. If you combine it with Tokyo Tyrant, it becomes a very capable, scalable network database (like mysql or couchdb)." So, is CouchDB's storage engine any more performant in a flexible CMS situation like Drupal than SQL storage engines? That remains to be seen. There's no obvious reason why it should be, since it does pretty much everything an RDBMS does (indexing, ACID compliance, etc.). CouchDB does provide some extras which could be useful, such as the built-in views already mentioned. And its document orientation might be great for large files (images, documents, etc.). Would the RESTful API be an advantage over SQL? And Tokyo Cabinets -- hmmm. Serialized data versus structured data and database wide unique keys. DBM primitives? Again, it remains to be seen whether it's faster than an SQL engine when combined with something like Tokyo Tyrant to provide the needed concurrency capabilities. ..chris From karoly at negyesi.net Tue May 5 22:23:05 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Tue, 5 May 2009 15:23:05 -0700 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> Message-ID: <7e270cea0905051523w2ecc4758t64382f2bd5ada9d8@mail.gmail.com> > Obviously, it is an habit for people to be insulting here. Noone was insulting you until now. Here is a sample of such: STFU, n00b! From m at ooh.dk Tue May 5 22:29:37 2009 From: m at ooh.dk (=?UTF-8?B?TWlra2VsIEjDuGdo?=) Date: Wed, 6 May 2009 00:29:37 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <9ea8d6030905051502s22c42be3ve81cb52eba5c5fe2@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <9ea8d6030905051502s22c42be3ve81cb52eba5c5fe2@mail.gmail.com> Message-ID: <52d800cd0905051529n6f676a8eq840d6cd0cc64023@mail.gmail.com> On Wed, May 6, 2009 at 12:02 AM, Chris Johnson wrote: > CouchDB is a RESTful web service package, which has a storage engine > that uses MVCC (Postgres, Oracle, InnoDB), and b-tree indexes (used by > most RDBMSs), with sequence ids (supported by most RDBMSs). ?So, > really comparing CouchDB to MySQL or Postgres is to compare apples and > baked tarts made with apples. I'd say that's an awesome analogy. If you're not looking for baked goods, but perhaps apple sauce, raw apples might be preferable? On the other hand, if you intent to consume it with whipped cream anyhow, why not just grab the finished tart while you're at it? > And Tokyo Cabinets -- hmmm. ?Serialized data versus structured data > and database wide unique keys. ?DBM primitives? ?Again, it remains to > be seen whether it's faster than an SQL engine when combined with > something like Tokyo Tyrant to provide the needed concurrency > capabilities. Yeah, unless someone is going to actually try to come up with some real numbers for what it would mean for our use case, this is debate probably going to be a precious waste of bytes ;) From mathews.kyle at gmail.com Tue May 5 22:57:50 2009 From: mathews.kyle at gmail.com (Kyle Mathews) Date: Tue, 5 May 2009 16:57:50 -0600 Subject: [development] Database / SQL future thoughts In-Reply-To: <52d800cd0905051529n6f676a8eq840d6cd0cc64023@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <9ea8d6030905051502s22c42be3ve81cb52eba5c5fe2@mail.gmail.com> <52d800cd0905051529n6f676a8eq840d6cd0cc64023@mail.gmail.com> Message-ID: I'm definitely a database noob so I'm looking for correction -- but isn't the main advantage of CouchDB / Tokyo Cabinet etc. that it's much simpler to spread them horizontally across multiple machines in a similar fashion to memcache? From what I understand, the main problem with MySQL / other traditional databases is that the complexity of your architecture increases dramatically as you go scale beyond one server as you have to deal with all sorts of problems with data replication whereas with CouchDB, it's much more straightforward to spread the data around. Is that correct? Kyle Research Assistant Entrepreneurship and Technology Center @ BYU kyle.mathews2000.com/blog On Tue, May 5, 2009 at 4:29 PM, Mikkel H?gh wrote: > On Wed, May 6, 2009 at 12:02 AM, Chris Johnson > wrote: > > CouchDB is a RESTful web service package, which has a storage engine > > that uses MVCC (Postgres, Oracle, InnoDB), and b-tree indexes (used by > > most RDBMSs), with sequence ids (supported by most RDBMSs). So, > > really comparing CouchDB to MySQL or Postgres is to compare apples and > > baked tarts made with apples. > > I'd say that's an awesome analogy. If you're not looking for baked > goods, but perhaps apple sauce, raw apples might be preferable? > > On the other hand, if you intent to consume it with whipped cream > anyhow, why not just grab the finished tart while you're at it? > > > And Tokyo Cabinets -- hmmm. Serialized data versus structured data > > and database wide unique keys. DBM primitives? Again, it remains to > > be seen whether it's faster than an SQL engine when combined with > > something like Tokyo Tyrant to provide the needed concurrency > > capabilities. > > Yeah, unless someone is going to actually try to come up with some > real numbers for what it would mean for our use case, this is debate > probably going to be a precious waste of bytes ;) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at viapositiva.net Tue May 5 22:09:54 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Tue, 5 May 2009 17:09:54 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> <4A00A7A8.2070502@logrus.com> Message-ID: <7F5A390D-50E4-4C51-9E21-1B147A6E421E@viapositiva.net> On May 5, 2009, at 4:49 PM, Bertrand Mansion wrote: > On Tue, May 5, 2009 at 10:55 PM, Earl Miles wrote: >> Bertrand Mansion wrote: >>> >>> Actually, "views" are inside the database: >>> http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views >>> For example, the Views module would create views in the database >>> directly, instead of storing SQL queries in a table and executing >>> them >>> later. That's more logical. >> >> That's only more logical if you don't actually know what Views >> does. Views >> SQL is not generated ahead of time and then just run on demand, it is >> created as needed based upon the data available. Quite an amount of >> that >> data can change at runtime. > > Yes, it is more logical to have views inside the database, because it > is a database feature, than to store chunks of SQL and serialized PHP > in a database table... I guess you haven't thought about what you > posted before you posted it. I'm not sure you understood what Earl was saying. Views does not store serialized PHP, nor does it store serialized SQL. Views stores descriptive metadata based on high-level Drupal entities (nodes, comments, users, etc), and at runtime builds an appropriate query. Oftentimes they are constructed based on contextual information available only at runtime (the current date, the ID of the currently logged in user, the page that the user is currently on). A stored view in a database is useful, but not at all the same thing. Some plugins for Views take advantage of the ability to modify the query at runtime based on those conditions, so even stored procedures would be an uncomfortable fit. Perhaps Views could *build* stored procs and save them to the database? This is what I meant about understanding how Drupal -- and some of its most-used subsystems -- work. I mean no offense, and it's not about dismissing your suggestions about more efficient storage mechanisms. But details matter in these areas. Understanding the current schemas, and understanding how they are used by existing tools like Views, matters. Let's have these discussions! But also let's make sure that we know what we're talking about, and we're accurate. --Jeff From metzlerd at metzlerd.com Wed May 6 01:39:08 2009 From: metzlerd at metzlerd.com (David Metzler) Date: Tue, 5 May 2009 18:39:08 -0700 Subject: [development] Database / SQL future thoughts In-Reply-To: <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <32994.193.26.4.35.1241527564.squirrel@sflink.net> <9ea8d6030905050800n28cc1fb4n712791e76997155@mail.gmail.com> <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> Message-ID: Hey Chris, I'm probably not the person you aimed this discussion at but I do have something that might be relevant. (I'm just a lowly contrib developer, but I do have a few years of drupal dev under my belt). If I understand correctly where Drupal is going with storage abstraction, I can't see Bigtable as a viable replacement for SQL, so I think I'm in the same camp as you, but I do see folks starting to get interested in using the right storage mechanism for the right task. The PDO SQLLite discussion we had a while ago was I think somewhat analogous. (although admittedly not the same) I could see using some kind of BigTable style storage for storing the cached data for drupal and therefore scaling cached pages across servers. Then the cache wouldn't rely strongly on the important relational data in a backend mysql or postgres engine. This seems like a productive use of those kind of storage techniques. I could even see caching common search results using the cache api in the search module (if it doesn't already). There are many in this community who will, rightly so, express concern about the added complexity of relying on multiple storage engines, but this is one case where I think the results might be worth it. Dave On May 5, 2009, at 9:23 AM, Chris Johnson wrote: > Perhaps before this discussion gets too far astray -- or maybe such > digression is impossible to avoid! :-) > > My point in posting this was to elicit folks who were interested in > the database usage and performance for the core parts of Drupal, and > in particular the folks who I through the past years have observed as > being especially astute and involved (and if I left your name off that > short list, it's only because I forgot your name or other such failure > on my part -- no slight or insult intended). > > I was particularly hopeful that folks would read the comments, and > take to heart those written in favor of SQL, such as those by Robert > Young. I didn't want to bias the conversation by injecting my opinion > too early, but I'm in the camp that says things like BigTable are > really just reinventions of older technology, AND that the death of > RDBMS/SQL is not nearly as soon as some might think. > > For Drupal, I think it may make sense to attempt to make the SQL as > simple as possible, avoiding the really complex capabilities and doing > more of that work in PHP, where most of the developers actually have > some expertise. This is especially true since MySQL's MyISAM table > engine is really poor at doing anything beyond that. If we were to > move to using MVCC[1] engines like Postgres, Oracle and MySQL with > InnoDB or Falcon, then more complex SQL would be useful. > Unfortunately, most Drupal developers don't have the SQL skills > needed, and even worse, most people are not going to have the ability > to physically optimize the database for performance (i.e. skilled DBA > person, access to MySQL settings at most hosting services, etc.). > > Hence, the former course of using only the simplest, most primitive > SQL statements appeals to me for Drupal. > > It's that last point I'd really like to have criticized. Is it > possible to do that? Especially in light of DBTNG, where is the line > between simple statements and complex statements? > > Lastly, although many Drupal-based sites are database limited, many > are PHP-code interpretation (# of files/lines parsed) or bandwidth > (fast JS/image pages) limited, too. My goal is simple: make my > hundred module websites respond in less than 2 seconds! :-D > > Thanks for participating in this discussion, no matter which > tangent you're on. > > ..chris > > [1] http://en.wikipedia.org/wiki/Multiversion_concurrency_control From mail at webthatworks.it Wed May 6 02:02:27 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 6 May 2009 04:02:27 +0200 Subject: [development] global object to push stuff into In-Reply-To: References: <20090505181907.745845b2@dawn.webthatworks.it> Message-ID: <20090506040227.6f6deb06@dawn.webthatworks.it> On Tue, 5 May 2009 11:41:47 -0500 Jeff Eaton wrote: > On May 5, 2009, at 11:19 AM, Ivan Sergio Borgonovo wrote: > > > So there is no way to edit in a structured way head. > > In Drupal 7, I'd really love to see the globally alterable $page > array become a place where this stuff lives. hook_page_alter > already exists... OK... the method to write there is getting simpler and simpler but there is still just a drupal_get_html_head in D7 too. I`d say is just a matter of giving a more fine grained structure to head. Is there anything else worth to support other than: META http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.4 LINK http://www.w3.org/TR/html401/struct/links.html rendering an arrays that represent the above shouldn`t be hard. I think we can`t have a pure push or pull approach eg. for description. Taxonomy may decide to fill description but the administrator may like to have a description formed by node title + taxonomy terms or node title and publishing date etc... Anyway having a more structured HEAD may help both push and pull approach. eg. a module that doesn`t produce nodes but just "pages" may decide to push some content in the META description. An "arbitrator" as nodewords may decide to pull from nodes and taxonomies (views etc...) some information, mix it in the description. Another module may act just before page rendering and concatenate some more stuff to what the "arbitrator" did. eg. "Lamborghini Countach in Cars ? Sport Cars, hot topic" title + taxonomy + added by module Anyway accessing a standard array may help modules interact better. Somehow my "home-brewed" module already offers a global object which store an array and offer some methods to deal with the most common operations on keywords and description and then, at least for D5 I added some code in the page template. In D6 I could use prerender hook. -- Ivan Sergio Borgonovo http://www.webthatworks.it From larry at garfieldtech.com Wed May 6 02:55:52 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Tue, 5 May 2009 21:55:52 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> Message-ID: <200905052155.53098.larry@garfieldtech.com> On Tuesday 05 May 2009 8:39:08 pm David Metzler wrote: > Hey Chris, > > I'm probably not the person you aimed this discussion at but I do > have something that might be relevant. (I'm just a lowly contrib > developer, but I do have a few years of drupal dev under my belt). > > If I understand correctly where Drupal is going with storage > abstraction, I can't see Bigtable as a viable replacement for SQL, so > I think I'm in the same camp as you, but I do see folks starting to > get interested in using the right storage mechanism for the right > task. The PDO SQLLite discussion we had a while ago was I think > somewhat analogous. (although admittedly not the same) > > I could see using some kind of BigTable style storage for storing the > cached data for drupal and therefore scaling cached pages across > servers. Then the cache wouldn't rely strongly on the important > relational data in a backend mysql or postgres engine. This seems > like a productive use of those kind of storage techniques. I could > even see caching common search results using the cache api in the > search module (if it doesn't already). > > There are many in this community who will, rightly so, express > concern about the added complexity of relying on multiple storage > engines, but this is one case where I think the results might be > worth it. > > Dave In many many cases, the storage engine depends on your scale. For the run of the mill Drupal site, for instance, MySQL-based caching is perfectly fine and is also the lowest barrier to entry (since the main system runs on SQL). For higher end sites, memcache, CouchDB, Flatfile, or whatever else could make more sense. Fortunately those high end sites are also the ones run by people who, if we provide them with proper mechanisms to swap out backends cleanly, would know how to do so and why. So we just need to make more key parts of Drupal pluggable and those who actually care about such differences can leverage them as appropriate, and those who don't need to care won't have to. -- Larry Garfield larry at garfieldtech.com From jeff at viapositiva.net Wed May 6 03:40:41 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Tue, 5 May 2009 22:40:41 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: <200905052155.53098.larry@garfieldtech.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> <200905052155.53098.larry@garfieldtech.com> Message-ID: On May 5, 2009, at 9:55 PM, Larry Garfield wrote: > So we just need to make more key parts of Drupal pluggable and those > who > actually care about such differences can leverage them as > appropriate, and > those who don't need to care won't have to. This principle is probably important enough to be enshrined as one of Drupal's core values. --Jeff From mroswell at gmail.com Wed May 6 11:19:23 2009 From: mroswell at gmail.com (Margie Roswell) Date: Wed, 6 May 2009 07:19:23 -0400 Subject: [development] Issue queue links from project pages? Message-ID: What happened to the issue queue links from project pages? Can they be restored? Best, Margie -- http://www.BaltimoreUrbanAg.org http://www.FriendlyCoffeehouse.org http://www.packtpub.com/drupal-5-views-recipes/book -------------- next part -------------- An HTML attachment was scrubbed... URL: From earnie at users.sourceforge.net Wed May 6 11:27:48 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 06 May 2009 11:27:48 +0000 Subject: [development] Issue queue links from project pages? In-Reply-To: References: Message-ID: <20090506112748.90427e1yucnwbw8w@mail.siebunlimited.com> Quoting Margie Roswell : > What happened to the issue queue links from project pages? Can they be > restored? > Issue queue to report this to is ``Drupal webmasters''. Check to see if it has been reported already. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From cxjohnson at gmail.com Wed May 6 15:48:39 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Wed, 6 May 2009 10:48:39 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> <200905052155.53098.larry@garfieldtech.com> Message-ID: <9ea8d6030905060848i664ba8bbsc6df075630d913bf@mail.gmail.com> On Tue, May 5, 2009 at 10:40 PM, Jeff Eaton wrote: > On May 5, 2009, at 9:55 PM, Larry Garfield wrote: > >> So we just need to make more key parts of Drupal pluggable and those who >> actually care about such differences can leverage them as appropriate, and >> those who don't need to care won't have to. > > This principle is probably important enough to be enshrined as one of > Drupal's core values. > > --Jeff > Excellent point, Jeff. If we provide pluggable subsystems and good APIs, then people can use the "right tool" for the job. I'd like to learn more about how CouchDB and Tokyo Cabinets can be scaled horizontally more easily than SQL. As many of us know, it's not easy with engines like MySQL and Postgres. Surely other technologies would face similar hurdles to ensuring coherency and reliability of the data, and hence would likewise have technical challenges in scaling -- wouldn't they? Thanks for directing attention to this presumed advantage, Kyle. David Metzler -- everyone is welcome to join the conversation, of course -- else why post to a list with thousands of subscribers? Thanks for your input. ..chris From michael at favias.org Wed May 6 16:23:22 2009 From: michael at favias.org (Michael Favia) Date: Wed, 06 May 2009 11:23:22 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: <7F5A390D-50E4-4C51-9E21-1B147A6E421E@viapositiva.net> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <3861c6770905050718s389a44f4s4d2d1786f69a5de2@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <7F5A390D-50E4-4C51-9E21-1B147A6E421E@viapositiva.net> Message-ID: <4A01B97A.1060801@favias.org> Jeff Eaton wrote: > I'm not sure you understood what Earl was saying. Views does not store > serialized PHP, nor does it store serialized SQL. What exactly is serialized PHP? Does he mean serialized objects/variables because views DOES store those (in views_object_cache) but I suppose it is irrelevant anyway. The real meat of the topic you mention below. > > Views stores descriptive metadata based on high-level Drupal entities > (nodes, comments, users, etc), and at runtime builds an appropriate > query. Oftentimes they are constructed based on contextual information > available only at runtime (the current date, the ID of the currently > logged in user, the page that the user is currently on). A stored view > in a database is useful, but not at all the same thing. Some plugins > for Views take advantage of the ability to modify the query at runtime > based on those conditions, so even stored procedures would be an > uncomfortable fit. Perhaps Views could *build* stored procs and save > them to the database? There would have to be some significant performance improvements to justify pushing these views into the database in this developers opinion. To do so effectively views would have to actually monitor database schema changes (either through a DBTNG callback or another observable method) and change the stored database VIEWS so that they remain valid queries. This is opposed to the way it conveniently and intelligently "ignores" non conforming views object data presently. It would also prohibit the dynamic adjustment of views at runtime to a certain extent. I DO like how sucha solution would push caching upstream where it can be argued it belongs but I don't know if its worth it with the mysql query cache, etc. > Let's have these discussions! But also let's make sure that we know > what we're talking about, and we're accurate. Thank you Jeff for seeing the issue past the person who poorly raised it. There is possible value in part of his argument but, is it enough to justify the opportunity cost of working on it and the sacrificed functionality we'd be asking of the views module? Views generation isn't much of a lag on my sites because they don't have millions of nodes, etc. So for me the answer is no, Earls solution to date fits my use case very well, but perhaps I'm an outlier. From karoly at negyesi.net Wed May 6 16:27:15 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Wed, 6 May 2009 09:27:15 -0700 Subject: [development] Database / SQL future thoughts In-Reply-To: <4A01B97A.1060801@favias.org> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <7F5A390D-50E4-4C51-9E21-1B147A6E421E@viapositiva.net> <4A01B97A.1060801@favias.org> Message-ID: <7e270cea0905060927t63b03fb4v3998d20157fc955f@mail.gmail.com> > There would have to be some significant performance improvements to justify > pushing these views into the database in this developers opinion. If my understanding is correct then that's what David Strauss' materialized views do. From vlado at dikini.net Wed May 6 14:28:33 2009 From: vlado at dikini.net (Vladimir Zlatanov) Date: Wed, 06 May 2009 15:28:33 +0100 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <9ea8d6030905051502s22c42be3ve81cb52eba5c5fe2@mail.gmail.com> <52d800cd0905051529n6f676a8eq840d6cd0cc64023@mail.gmail.com> Message-ID: <1241620113.10408.60.camel@localhost.localdomain> On Tue, 2009-05-05 at 16:57 -0600, Kyle Mathews wrote: > I'm definitely a database noob so I'm looking for correction -- but > isn't the main advantage of CouchDB / Tokyo Cabinet etc. that it's > much simpler to spread them horizontally across multiple machines in a > similar fashion to memcache? no. their difference from the sql model is their advantage, for some use cases. there is no panacea, if somebody tries to sell you that, remember the snake oils of old. > From what I understand, the main problem with MySQL / other > traditional databases is that the complexity of your architecture > increases dramatically as you go scale beyond one server as you have > to deal with all sorts of problems with data replication whereas with > CouchDB, it's much more straightforward to spread the data around. Is > that correct? All database systems, which support updates, have the same difficulties regarding replication - they stem from the fact that the updates across replicas are non-deterministic and you need to synchronise, which is a tough job, each solution has its cons and has pros. Why people use key/value stores (plug your own) instead of sql? Well sql is not a panacea either. SQL is good to use where your data roughly fits the relational (sorry) model. Take the example with trees. Parent-child relations. If you store the tree directly, in some kind of a tree store, traversing it will obviously be fast. Faster, than simulating it using n SQL queries. You could roll some stored procedures, the way Celko advocates, but you will end up with log n queries on the inside, rather than one. Then again. If you can actually map your tree to a number scheme, and have the required queries defined on those numbers, then you could probably do it using only one query, probably quite fast. The key is to make the db do most of the work. The problem is this doesn't work for most kinds of tree or graph data :( Some mappings either don't exist or are yet to be discovered. From larry at garfieldtech.com Wed May 6 18:17:19 2009 From: larry at garfieldtech.com (larry at garfieldtech.com) Date: Wed, 06 May 2009 13:17:19 -0500 Subject: [development] Database / SQL future thoughts In-Reply-To: <7e270cea0905060927t63b03fb4v3998d20157fc955f@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <7F5A390D-50E4-4C51-9E21-1B147A6E421E@viapositiva.net> <4A01B97A.1060801@favias.org> <7e270cea0905060927t63b03fb4v3998d20157fc955f@mail.gmail.com> Message-ID: <4A01D42F.4030005@garfieldtech.com> Karoly Negyesi wrote: >> There would have to be some significant performance improvements to justify >> pushing these views into the database in this developers opinion. > > If my understanding is correct then that's what David Strauss' > materialized views do. Eh, not really. They're a sort of manual optimization and re-indexing using data duplication. Ideally the database should be able to do that internally on its own. Most don't. MVs are not moving the hard work of Views.module to the database. They're moving the hard work of the database to cached user code. If MySQL had built-in materialized views, then we could push the hard work on to the database and it would do that sort of pre-generation itself. Sadly it doesn't, so its "views" are really just syntax nicety. --Larry Garfield From drupal at dwwright.net Wed May 6 19:05:37 2009 From: drupal at dwwright.net (Derek Wright) Date: Wed, 6 May 2009 12:05:37 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: References: Message-ID: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> On May 6, 2009, at 4:19 AM, Margie Roswell wrote: > What happened to the issue queue links from project pages? Can they > be restored? Yes, the issue queue would have been the right place to ask this. However, since a fair number of people seem to have missed it, I'll also answer here... Yesterday I rolled out some changes to the project pages which are incremental steps towards the redesigned drupal.org. In particular, there are 3 new blocks on the right sidebar for each project: 1) "Maintainers for XXX" - with the names of the most recent people with CVS access who committed to the project, some stats about their commit history, and a link to a page with all committers to the project (which would include translation commits, previous maintainers, etc). http://drupal.org/node/371969 2) What we're internally calling the "Issue cockpit" block -- search box, stats about # of open vs. total issues (and the subset of those that are bugs), direct links to advanced search, e-mail subscribe, etc. http://drupal.org/node/425728 3) "Recent issues" -- 5 most recent open issues in the queue. http://drupal.org/node/22402 Therefore, the wall of links below the release table is mostly gone in favor of these blocks. Enjoy, -Derek (dww) p.s. Thanks to the SF d.o redesign sprint in general, and Mark "mfb" Burdett (http://drupal.org/user/12302) in particular, for helping making these blocks a reality. From sirkitree at gmail.com Wed May 6 19:14:45 2009 From: sirkitree at gmail.com (Jerad Bitner) Date: Wed, 6 May 2009 12:14:45 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> Message-ID: <215a89c90905061214m10893f35u612d0731118fc7ab@mail.gmail.com> These are a great improvement Derek, but where are announcements of major changes like this made? On Wed, May 6, 2009 at 12:05 PM, Derek Wright wrote: > > On May 6, 2009, at 4:19 AM, Margie Roswell wrote: > > What happened to the issue queue links from project pages? Can they be >> restored? >> > > > Yes, the issue queue would have been the right place to ask this. However, > since a fair number of people seem to have missed it, I'll also answer > here... > > Yesterday I rolled out some changes to the project pages which are > incremental steps towards the redesigned drupal.org. In particular, there > are 3 new blocks on the right sidebar for each project: > > 1) "Maintainers for XXX" - with the names of the most recent people with > CVS access who committed to the project, some stats about their commit > history, and a link to a page with all committers to the project (which > would include translation commits, previous maintainers, etc). > http://drupal.org/node/371969 > > 2) What we're internally calling the "Issue cockpit" block -- search box, > stats about # of open vs. total issues (and the subset of those that are > bugs), direct links to advanced search, e-mail subscribe, etc. > http://drupal.org/node/425728 > > 3) "Recent issues" -- 5 most recent open issues in the queue. > http://drupal.org/node/22402 > > > Therefore, the wall of links below the release table is mostly gone in > favor of these blocks. > > > Enjoy, > -Derek (dww) > > > p.s. Thanks to the SF d.o redesign sprint in general, and Mark "mfb" > Burdett (http://drupal.org/user/12302) in particular, for helping making > these blocks a reality. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m at ooh.dk Wed May 6 19:27:03 2009 From: m at ooh.dk (=?UTF-8?B?TWlra2VsIEjDuGdo?=) Date: Wed, 6 May 2009 21:27:03 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: <4A01D42F.4030005@garfieldtech.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <7F5A390D-50E4-4C51-9E21-1B147A6E421E@viapositiva.net> <4A01B97A.1060801@favias.org> <7e270cea0905060927t63b03fb4v3998d20157fc955f@mail.gmail.com> <4A01D42F.4030005@garfieldtech.com> Message-ID: <52d800cd0905061227j1eac84d3xbf6c75b009561e51@mail.gmail.com> On Wed, May 6, 2009 at 8:17 PM, larry at garfieldtech.com wrote: > If MySQL had built-in materialized views, then we could push the hard work > on to the database and it would do that sort of pre-generation itself. > ?Sadly it doesn't, so its "views" are really just syntax nicety. Well, I don't know about MySQL, but in PostgreSQL there is actually a slight performance gain from using database views, in that it shaves off almost all the processing and query plan generation, so most of the steps besides executing the actual query are skipped when using a view. That is a double-edge sword, however, since the query plan generated for one set of parameters might not be all that suitable given another set of parameters, so it'll have to be thought through carefully. When you have a view, generating a materialised view can be achieved with a bit of clever PL/pgSQL code. Sadly, I don't currently have any Drupal sites under my care that would warrant spending the time to do such things, but I find that there can be a lot of improvements by just going "closer to the metal". Taking the query from Views.module, optimising it, and moving it into a standard hook_menu page callback will also shave a bit of load off both the frontend and the database server on heavily visited pages :) -- Kind regards, Mikkel H?gh From earnie at users.sourceforge.net Wed May 6 20:31:22 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 06 May 2009 20:31:22 +0000 Subject: [development] Issue queue links from project pages? In-Reply-To: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> Message-ID: <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> Quoting Derek Wright : > > On May 6, 2009, at 4:19 AM, Margie Roswell wrote: > >> What happened to the issue queue links from project pages? Can they >> be restored? > > > Yes, the issue queue would have been the right place to ask this. > However, since a fair number of people seem to have missed it, I'll > also answer here... > Thanks for the FYI Derek. The changes look great. Congrats to all involved in making the change a reality. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From news at unleashedmind.com Wed May 6 21:07:01 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Wed, 6 May 2009 23:07:01 +0200 Subject: [development] Issue queue links from project pages? In-Reply-To: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> Message-ID: <164c01c9ce8e$99d52390$0200a8c0@structworks.com> Awesome work, Derek, Mark & SF d.o redesign sprinters! For those who use it, the "drupal.org unleashed" userstyle has been updated accordingly to account for the changes: http://userstyles.org/styles/11133 Enjoy! sun From drupal at dwwright.net Wed May 6 21:31:43 2009 From: drupal at dwwright.net (Derek Wright) Date: Wed, 6 May 2009 14:31:43 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <215a89c90905061214m10893f35u612d0731118fc7ab@mail.gmail.com> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <215a89c90905061214m10893f35u612d0731118fc7ab@mail.gmail.com> Message-ID: On May 6, 2009, at 12:14 PM, Jerad Bitner wrote: > where are announcements of major changes like this made? In place? ;) Seriously, I don't have a good answer for this. I was thinking about it the other night, in fact. For the interested reader: Add a "drupal.org news" block or something http://drupal.org/node/455636 Cheers, -Derek (dww) p.s. I tried to send this earlier, but it didn't seem to go through. Apologies in advance if this shows up twice... From drupal at dave-cohen.com Wed May 6 20:24:51 2009 From: drupal at dave-cohen.com (David Cohen) Date: Wed, 06 May 2009 13:24:51 -0700 Subject: [development] hook_user('categories') In-Reply-To: <1240962721.15991.1312811499@webmail.messagingengine.com> References: <1240962721.15991.1312811499@webmail.messagingengine.com> Message-ID: <1241641491.29153.1314159367@webmail.messagingengine.com> Thanks to those who replied to this thread. Clearly this problem has been encountered before and solved in different ways. Here's what I ended up with... hook_user('categories') causes new menu items to be created. And it honors the 'access callback' and 'access arguments' that are returned by hook_user('categories'). Because these are honored I did not have to implement hook_menu or menu_alter. But its undocumented, tricky to get parameters right, and likely to break in future drupal (but then what isn't?) in hook_user('categories') I return an array containing: $items[] = array('name' => $fb_app->label, 'title' => $fb_app->title, 'access callback' => 'fb_permission_access_own', 'access arguments' => array(1, 'edit own extended permissions'), 'weight' => 2); Then I define fb_permission_access_own(), a wrapper around user_access that ensures the user is operating on her own account: function fb_permission_access_own($account, $perm) { return ($GLOBALS['user']->uid == $account->uid && user_access($perm)); } Et viola! -Dave On Tue, 28 Apr 2009 16:52 -0700, "David Cohen" wrote: > Sometime in the 5.x-6.x timeframe, the API for hook_user($op == > 'categories') changed in a major way. No longer is the $account > parameter passed in, and I think the data structure to be returned > gained a lot of options. But I can't find the documentation for this. > Its not in the 5.x to 6.x page on d.o (http://drupal.org/node/114774), > nor is it reflected on http://api.drupal.org/api/function/hook_user/6. > > Can someone point me to general doc, or an example of how to emulate the > following logic in D6. The logic is basically to show the user an edit > category only if they have permission to change their own settings. > > if ($op == 'categories') { > if (user_access('edit own extended permissions') && > $user->uid == $account->uid) { > // build the data structure > } > } > > The above logic wont apply in D6 because $account is not passed in, and > the return value is expected to have new menu data structure elements > which take the place of that logic. But I'm struggle to figure out, in > part because I can't find the doc. > > thanks. > From earnie at users.sourceforge.net Wed May 6 20:26:32 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 06 May 2009 20:26:32 +0000 Subject: [development] Database / SQL future thoughts In-Reply-To: <52d800cd0905061227j1eac84d3xbf6c75b009561e51@mail.gmail.com> References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <4A00A7A8.2070502@logrus.com> <7F5A390D-50E4-4C51-9E21-1B147A6E421E@viapositiva.net> <4A01B97A.1060801@favias.org> <7e270cea0905060927t63b03fb4v3998d20157fc955f@mail.gmail.com> <4A01D42F.4030005@garfieldtech.com> <52d800cd0905061227j1eac84d3xbf6c75b009561e51@mail.gmail.com> Message-ID: <20090506202632.36934c8ipu94zcmc@mail.siebunlimited.com> Quoting Mikkel H?gh : > On Wed, May 6, 2009 at 8:17 PM, larry at garfieldtech.com > wrote: >> If MySQL had built-in materialized views, then we could push the hard work >> on to the database and it would do that sort of pre-generation itself. >> Sadly it doesn't, so its "views" are really just syntax nicety. > > Well, I don't know about MySQL, but in PostgreSQL there is actually a > slight performance gain from using database views, in that it shaves > off almost all the processing and query plan generation, so most of > the steps besides executing the actual query are skipped when using a > view. > You may also gain efficiency in the code which would reduce the processing time of PHP if a database view defines the common joins of the tables. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From drupal at dwwright.net Wed May 6 20:26:28 2009 From: drupal at dwwright.net (Derek Wright) Date: Wed, 6 May 2009 13:26:28 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <215a89c90905061214m10893f35u612d0731118fc7ab@mail.gmail.com> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <215a89c90905061214m10893f35u612d0731118fc7ab@mail.gmail.com> Message-ID: <1067E0EF-1338-4D86-AFBE-4548C611FE05@dwwright.net> On May 6, 2009, at 12:14 PM, Jerad Bitner wrote: > These are a great improvement Derek, but where are announcements of > major changes like this made? In place? ;) Seriously, I don't have a good answer for this. I was thinking about it the other night, in fact. For the interested reader: Add a "drupal.org news" block or something http://drupal.org/node/455636 Cheers, -Derek (dww) From mroswell at gmail.com Wed May 6 20:36:18 2009 From: mroswell at gmail.com (Margie Roswell) Date: Wed, 6 May 2009 16:36:18 -0400 Subject: [development] Issue queue links from project pages? In-Reply-To: <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> Message-ID: I'm not getting it. The issues block disappears when you're actually in the issue queue. Can the Issues and Recent Issues blocks be made to display when we're actually in the issue queue? I'm still wrinkling my eyebrows in puzzlement. Ready to catch a train (sans internet), but will check those links when I'm home in a few hours. Best, Margie, On Wed, May 6, 2009 at 4:31 PM, Earnie Boyd wrote: > Quoting Derek Wright : > > >> On May 6, 2009, at 4:19 AM, Margie Roswell wrote: >> >> What happened to the issue queue links from project pages? Can they be >>> restored? >>> >> >> >> Yes, the issue queue would have been the right place to ask this. >> However, since a fair number of people seem to have missed it, I'll also >> answer here... >> >> > Thanks for the FYI Derek. The changes look great. Congrats to all > involved in making the change a reality. > > > -- > Earnie > -- http://r-feed.com/ -- http://for-my-kids.com/ > -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ > > > -- Margie http://www.BaltimoreUrbanAg.org http://www.FriendlyCoffeehouse.org http://www.packtpub.com/drupal-5-views-recipes/book -------------- next part -------------- An HTML attachment was scrubbed... URL: From drupal at dwwright.net Thu May 7 00:19:53 2009 From: drupal at dwwright.net (Derek Wright) Date: Wed, 6 May 2009 17:19:53 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> Message-ID: <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> On May 6, 2009, at 1:36 PM, Margie Roswell wrote: > I'm not getting it. The issues block disappears when you're actually > in the issue queue. If you already drilled down to the issue queue, why do you still need the summary blocks? > Can the Issues and Recent Issues blocks be made to display when > we're actually in the issue queue? A) Seems like a huge waste of screen real estate. I'd rather there were no blocks on the issue queue pages, frankly. B) That's technically hard because the view isn't registering itself in the menu system in such a way that menu_get_object() can find the $project context so that the block knows this is a page associated with a given project. (Sorry if that doesn't make sense, see http://drupal.org/node/431726 for a little background if that helps). We *could* hard-code some hacks into the block to still sort of make this work, but it'd be ugly, and IMHO not worth it, especially since I don't want these blocks (any blocks, really) to show up on the issue queue pages... -Derek (dww) From mroswell at gmail.com Thu May 7 01:07:47 2009 From: mroswell at gmail.com (Margie Roswell) Date: Wed, 6 May 2009 21:07:47 -0400 Subject: [development] Issue queue links from project pages? In-Reply-To: <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> Message-ID: I decided that I like it. Though I think it would be better if the Maintainers block were listed below the other two issue blocks. The Issues block is the far more important one for most users, and shouldn't risk being too far "below the fold" on mobile devices. I'll be clicking most often on the "x total" link in the Issues block. (I agree that some of the other blocks on the issue queue tend to be extraneous.) Thanks for your work on d.o. Best, Margie On Wed, May 6, 2009 at 8:19 PM, Derek Wright wrote: > > On May 6, 2009, at 1:36 PM, Margie Roswell wrote: > > I'm not getting it. The issues block disappears when you're actually in >> the issue queue. >> > > If you already drilled down to the issue queue, why do you still need the > summary blocks? > > Can the Issues and Recent Issues blocks be made to display when we're >> actually in the issue queue? >> > > A) Seems like a huge waste of screen real estate. I'd rather there were no > blocks on the issue queue pages, frankly. > > B) That's technically hard because the view isn't registering itself in the > menu system in such a way that menu_get_object() can find the $project > context so that the block knows this is a page associated with a given > project. (Sorry if that doesn't make sense, see > http://drupal.org/node/431726 for a little background if that helps). We > *could* hard-code some hacks into the block to still sort of make this work, > but it'd be ugly, and IMHO not worth it, especially since I don't want these > blocks (any blocks, really) to show up on the issue queue pages... > > -Derek (dww) > > > > -- Margie http://www.BaltimoreUrbanAg.org http://www.FriendlyCoffeehouse.org http://www.packtpub.com/drupal-5-views-recipes/book -------------- next part -------------- An HTML attachment was scrubbed... URL: From gabor at hojtsy.hu Thu May 7 07:32:42 2009 From: gabor at hojtsy.hu (=?ISO-8859-1?Q?G=E1bor_Hojtsy?=) Date: Thu, 7 May 2009 09:32:42 +0200 Subject: [development] Issue queue links from project pages? In-Reply-To: References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> Message-ID: <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> On Thu, May 7, 2009 at 3:07 AM, Margie Roswell wrote: > I decided that I like it. Though I think it would be better if the > Maintainers block were listed below the other two issue blocks. The Issues > block is the far more important one for most users, and shouldn't risk being > too far "below the fold" on mobile devices. Well, the redesign goal is to get people featured: show that there are many individuals working on these projects (bug community); show that they worked recently on the project (or not), and so on. These help show that Drupal is a community and help users to decide whether a project is active or not. This will not be the only way which help people make decisions in module selection, but is part of that. G?bor From tz at it-arts.org Thu May 7 07:32:27 2009 From: tz at it-arts.org (Thomas Zahreddin) Date: Thu, 07 May 2009 09:32:27 +0200 Subject: [development] Database / SQL future thoughts In-Reply-To: References: <9ea8d6030905041211r13e5618bl85e024cbd2684f90@mail.gmail.com> <9ea8d6030905050923y50ea8665r7e4cf835cc27937@mail.gmail.com> <200905052155.53098.larry@garfieldtech.com> Message-ID: <1241681547.8327.25.camel@thomas-desktop> Hi guys, you find a outstanding presentation about the usage of datatypes, storage engines, replication, query optimization .... from the ZendCon2008 http://devzone.zend.com/article/4497 includes slides and audio. Best Thomas Zahreddin With more Code than you can handle, don't ask for more code, ask for more cooperation. From mroswell at gmail.com Thu May 7 11:58:16 2009 From: mroswell at gmail.com (Margie Roswell) Date: Thu, 7 May 2009 07:58:16 -0400 Subject: [development] Issue queue links from project pages? In-Reply-To: <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> Message-ID: I think in this case (of maintainers list being shown above the actual list of issues), that that's a developer-centric goal more than a user-centric goal. Most people already have all sorts of anxiety about "I'm not as good as that." I think the maintainers list could tend to reinforce the star power of a few people, but that's a whole psychological question. A note that I'd rather look at the issue queue itself than a maintainers summary to decide whether to use a module. Anyhow, strong vote here for the issues links having a higher priority than the list of top maintainers. The maintainers list is useful! It's good. But why give links that FEW people will click on a higher listing than links that MANY people will click on? It doesn't make sense. Margie On Thu, May 7, 2009 at 3:32 AM, G?bor Hojtsy wrote: > On Thu, May 7, 2009 at 3:07 AM, Margie Roswell wrote: > > I decided that I like it. Though I think it would be better if the > > Maintainers block were listed below the other two issue blocks. The > Issues > > block is the far more important one for most users, and shouldn't risk > being > > too far "below the fold" on mobile devices. > > Well, the redesign goal is to get people featured: show that there are > many individuals working on these projects (bug community); show that > they worked recently on the project (or not), and so on. These help > show that Drupal is a community and help users to decide whether a > project is active or not. This will not be the only way which help > people make decisions in module selection, but is part of that. > > G?bor > -- Margie http://www.BaltimoreUrbanAg.org http://www.FriendlyCoffeehouse.org http://www.packtpub.com/drupal-5-views-recipes/book -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeff at viapositiva.net Thu May 7 14:23:48 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Thu, 7 May 2009 09:23:48 -0500 Subject: [development] Proposed Apocrypha Message-ID: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> Crell's Law: If an API must be use-case-optimized, make it swappable & tailor the default for cheap shared hosting. High-end sites can swap. Eaton's Corollary: If an API is swappable, write two implementations. APIs with one test case are rarely flexible enough for the second. --eaton From cxjohnson at gmail.com Thu May 7 14:53:31 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Thu, 7 May 2009 09:53:31 -0500 Subject: [development] Proposed Apocrypha In-Reply-To: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> Message-ID: <9ea8d6030905070753u15ad04d9w4ccb355ee953f206@mail.gmail.com> On Thu, May 7, 2009 at 9:23 AM, Jeff Eaton wrote: > Crell's Law: If an API must be use-case-optimized, make it swappable & > tailor the default for cheap shared hosting. High-end sites can swap. > > Eaton's Corollary: If an API is swappable, write two implementations. APIs > with one test case are rarely flexible enough for the second. > > --eaton Choir sings: Amen, Brother Eaton. From mail at webthatworks.it Thu May 7 15:12:19 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Thu, 7 May 2009 17:12:19 +0200 Subject: [development] Proposed Apocrypha In-Reply-To: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> Message-ID: <20090507171219.7732fa0f@dawn.webthatworks.it> On Thu, 7 May 2009 09:23:48 -0500 Jeff Eaton wrote: > Crell's Law: If an API must be use-case-optimized, make it > swappable & tailor the default for cheap shared hosting. High-end > sites can swap. > Eaton's Corollary: If an API is swappable, write two > implementations. APIs with one test case are rarely flexible > enough for the second. If you want to make stuff swappable start at least with 3 implementations otherwise 2 will just be a special case of 1. -- Ivan Sergio Borgonovo http://www.webthatworks.it From mail at webthatworks.it Thu May 7 15:17:35 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Thu, 7 May 2009 17:17:35 +0200 Subject: [development] drupal_add_head -> $page[hook_alter_page Re: global object to push stuff into In-Reply-To: References: <20090505181907.745845b2@dawn.webthatworks.it> Message-ID: <20090507171735.3308ce41@dawn.webthatworks.it> On Tue, 5 May 2009 11:41:47 -0500 Jeff Eaton wrote: > On May 5, 2009, at 11:19 AM, Ivan Sergio Borgonovo wrote: > > > So there is no way to edit in a structured way head. > In Drupal 7, I'd really love to see the globally alterable $page > array become a place where this stuff lives. hook_page_alter > already exists... I was giving a look to the current status of D7 and trying to understand how to put stuff in the $page. I like the $page approach too compared to the drupal_add_* since $page doesn`t look as a global (am I right?) There are really few places that use _page_alter that could be a guide to understand how $page look like. book_page_alter (no use) block_page_alter Furthermore I think that just finding a place in $page is solving half the problem. I can`t think of any way a _page_alter could get the content of a *part* of a page and modify it that could be general enough to provide some standard method to help modifying it. I`m just guessing since it seems to appear that a $page is mainly constituted by regions and blocks but then everything become arbitrary html. But head has a more regular content with some rules that makes some modifications meaningless and somehow can contain much less variety. Maybe a set of helpers that will make it easy to access/modify a $page['head'] and every module that need to modify head could do so in hook_alter_page? Having a structured head implies having a renderer/theme function (am I right?) This should support everything that already ends up in head... namely LINK [1] and META Is there anything else that could end up in head? I didn`t see anything else at w3c. META http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.4 LINK http://www.w3.org/TR/html401/struct/links.html Maybe we could have a structured $page['head'][..] + an unstructured $page['head']['markup'] There is also this "orphan": meta_generator_header that could be treated more uniformly thanks for any input BTW I`ve noticed that head is filled several times (?) by: system_preprocess_page emplate_preprocess_book_export_html template_preprocess_maintenance_page and template_preprocess_page is it correct? [1] is it ok to use drupal_add_html_head in openid_test_html_openid1 openid_test_html_openid2 openid_test_yadis_http_equiv in spite of drupal_add_link ? -- Ivan Sergio Borgonovo http://www.webthatworks.it From greg.knaddison at gmail.com Thu May 7 15:25:53 2009 From: greg.knaddison at gmail.com (Greg Knaddison) Date: Thu, 7 May 2009 09:25:53 -0600 Subject: [development] Proposed Apocrypha In-Reply-To: <20090507171219.7732fa0f@dawn.webthatworks.it> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <20090507171219.7732fa0f@dawn.webthatworks.it> Message-ID: <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> On Thu, May 7, 2009 at 9:12 AM, Ivan Sergio Borgonovo wrote: > On Thu, 7 May 2009 09:23:48 -0500 > Jeff Eaton wrote: > >> Crell's Law: If an API must be use-case-optimized, make it >> swappable & tailor the default for cheap shared hosting. High-end >> sites can swap. > >> Eaton's Corollary: If an API is swappable, write two >> implementations. APIs with one test case are rarely flexible >> enough for the second. > > If you want to make stuff swappable start at least with 3 > implementations otherwise 2 will just be a special case of 1. We have to temper the ideal with reality. We have several swappable systems in Drupal (database, mail sending, caching, others?) and as far as I know only one of them has multiple backends in core (databases). We are able to have multiple backend for databases, but it takes a lot of effort. I doubt we have the capacity to create not just 2, but 3 implementations for all of the other swappable items in core. There's also the question of baggage. Do we really want to merge SMTP [1] and Fastpath FSCache[2] into core? Would that be a total improvement? Would the additional complexity (usability decrease) be worth it just so we can satisfy a desire to properly test that APIs? And three cheers for Crell's Law and Eaton's Corollary. Cheers, Greg -- Greg Knaddison | 303-800-5623 | http://growingventuresolutions.com Cracking Drupal - Learn to protect your Drupal site from hackers Now available from Wiley http://crackingdrupal.com From weitzman at tejasa.com Thu May 7 15:27:25 2009 From: weitzman at tejasa.com (Moshe Weitzman) Date: Thu, 7 May 2009 11:27:25 -0400 Subject: [development] drupal_add_head -> $page[hook_alter_page Re: global object to push stuff into In-Reply-To: <20090507171735.3308ce41@dawn.webthatworks.it> References: <20090505181907.745845b2@dawn.webthatworks.it> <20090507171735.3308ce41@dawn.webthatworks.it> Message-ID: <6117a7500905070827s6b5ce100yc9b10ab82948c969@mail.gmail.com> > Having a structured head implies having a renderer/theme function (am > I right?) yes. but core provides some basic ones like #markup so we may not need anything new. a $page['head'] array sounds good to me. From jeff at viapositiva.net Thu May 7 15:34:53 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Thu, 7 May 2009 10:34:53 -0500 Subject: [development] Proposed Apocrypha In-Reply-To: <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <20090507171219.7732fa0f@dawn.webthatworks.it> <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> Message-ID: <768D67F4-0FDE-479A-B4F0-75289C33374A@viapositiva.net> On May 7, 2009, at 10:25 AM, Greg Knaddison wrote: > We have to temper the ideal with reality. We have several swappable > systems in Drupal (database, mail sending, caching, others?) and as > far as I know only one of them has multiple backends in core > (databases). We are able to have multiple backend for databases, but > it takes a lot of effort. I doubt we have the capacity to create not > just 2, but 3 implementations for all of the other swappable items in > core. There's also the question of baggage. Do we really want to > merge SMTP [1] and Fastpath FSCache[2] into core? Would that be a > total improvement? Would the additional complexity (usability > decrease) be worth it just so we can satisfy a desire to properly test > that APIs? Also, the rules and corollaries I'm brainstorming are limited by the fact that I'm trying to fit them into Twitter-compatible 140-character snippets. It's a nice exercise in simplicity when explaining principles can easily veer into long digressions. ;-) I agree that three implementations is better, because we're more likely to run into REAL variations, but as you say it's not necessarily realistic that very new API have three fully fleshed out example implementations. We can work towards it, and encourage it, but it's the "only one implementation" scenario that should really set off warning lights when we see it. The "write two" is mostly about smoke- testing for 'fake APIs' that look like swappable subsystems but are still too anchored to the original implementation to be replaceable. Also, I don't think we necessarily HAVE to include each of our test implementations in core. But we should at least write them whenever possible, to flush out problems and also to reveal areas where 'perfect flexibility' isn't worth the overhead. (A persistence layer that can use SQL databases or XML files would be terribly flexible but probably not worth the work, for example.) -eaton From catch56 at googlemail.com Thu May 7 15:43:44 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Thu, 7 May 2009 16:43:44 +0100 Subject: [development] Proposed Apocrypha In-Reply-To: <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <20090507171219.7732fa0f@dawn.webthatworks.it> <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> Message-ID: > We have to temper the ideal with reality. We have several swappable > systems in Drupal (database, mail sending, caching, others?) and as > far as I know only one of them has multiple backends in core > (databases). We are able to have multiple backend for databases, but > it takes a lot of effort. I doubt we have the capacity to create not > just 2, but 3 implementations for all of the other swappable items in > core. There's also the question of baggage. Do we really want to > merge SMTP [1] and Fastpath FSCache[2] into core? Would that be a > total improvement? Would the additional complexity (usability > decrease) be worth it just so we can satisfy a desire to properly test > that APIs? I don't think so. But we could say we won't release Drupal 7until at least one swappable backend is ported in contrib. To some extent this is the same thing as getting Drupal.org running on a beta/RC before release - at least for critical systems like caching. Nat -------------- next part -------------- An HTML attachment was scrubbed... URL: From kb at 2bits.com Thu May 7 15:48:17 2009 From: kb at 2bits.com (Khalid Baheyeldin) Date: Thu, 7 May 2009 11:48:17 -0400 Subject: [development] Proposed Apocrypha In-Reply-To: <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <20090507171219.7732fa0f@dawn.webthatworks.it> <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> Message-ID: <4a9fdc630905070848l7fe91ce4t2812232e31117a52@mail.gmail.com> On Thu, May 7, 2009 at 11:25 AM, Greg Knaddison wrote: > On Thu, May 7, 2009 at 9:12 AM, Ivan Sergio Borgonovo > wrote: > > On Thu, 7 May 2009 09:23:48 -0500 > > Jeff Eaton wrote: > > > >> Crell's Law: If an API must be use-case-optimized, make it > >> swappable & tailor the default for cheap shared hosting. High-end > >> sites can swap. > > > >> Eaton's Corollary: If an API is swappable, write two > >> implementations. APIs with one test case are rarely flexible > >> enough for the second. > > > > If you want to make stuff swappable start at least with 3 > > implementations otherwise 2 will just be a special case of 1. > > We have to temper the ideal with reality. We have several swappable > systems in Drupal (database, mail sending, caching, others?) and as > far as I know only one of them has multiple backends in core > (databases). We are able to have multiple backend for databases, but > it takes a lot of effort. I doubt we have the capacity to create not > just 2, but 3 implementations for all of the other swappable items in > core. There's also the question of baggage. Do we really want to > merge SMTP [1] and Fastpath FSCache[2] into core? Would that be a > total improvement? Would the additional complexity (usability > decrease) be worth it just so we can satisfy a desire to properly test > that APIs? > Moreover, The whole idea of making it swappable is to avoid hacking core (and killing kittens) yet be able to customize things in new ways, without being limited by core's strict process and patch cycle. Experimentation is much easier with swappables in contrib. "Never underestimate the power of contrib ..." -- Khalid M. Baheyeldin 2bits.com, Inc. http://2bits.com Drupal optimization, development, customization and consulting. Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra Simplicity is the ultimate sophistication. -- Leonardo da Vinci -------------- next part -------------- An HTML attachment was scrubbed... URL: From drupal at dwwright.net Thu May 7 16:13:20 2009 From: drupal at dwwright.net (Derek Wright) Date: Thu, 7 May 2009 09:13:20 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> Message-ID: <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> On May 7, 2009, at 4:58 AM, Margie Roswell wrote: > The maintainers list is useful! It's good. But why give links that > FEW people will click on a higher listing than links that MANY > people will click on? It doesn't make sense. That's a fine question, but it should ultimately be directed to Mark and Leisa of the drupal.org redesign. They spent a *lot* of time thinking about such things, and they clearly intended for the list of maintainers to be more prominent than the information about issues: http://infrastructure.drupal.org/drupal.org-style-guide/prototype/core.html That said, the project pages themselves was an area that Mark and Leisa admitted they didn't pour nearly as much time into as other parts of the site, so maybe they'll agree that the issue blocks should be more prominent than the maintainers block. I suspect the issues block is going to get far more "action" than the maintainers list. However, the point of the maintainers block isn't necessarily to provide links people click on, but text people read. And data about how many maintainers, who they are, and how active they are is important information for assessing the health of a project. That said, I lean towards moving the issues blocks higher up, but I'm going to defer to Mark and Leisa. I've added this question to the list of things we need them to clarify as we continue to work on implementing and deploying the redesign[1]. Cheers, -Derek (dww) [1] http://groups.drupal.org/node/19010 From neclimdul at gmail.com Thu May 7 16:40:20 2009 From: neclimdul at gmail.com (James Gilliland) Date: Thu, 7 May 2009 11:40:20 -0500 Subject: [development] Proposed Apocrypha In-Reply-To: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> Message-ID: <877d4f280905070940s5e8123dcgb76c7b122d5b4b70@mail.gmail.com> On Thu, May 7, 2009 at 9:23 AM, Jeff Eaton wrote: > Crell's Law: If an API must be use-case-optimized, make it swappable & > tailor the default for cheap shared hosting. High-end sites can swap. > > Eaton's Corollary: If an API is swappable, write two implementations. APIs > with one test case are rarely flexible enough for the second. > > --eaton > As I noted on IRC when this was mentioned, maybe there should be another law. Drupal Law 0: If you need to do something, make an API for it first. Or maybe that's just eaton's first law? ;) -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael at favias.org Thu May 7 17:01:01 2009 From: michael at favias.org (Michael Favia) Date: Thu, 07 May 2009 12:01:01 -0500 Subject: [development] Issue queue links from project pages? In-Reply-To: <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> Message-ID: <4A0313CD.6030104@favias.org> Derek Wright wrote: > However, the point of the maintainers block isn't necessarily to > provide links people click on, but text people read. And data about > how many maintainers, who they are, and how active they are is > important information for assessing the health of a project. Project statistics are useful to us but most users dont care about them. Additionally, the only time I look up project maintainers is when I initially review a module for usefulness and when I have a nontrivial patch to submit and would like direction on its implementation for acceptance. Any other highlighting of the maintainers on the project page will just result in additional private messaging before submitting issues in my opinion. I don't know anyone who wants that ;). That said it IS very important to highlight the great work and who's doing it. But i think that is better done on the users page where it wont get them the bad kind of attention and they can still show prospective clients employers. -mf From darrel.opry at gmail.com Thu May 7 17:39:03 2009 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Thu, 7 May 2009 13:39:03 -0400 Subject: [development] Proposed Apocrypha In-Reply-To: <877d4f280905070940s5e8123dcgb76c7b122d5b4b70@mail.gmail.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <877d4f280905070940s5e8123dcgb76c7b122d5b4b70@mail.gmail.com> Message-ID: That's dopry's first law... On Thu, May 7, 2009 at 12:40 PM, James Gilliland wrote: > On Thu, May 7, 2009 at 9:23 AM, Jeff Eaton wrote: > >> Crell's Law: If an API must be use-case-optimized, make it swappable & >> tailor the default for cheap shared hosting. High-end sites can swap. >> >> Eaton's Corollary: If an API is swappable, write two implementations. APIs >> with one test case are rarely flexible enough for the second. >> >> --eaton >> > As I noted on IRC when this was mentioned, maybe there should be another > law. > > Drupal Law 0: If you need to do something, make an API for it first. > > Or maybe that's just eaton's first law? ;) > -------------- next part -------------- An HTML attachment was scrubbed... URL: From earnie at users.sourceforge.net Thu May 7 18:23:29 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 07 May 2009 18:23:29 +0000 Subject: [development] Issue queue links from project pages? In-Reply-To: <4A0313CD.6030104@favias.org> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> Message-ID: <20090507182329.126854htw47lbj8k@mail.siebunlimited.com> Quoting Michael Favia : > Derek Wright wrote: >> However, the point of the maintainers block isn't necessarily to >> provide links people click on, but text people read. And data >> about how many maintainers, who they are, and how active they are >> is important information for assessing the health of a project. > Project statistics are useful to us but most users dont care about > them. Additionally, the only time I look up project maintainers is > when I initially review a module for usefulness and when I have a > nontrivial patch to submit and would like direction on its > implementation for acceptance. Any other highlighting of the > maintainers on the project page will just result in additional > private messaging before submitting issues in my opinion. I don't > know anyone who wants that ;). That said it IS very important to > highlight the great work and who's doing it. But i think that is > better done on the users page where it wont get them the bad kind of > attention and they can still show prospective clients employers. -mf > The block can have the benefit of goading the maintainer into maintaining it. Prestige points for a small issue queue. One problem I see is the "Oldest issue" instead of the "Oldest bug report" and "Oldest support request". The age of a task or a feature request shouldn't be viewed negatively. An issue could be used simply to track other issues or could be used to provide notes to remember and these could be old by nature. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From earnie at users.sourceforge.net Thu May 7 18:28:50 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 07 May 2009 18:28:50 +0000 Subject: [development] Proposed Apocrypha In-Reply-To: <877d4f280905070940s5e8123dcgb76c7b122d5b4b70@mail.gmail.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <877d4f280905070940s5e8123dcgb76c7b122d5b4b70@mail.gmail.com> Message-ID: <20090507182850.21076nha55gj2r48@mail.siebunlimited.com> Quoting James Gilliland : > > Drupal Law 0: If you need to do something, make an API for it first. > print t('Hello World'); Oh wait I should create an API to do it first. function print_hello_world() { print t('Hello World'); } print_hello_world(); Oh wait I should create an API to do it first. function execute_print_hello_world() { print_hello_world(); } execute_print_hello_world(); Oh wait I should create an API to do it first. ... Endless cycle. I think you need a better descriptor than ``something'' before you make an API. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From mail at webthatworks.it Thu May 7 18:41:24 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Thu, 7 May 2009 20:41:24 +0200 Subject: [development] Proposed Apocrypha In-Reply-To: <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <20090507171219.7732fa0f@dawn.webthatworks.it> <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> Message-ID: <20090507204124.6cec9679@dawn.webthatworks.it> On Thu, 7 May 2009 09:25:53 -0600 Greg Knaddison wrote: > On Thu, May 7, 2009 at 9:12 AM, Ivan Sergio Borgonovo > wrote: > > On Thu, 7 May 2009 09:23:48 -0500 > > Jeff Eaton wrote: > > > >> Crell's Law: If an API must be use-case-optimized, make it > >> swappable & tailor the default for cheap shared hosting. > >> High-end sites can swap. > > > >> Eaton's Corollary: If an API is swappable, write two > >> implementations. APIs with one test case are rarely flexible > >> enough for the second. > > > > If you want to make stuff swappable start at least with 3 > > implementations otherwise 2 will just be a special case of 1. > > We have to temper the ideal with reality. We have several That`s why I didn`t write "working implementations" ;) At least in my experience a "what if they were 3" makes a huge difference to avoid 2 just a special case of 1. But anyway how could you plan or even think an API could be useful knowing just 2 use-case? But then... when you cut and paste more than once... you need an API ;) 3 is the magic number! > And three cheers for Crell's Law and Eaton's Corollary. I would extend that cheers further than just for the Law and the Corollary. BTW Ernie that`s called delegation and everybody know that delegation is the solution to all CS problems. -- Ivan Sergio Borgonovo http://www.webthatworks.it From everyone at asifproductions.com Thu May 7 18:46:05 2009 From: everyone at asifproductions.com (As If Productions) Date: Thu, 07 May 2009 11:46:05 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: References: Message-ID: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> At 08:28 AM 5/7/2009, Margie wrote: >Most people already have all sorts of anxiety about "I'm not as good as >that." I think the maintainers list could tend to reinforce the star power >of a few people, but that's a whole psychological question. I agree with Margie on this. We recently had a discussion about warming new people into the fold, trying to lower barriers to various types of contribution, and I think this structure will tend to work against that. Yes, it's largely a psychological question, meaning "interface design issue". Meanwhile, if you want to talk about wasted space, listing the "Latest 5 Issues" is useless to anyone except the module maintainers. LVX TF --- As If Productions http://www.asifproductions.com Interactive Worlds and Immersive Obsessions From larry at garfieldtech.com Thu May 7 18:51:47 2009 From: larry at garfieldtech.com (larry at garfieldtech.com) Date: Thu, 07 May 2009 13:51:47 -0500 Subject: [development] Proposed Apocrypha In-Reply-To: <20090507204124.6cec9679@dawn.webthatworks.it> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <20090507171219.7732fa0f@dawn.webthatworks.it> <3861c6770905070825j46b1e70an872b9907b44c78d@mail.gmail.com> <20090507204124.6cec9679@dawn.webthatworks.it> Message-ID: <4A032DC3.6060505@garfieldtech.com> Ivan Sergio Borgonovo wrote: > At least in my experience a "what if they were 3" makes a huge > difference to avoid 2 just a special case of 1. > But anyway how could you plan or even think an API could be > useful knowing just 2 use-case? > But then... when you cut and paste more than once... you need an > API ;) > 3 is the magic number! 3 is ideal. Two markedly different implementations can also suffice, for certain definitions of "markedly". (DBTNG was good with MySQL and Postgres, with an eye toward Oracle. It's better with SQLite, which forced some heavy rethinking that ended up making a much cleaner implementation without changing the API.) >> And three cheers for Crell's Law and Eaton's Corollary. > > I would extend that cheers further than just for the Law > and the Corollary. > > BTW Ernie that`s called delegation and everybody know that > delegation is the solution to all CS problems. There is no problem in computer science that cannot be solved by adding another layer of indirection (except micro-performance). --Larry Garfield From merlin at logrus.com Thu May 7 18:52:06 2009 From: merlin at logrus.com (Earl Miles) Date: Thu, 07 May 2009 11:52:06 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> References: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> Message-ID: <4A032DD6.4080705@logrus.com> As If Productions wrote: > Meanwhile, if you want to talk about wasted space, listing the "Latest 5 > Issues" is useless to anyone except the module maintainers. It's not that useful to me, either, though maybe for really small modules. From merlin at logrus.com Thu May 7 18:54:53 2009 From: merlin at logrus.com (Earl Miles) Date: Thu, 07 May 2009 11:54:53 -0700 Subject: [development] Proposed Apocrypha In-Reply-To: <20090507182850.21076nha55gj2r48@mail.siebunlimited.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <877d4f280905070940s5e8123dcgb76c7b122d5b4b70@mail.gmail.com> <20090507182850.21076nha55gj2r48@mail.siebunlimited.com> Message-ID: <4A032E7D.4080500@logrus.com> Earnie Boyd wrote: > Quoting James Gilliland : > >> >> Drupal Law 0: If you need to do something, make an API for it first. >> > > print t('Hello World'); > > Oh wait I should create an API to do it first. > > function print_hello_world() { > print t('Hello World'); > } That's not an API, that's abstraction. Kind of. It doesn't follow any of the rules, which has to do with flexibility and reusability. So it's bad abstraction. :P From michael at favias.org Thu May 7 19:12:16 2009 From: michael at favias.org (Michael Favia) Date: Thu, 07 May 2009 14:12:16 -0500 Subject: [development] Issue queue links from project pages? In-Reply-To: <20090507182329.126854htw47lbj8k@mail.siebunlimited.com> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> <20090507182329.126854htw47lbj8k@mail.siebunlimited.com> Message-ID: <4A033290.8030006@favias.org> Earnie Boyd wrote: > The block can have the benefit of goading the maintainer into > maintaining it. Prestige points for a small issue queue. One problem > I see is the "Oldest issue" instead of the "Oldest bug report" and > "Oldest support request". The age of a task or a feature request > shouldn't be viewed negatively. An issue could be used simply to > track other issues or could be used to provide notes to remember and > these could be old by nature. Agreed on all counts. Median figures are MUCH more useful in this regard as they ignore outliers. -mf From darrel.opry at gmail.com Thu May 7 19:48:56 2009 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Thu, 7 May 2009 15:48:56 -0400 Subject: [development] Proposed Apocrypha In-Reply-To: <4A032E7D.4080500@logrus.com> References: <8FCB6077-6594-4CD9-A5A7-11223413A203@viapositiva.net> <877d4f280905070940s5e8123dcgb76c7b122d5b4b70@mail.gmail.com> <20090507182850.21076nha55gj2r48@mail.siebunlimited.com> <4A032E7D.4080500@logrus.com> Message-ID: On Thu, May 7, 2009 at 2:54 PM, Earl Miles wrote: > Earnie Boyd wrote: > >> Quoting James Gilliland : >> >> >>> Drupal Law 0: If you need to do something, make an API for it first. >>> >>> >> print t('Hello World'); >> >> Oh wait I should create an API to do it first. >> >> function print_hello_world() { >> print t('Hello World'); >> } >> > > That's not an API, that's abstraction. Kind of. It doesn't follow any of > the rules, which has to do with flexibility and reusability. So it's bad > abstraction. :P > I personally like designing at the interface level. It's so much neater... then you can start thinking about the hairy details of abstract and concrete classes and their guts. Admittedly the normal Drupal model is implement an API that provides and abstration to select the properly implementation of an API's beckend interface... Now if you had.... drupal_print_string("Hello World"); function drupal_print_string($string) { $function = variable_get('drupal_print_implementation', 'default') .'_print_string'; return $function($string); } function default_print_string($string) { print $string; } These day I prefer stuff more along the lines of .... intrerface iPrinter { bool print(string str); } class defaultPrinter implements iPrinter { function print($str) { print($str); } } class printerFactory { function load($implementation) { if (in_array('iPrinter', class_implements($implementation))) { return new $implementation(); } // maybe throw an exception.... } } $pf = new printerFactory(); $printer = $pf->load(variable_get('default_printer_implementation', 'defaultPrinter')); $printer->print('Hello World'); I feel its a little more work to set up the interface and factory, but it's so much easier to expand the implementations, especially when you only need to overload one or two methods... -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at webthatworks.it Thu May 7 19:52:11 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Thu, 7 May 2009 21:52:11 +0200 Subject: [development] drupal_add_head -> $page[ 'head'] and hook_alter_page was: Re: global object to push stuff into In-Reply-To: <6117a7500905070827s6b5ce100yc9b10ab82948c969@mail.gmail.com> References: <20090505181907.745845b2@dawn.webthatworks.it> <20090507171735.3308ce41@dawn.webthatworks.it> <6117a7500905070827s6b5ce100yc9b10ab82948c969@mail.gmail.com> Message-ID: <20090507215211.21d23250@dawn.webthatworks.it> On Thu, 7 May 2009 11:27:25 -0400 Moshe Weitzman wrote: > > Having a structured head implies having a renderer/theme > > function (am I right?) > > yes. but core provides some basic ones like #markup so we may not > need anything new. ? > a $page['head'] array sounds good to me. $page = array( 'head' => array( '#markup' => '', 'meta' => array( ... ); theme_head($head) { foreach(...) { } unset($head['meta']); foreach(...) { } unset($head['link']); ... $output .= drupal_render($head); // should we really be so verbose? ... } Other than concat, overwrite what could be done with stuff in head? I`m just aware of LINK and META and I`m abandoning the idea to offer some helper function. It doesn`t seem to have any meaning eg. to duplicate http-equiv since we can actually send headers. So if I would like to implement this change I should: 1 double-check what can be placed in head 2 document the structure of page I`m going to use 3 provide a theme_head 4 substitute all the occurrence of drupal_add_html_head with hook_alter_page (including stuff in drupal_add_link) [1] 5 change all the occurrences of drupal_get_html_head with ??? [2] [1] this looks like a revolution and somehow it may end up in changing head out of context. In core there are few uses of drupal_add_html_head I`d say that _alter_page doesn`t look the only candidate where to put stuff that change head. keywords and description are generally related to content, you generate content in the main menu callback function and there you may collect the right information to build up keywords, description, ranking... If we need to change head other than with _alter_page what other choices are available? [2] Actually... drupal_get_html_head is mainly used in *_preprocess_page... but how other things end up there? Most of the things that end up in _preprocess_page are globals. I`m wondering if putting stuff in $page is really worth the effort... after all $head could be just another global, just structured. Am I missing something? $page doesn`t look to be a global, couldn`t other stuff slowly end there too in spite of having tons of functions containing static? /me fighting with claws-mail on sid that for some strange reason transformed the ' key (not the character) into a greedy ^W BTW function template_preprocess_page(&$variables) { $variables['css'] = drupal_add_css(); $variables['styles'] = drupal_get_css(); ?? is it right? -- Ivan Sergio Borgonovo http://www.webthatworks.it From drewish at katherinehouse.com Thu May 7 21:11:20 2009 From: drewish at katherinehouse.com (andrew morton) Date: Thu, 7 May 2009 17:11:20 -0400 Subject: [development] Issue queue links from project pages? In-Reply-To: <4A0313CD.6030104@favias.org> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> Message-ID: On Thu, May 7, 2009 at 1:01 PM, Michael Favia wrote: > Derek Wright wrote: >> >> However, the point of the maintainers block isn't necessarily to provide >> links people click on, but text people read. ?And data about how many >> maintainers, who they are, and how active they are is important information >> for assessing the health of a project. > > Project statistics are useful ?to us but most users dont care about them. Are you basing that statement on anything or is that just your speculation? andrew From domenic at workhabit.com Thu May 7 21:37:30 2009 From: domenic at workhabit.com (Domenic Santangelo) Date: Thu, 7 May 2009 14:37:30 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: References: <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> Message-ID: On Thu, May 7, 2009 at 2:11 PM, andrew morton wrote: > On Thu, May 7, 2009 at 1:01 PM, Michael Favia wrote: >> Derek Wright wrote: >>> >>> However, the point of the maintainers block isn't necessarily to provide >>> links people click on, but text people read. ?And data about how many >>> maintainers, who they are, and how active they are is important information >>> for assessing the health of a project. >> >> Project statistics are useful ?to us but most users dont care about them. > > Are you basing that statement on anything or is that just your speculation? I'm not sure they're useful as presented. They're interesting for sure, but not informative as-is. Examples: http://drupal.org/project/paging - last commit from Gurpartap: 2 weeks ago. Next maintainer (Darren): 48 weeks ago. Last D5 recommended release was in January. http://drupal.org/project/panels - last commit (now) by merlin, next by Sun: 11 weeks ago. Last D5 recommended release was Aug 2008. Two heavily used and (I think) maintained modules, but the "at a glance" stats paint a different picture. If I knew less about these projects or the Drupal community as a whole, I do not think I would conclude that these are healthy projects. YMMV. As to the issue queue re-placement, the fact that someone asked on the dev list, and the first reply didn't notice it either should be a hint as to the UX issues caused by putting that block there. Perhaps it is a "zomg they moved my taskbar to the top of the screen and i cant find the start button anymore lol!" kind of thing, but I'm having a tough time reconciling those RHS blocks as related to the full page post in my head. My $0.02. -- Domenic Santangelo senior engineer | workhabit,inc. // email: domenic at workhabit.com | web: http://www.workhabit.com // office: 866-workhabit | direct: 916-288-8243 The information contained in this electronic mail message is confidential and intended for the sole use of the intended recipient(s) and may be privileged. The information herein may also be protected by the Electronic Communications Privacy Act, 18 UCS Sections 2510-2521. Any unauthorized review, use, disclosure or distribution is prohibited. If you have received this communication in error, please immediately notify us by telephone (866-967-5422) and by reply email and destroy all copies of the original message. From merlin at logrus.com Thu May 7 21:52:49 2009 From: merlin at logrus.com (Earl Miles) Date: Thu, 07 May 2009 14:52:49 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: References: <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> Message-ID: <4A035831.3010205@logrus.com> Domenic Santangelo wrote: > On Thu, May 7, 2009 at 2:11 PM, andrew morton > wrote: >> On Thu, May 7, 2009 at 1:01 PM, Michael Favia wrote: >>> Derek Wright wrote: >>>> However, the point of the maintainers block isn't necessarily to provide >>>> links people click on, but text people read. And data about how many >>>> maintainers, who they are, and how active they are is important information >>>> for assessing the health of a project. >>> Project statistics are useful to us but most users dont care about them. >> Are you basing that statement on anything or is that just your speculation? > > I'm not sure they're useful as presented. They're interesting for > sure, but not informative as-is. > > Examples: > http://drupal.org/project/paging - last commit from Gurpartap: 2 weeks > ago. Next maintainer (Darren): 48 weeks ago. Last D5 recommended > release was in January. > http://drupal.org/project/panels - last commit (now) by merlin, next > by Sun: 11 weeks ago. Last D5 recommended release was Aug 2008. Well, it's pretty accurate -- Panels for D5 is actually very poorly maintained at this point. Paging may actually be maintained and simply not need much attention because it's very small and focused. It does one thing, does it well, etc. From news at unleashedmind.com Thu May 7 21:59:39 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Thu, 7 May 2009 23:59:39 +0200 Subject: [development] Issue queue links from project pages? In-Reply-To: Message-ID: <193101c9cf5f$1eef93f0$0200a8c0@structworks.com> Think twice. > http://drupal.org/project/paging - last commit from Gurpartap: 2 weeks > ago. Next maintainer (Darren): 48 weeks ago. Last D5 recommended > release was in January. ...tells you that Paging (a rather small module) had no activity in the past 2 weeks, and there is 1 maintainer only. If you find a bug, it's likely that a) you write a patch and that will sit in the queue. b) you create an issue and there is only maintainer to respond. > http://drupal.org/project/panels - last commit (now) by merlin, next > by Sun: 11 weeks ago. Last D5 recommended release was Aug 2008. ...tells you that Panels (a large module) has more than one active maintainer and the maintainers are active. It also tells you that the primary maintainer plays a key role, actively maintains the project as leader, and the project is very healthy. Good stuff to use on your site. sun From drupal at dwwright.net Fri May 8 00:58:55 2009 From: drupal at dwwright.net (Derek Wright) Date: Thu, 7 May 2009 17:58:55 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> References: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> Message-ID: <217DE5CC-6C84-4778-BD89-7333B0EE88CF@dwwright.net> On May 7, 2009, at 11:46 AM, As If Productions wrote: > Meanwhile, if you want to talk about wasted space, listing the > "Latest 5 Issues" is useless to anyone except the module maintainers. Blocks like this are a key part of Mark + Leisa's design for the new site. The principle (as I understand it) is "show the huge range of stuff happening". Again, I defer to their expertise in these areas. I have lots of opinions about UX and UI, but ultimately, there're all based on speculation and my own feelings/intuition, not user testing or other quantifiable methods. Also, I reject the notion that the 5 most recent issues are "useless". It's possible it'll help people avoid duplicates. Or, if 3 of the top five issues have titles like "Fatal error when upgrading to 6.x-2.5" that might give you a hint to think twice before upgrading to 6.x-2.5 when you're staring at that "recommended" release. ;) Certainly, I think the 5 most recent issues is far more useful when looking at a project node than "patch bingo" links. :( I'd love to remove the contributor + developer blocks on project/*, but the last time I did that (on the issue queue pages themselves), there was a howl and outcry. So, I'll just wait for the initial redesign deployment to finally kill those blocks from "my" part of the site. ;) Cheers, -Derek (dww) From drupal at dwwright.net Fri May 8 00:59:13 2009 From: drupal at dwwright.net (Derek Wright) Date: Thu, 7 May 2009 17:59:13 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: References: <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> Message-ID: <90EBA5DC-5802-4645-88DA-96BD4D33B072@dwwright.net> On May 7, 2009, at 2:37 PM, Domenic Santangelo wrote: > As to the issue queue re-placement, the fact that someone asked on the > dev list, and the first reply didn't notice it either should be a hint > as to the UX issues caused by putting that block there. IMHO, the problem is the design of bluebeach itself and how people tend to tune out the RHS blocks entirely. I *knew* there'd be a backlash for trying to incrementally roll out changes like this without swapping the theme. But, I figured it was better to make progress towards the redesign, even if there's a period when the changes aren't quite as visible or brilliant as they will eventually be, since they're still in the context of the current theme. /me shrugs -Derek (dww) From mfburdett at gmail.com Fri May 8 01:18:02 2009 From: mfburdett at gmail.com (mark burdett) Date: Thu, 7 May 2009 18:18:02 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> References: <7B532B96-A35C-4664-8049-8DB68983067E@dwwright.net> <20090506203122.81036jui2ew63ukg@mail.siebunlimited.com> <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> Message-ID: On Wed, May 6, 2009 at 5:19 PM, Derek Wright wrote: > On May 6, 2009, at 1:36 PM, Margie Roswell wrote: >> I'm not getting it. The issues block disappears when you're actually in >> the issue queue. > If you already drilled down to the issue queue, why do you still need the > summary blocks? I wouldn't mind having the issue cockpit block's search box on the issue pages (not issue queue). this would make it easy to quickly search for related issues. --mark From gabor at hojtsy.hu Fri May 8 09:26:55 2009 From: gabor at hojtsy.hu (=?ISO-8859-1?Q?G=E1bor_Hojtsy?=) Date: Fri, 8 May 2009 11:26:55 +0200 Subject: [development] Issue queue links from project pages? In-Reply-To: <90EBA5DC-5802-4645-88DA-96BD4D33B072@dwwright.net> References: <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> <90EBA5DC-5802-4645-88DA-96BD4D33B072@dwwright.net> Message-ID: <86ca3ccb0905080226u4350a95cg2350a942f3edb627@mail.gmail.com> On Fri, May 8, 2009 at 2:59 AM, Derek Wright wrote: > On May 7, 2009, at 2:37 PM, Domenic Santangelo wrote: > >> As to the issue queue re-placement, the fact that someone asked on the >> dev list, and the first reply didn't notice it either should be a hint >> as to the UX issues caused by putting that block there. > > IMHO, the problem is the design of bluebeach itself and how people tend to > tune out the RHS blocks entirely. ?I *knew* there'd be a backlash for trying > to incrementally roll out changes like this without swapping the theme. > ?But, I figured it was better to make progress towards the redesign, even if > there's a period when the changes aren't quite as visible or brilliant as > they will eventually be, since they're still in the context of the current > theme. Derek, I wholeheartedly agree, keep up the good work! Rolling everything out at once would be an impossibly huge task. G?bor From agentrickard at gmail.com Fri May 8 14:40:37 2009 From: agentrickard at gmail.com (Ken Rickard) Date: Fri, 8 May 2009 10:40:37 -0400 Subject: [development] Menu Tree Access Control? In-Reply-To: <223073f60904071905m279a7d43r78d24773795ff0cd@mail.gmail.com> References: <867cfa9c0904040242w462967a2s2f82fd742cb78d8d@mail.gmail.com> <20090404155934.17178cn761dmcve0@mail.siebunlimited.com> <25b45da00904051500k4057f05ct350e01b603ad25c4@mail.gmail.com> <223073f60904071905m279a7d43r78d24773795ff0cd@mail.gmail.com> Message-ID: <25b45da00905080740j7a3527di13c6342ea1fb294f@mail.gmail.com> Josh- I was finally cleared to make a release today. I hope that you find it useful. -- http://drupal.org/project/menu_node -- http://drupal.org/project/menu_node_edit To others, the Menu Node API could be very useful, and I will post an issue about whether the functionality should be in core. - Ken On Tue, Apr 7, 2009 at 10:05 PM, Josh Koenig wrote: > All: Thanks so much for the links. The group thread that webchick > started is precisely the use-case that I'm looking for. > > Ken/Larry, > > This sounds like exactly the path I was on (though I was working on > one module rather than splitting it into two). My timeframe is > somewhat tight: need to have something beta-ready by end of month, > which means I need to prototype now. > > However I have availability to put cycles in to help, and would like > to see this problem get solved "right" for the long haul. Is there any > chance of getting a CVS checkin of the code you're working ?-- no > official release -- in the short-term? I can help test, submit > patches, etc. > > cheers > -josh > > On Sun, Apr 5, 2009 at 3:00 PM, Ken Rickard wrote: >> I am the Palantir developer in question and have two modules just >> about to release that are relevant here. >> >> Release should be by end of month, if all goes well. >> >> 1) Menu Node API >> The menu/node API module keeps track of menu-node relationships for >> you, so that you can run JOINs from the {node} table to the >> {menu_links} table through the new {menu_node} table. >> >> This is a glue module that will allow for (among other things): >> >> -- Menu-based Views >> -- Node Access modules based on menu hierarchy, >> >> 2) Menu (Needs Name) >> The second module was called menu_access, and someone just took the >> namespace on d.o. It leverages the Menu Node API and rewrites >> node/%/edit using hook_menu_alter(). It then lets an administrator >> define menu 'sections' -- elements of the tree hierarchy that are used >> as ACLs. >> >> Individual users can then be assigned as "section editors". ?A section >> editor has cascading rights down the menu hierarchy. >> >> This module is _deliberately_ not a Node Access module, since I have >> not yet figured out the necessary overhead for which menu parents >> would need to be stored in the {node_access} table as GIDs. ?And since >> the client did not require View or Delete access control, Edit control >> was sufficient. >> >> I hope that any delay in releasing these won't force anyone to write >> duplicate code. ?Larry and I will convene next week and see if we can >> get a firm launch date. >> >> - Ken Rickard >> agentrickard >> >> >> >> On Sat, Apr 4, 2009 at 11:59 AM, Earnie Boyd >> wrote: >>> Quoting Simon Roberts : >>> >>>> I've also been doing fine-grained book-page access, per-user and >>>> per-role, and ended up coding more than I would have liked. ?(Writing >>>> ACLs on the fly, and twiddling with menu-entries during theming - >>>> uugh). >>>> >>>> No idea if this is useful, but I saw this new project pop up a few days >>>> ago >>>> >>>> http://drupal.org/project/book_page_access >>>> >>> >>> And then there is http://drupal.org/project/acl which give you an API. ?The >>> page lists other modules using it. >>> >>> -- >>> Earnie >>> -- http://r-feed.com/ ? ? ? ? ? -- http://for-my-kids.com/ >>> -- http://www.4offer.biz/ ? ? ? -- http://give-me-an-offer.com/ >>> >>> >>> >> >> >> >> -- >> Ken Rickard >> agentrickard at gmail.com >> http://ken.therickards.com >> > > > > -- > -------------------- > Josh Koenig, Partner & CTO > http://www.chapterthree.com > -- Ken Rickard agentrickard at gmail.com http://ken.therickards.com From agentrickard at gmail.com Fri May 8 14:49:05 2009 From: agentrickard at gmail.com (Ken Rickard) Date: Fri, 8 May 2009 10:49:05 -0400 Subject: [development] Menu Node API Message-ID: <25b45da00905080749i3a92241dh6b44b2c3c0791680@mail.gmail.com> We had a client who wanted the site's menu system to be used as the sole organizing principle. To allow editorial access based on menu items, however, we had to figure out how to write JOINs from the {menu_links} table to the {node} table, which is currently not supported. One result is the Menu Node API [1], which maintains a {menu_node} table that can be used by modules (such as Views) to write JOIN queries based on menu relationships. My question to the list: Should this tracking feature by in core? Please respond here: http://drupal.org/node/457450 -- Ken Rickard agentrickard at gmail.com http://ken.therickards.com [1] -- http://drupal.org/project/menu_node From morbus at disobey.com Fri May 8 17:12:04 2009 From: morbus at disobey.com (Morbus Iff) Date: Fri, 08 May 2009 13:12:04 -0400 Subject: [development] Druplicon IRC bot needs yer channels! Help stress test new code! Message-ID: <4A0467E4.5050609@disobey.com> As some of you know, Druplicon has been "full" for awhile, as I've denied any new channel joins due to the bot having reached a threshold that caused it to choke on handshakes. Some of you may have even recalled this factoid: [13:06] When I first start, I'm in so many channels that it takes me a long time to cache all the necessary user info. This is not a fault of my code, but rather that I'm in 20+ channels. This handshaking causes me to be initially unresponsive for 2+ minutes and, if you directly address me, I may flood. I have just applied code to hopefully fix this problem. The inline comments should explain the change suitably: When the bot has a number of channels to join (nearing 20+), the initial handshake, where it retrieves information about every user in every channel, can cause it to overload and disconnect. To solve this, we join channels every 15 seconds instead, which gives some breathing room for the nick caching to take place. A nice side-effect of this is that if the bot errors out of a channel, or a new channel is added to the list, it'll automatically (re)connect without needing a restart. This now means that for every restart, Druplicon will take a longer time to join every channel (15 seconds * NUMBER_OF_CHANNELS), but it should be able to join far more. And, one of the primary reasons for restarting Druplicon in the first place was to have it join new channels - this restart should no longer be necessary due to the above changes (due to the variables cache being cleared every five minutes, which would cause the new code to detect newly-added channels and autojoin them). So, what I need is: * All those people I said "No Druplicon for you!" to ask me again. I'd like to stress test things by adding him to every channel requested and see where the next major chokepoint will be. [Note: this is a problem unique to Druplicon - I don't know of many IRC bots who are in more than 20 channels, much less those who are requested to be in, easily, 30 or more. That's how widespread our channels are.] -- Morbus Iff ( is this a cut out bath-poster Morbus, or what? ) Technical: http://www.oreillynet.com/pub/au/779 Enjoy: http://www.disobey.com/ and http://www.videounderbelly.com/ aim: akaMorbus / skype: morbusiff / icq: 2927491 / jabber.org: morbus From winborn at advomatic.com Fri May 8 17:34:47 2009 From: winborn at advomatic.com (Aaron Winborn) Date: Fri, 08 May 2009 13:34:47 -0400 Subject: [development] Druplicon IRC bot needs yer channels! Help stress test new code! In-Reply-To: <4A0467E4.5050609@disobey.com> References: <4A0467E4.5050609@disobey.com> Message-ID: <4A046D37.3040705@advomatic.com> Great work, as always! Is there a 'channels?' factoid or other method to learn the channels that Druplicon has joined? Morbus Iff wrote: > > As some of you know, Druplicon has been "full" for awhile, as I've > denied any new channel joins due to the bot having reached a threshold > that caused it to choke on handshakes. Some of you may have even > recalled this factoid: > > [13:06] When I first start, I'm in so many channels that > it takes me a long time to cache all the necessary user info. This is > not a fault of my code, but rather that I'm in 20+ channels. This > handshaking causes me to be initially unresponsive for 2+ minutes and, > if you directly address me, I may flood. > > I have just applied code to hopefully fix this problem. > The inline comments should explain the change suitably: > > When the bot has a number of channels to join (nearing 20+), the > initial handshake, where it retrieves information about every user in > every channel, can cause it to overload and disconnect. To solve this, > we join channels every 15 seconds instead, which gives some breathing > room for the nick caching to take place. A nice side-effect of this is > that if the bot errors out of a channel, or a new channel is added to > the list, it'll automatically (re)connect without needing a restart. > > This now means that for every restart, Druplicon will take a longer > time to join every channel (15 seconds * NUMBER_OF_CHANNELS), but it > should be able to join far more. And, one of the primary reasons for > restarting Druplicon in the first place was to have it join new > channels - this restart should no longer be necessary due to the above > changes (due to the variables cache being cleared every five minutes, > which would cause the new code to detect newly-added channels and > autojoin them). > > So, what I need is: > > * All those people I said "No Druplicon for you!" to ask me again. > > I'd like to stress test things by adding him to every channel > requested and see where the next major chokepoint will be. [Note: this > is a problem unique to Druplicon - I don't know of many IRC bots who > are in more than 20 channels, much less those who are requested to be > in, easily, 30 or more. That's how widespread our channels are.] > -- Aaron Winborn Advomatic, LLC http://advomatic.com/ Drupal Multimedia available in September! http://www.packtpub.com/create-multimedia-website-with-drupal/book My blog: http://aaronwinborn.com/ From morbus at disobey.com Fri May 8 17:52:31 2009 From: morbus at disobey.com (Morbus Iff) Date: Fri, 08 May 2009 13:52:31 -0400 Subject: [development] Druplicon IRC bot needs yer channels! Help stress test new code! In-Reply-To: <4A046D37.3040705@advomatic.com> References: <4A0467E4.5050609@disobey.com> <4A046D37.3040705@advomatic.com> Message-ID: <4A04715F.4040708@disobey.com> > Great work, as always! Is there a 'channels?' factoid or > other method to learn the channels that Druplicon has joined? Type "/whois Druplicon" for the server-reported list. This COULD potentially be different than Druplicon's list (i.e., it's just starting up so hasn't joined the other 15 channels) or, as I'm facing right now, Druplicon has 24 channels now configured, but Freenode is limiting it to a maximum of 20 (I'm working with Freenode staff to fix this.) But that's the standard/generic way of finding what rooms a nick is in. -- Morbus Iff ( keep out of reach of children ) Technical: http://www.oreillynet.com/pub/au/779 Enjoy: http://www.disobey.com/ and http://www.videounderbelly.com/ aim: akaMorbus / skype: morbusiff / icq: 2927491 / jabber.org: morbus From drupal at dwwright.net Fri May 8 23:03:00 2009 From: drupal at dwwright.net (Derek Wright) Date: Fri, 8 May 2009 16:03:00 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <86ca3ccb0905080226u4350a95cg2350a942f3edb627@mail.gmail.com> References: <21207894-2FFD-453A-9453-70C5FD1754A3@dwwright.net> <86ca3ccb0905070032w2bde47eame494aa278bea889a@mail.gmail.com> <5574B3E6-8A6C-4C8B-A6FF-3FAB6FF79D9A@dwwright.net> <4A0313CD.6030104@favias.org> <90EBA5DC-5802-4645-88DA-96BD4D33B072@dwwright.net> <86ca3ccb0905080226u4350a95cg2350a942f3edb627@mail.gmail.com> Message-ID: On May 8, 2009, at 2:26 AM, G?bor Hojtsy wrote: > Derek, I wholeheartedly agree, keep up the good work! Rolling > everything out at once would be an impossibly huge task. Thanks! Meanwhile, based on the popular outcry and steady stream of requests to "bring back the issue links" on project pages, I've moved the project-specific blocks to the left side bar so they're harder to ignore. Obviously, they'll move again when we switch themes, but hopefully that'll be less traumatic for everyone. ;) http://drupal.org/project/project http://drupal.org/project/drupal http://drupal.org/project/views ... If people still can't see them, I give up. ;) Enjoy, -Derek (dww) From shellmultimedia at gmail.com Sat May 9 02:00:57 2009 From: shellmultimedia at gmail.com (Michelle Cox) Date: Fri, 8 May 2009 21:00:57 -0500 Subject: [development] Issue queue links from project pages? In-Reply-To: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> References: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> Message-ID: <8ccde8ac0905081900q7f27690fs43768bdffe61c129@mail.gmail.com> On Thu, May 7, 2009 at 1:46 PM, As If Productions < everyone at asifproductions.com> wrote: > Meanwhile, if you want to talk about wasted space, listing the "Latest 5 > Issues" is useless to anyone except the module maintainers. Could we possibly have the last 5 issues tagged XYZ where XYZ is some tag we all agree upon? Or use flag maybe? Trying to think of a way it could be done that wouldn't take more coding. The point being to highlight issues that the maintainer wants you to know about, not just the latest ones. Michelle -------------- next part -------------- An HTML attachment was scrubbed... URL: From metzlerd at metzlerd.com Sat May 9 02:39:11 2009 From: metzlerd at metzlerd.com (David Metzler) Date: Fri, 8 May 2009 19:39:11 -0700 Subject: [development] Drupal SU module anyone? Message-ID: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> I had another idea for a simple module that I'm considering developing. I often get overwhelmed with drupal administration, and have many sites where admin is shared. Every time I add a module in drupal I tediously enable all access permissions for my "Admin" role. I began to think about the Linux sudo model, and thought this might be cool for dupal. Users with "Become Admin" privilges could switch to the "admin" user only. This way I could largely see the view that my content contributors do :). Does this seem like a good thing? Anyone know about duplication? I'm aware of Devel, and Masquerade but I didn't feel the need for that on the production sites, and I really don't want to expose the "Become Any User" functionality (but maybe I'm being silly here). From drupal at dwwright.net Sat May 9 06:44:57 2009 From: drupal at dwwright.net (Derek Wright) Date: Fri, 8 May 2009 23:44:57 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <8ccde8ac0905081900q7f27690fs43768bdffe61c129@mail.gmail.com> References: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> <8ccde8ac0905081900q7f27690fs43768bdffe61c129@mail.gmail.com> Message-ID: <23AB0E88-33A7-4143-9DD1-0B7B19DDC1B6@dwwright.net> On May 8, 2009, at 7:00 PM, Michelle Cox wrote: > Could we possibly have the last 5 issues tagged XYZ where XYZ is > some tag we all agree upon? Or use flag maybe? Trying to think of a > way it could be done that wouldn't take more coding. The point being > to highlight issues that the maintainer wants you to know about, not > just the latest ones. Interesting idea. However, I believe that's more a job for the forthcoming "Links" block: http://infrastructure.drupal.org/drupal.org-style-guide/prototype/modules_detail.html (scroll down -- on that mockup, it's currently on the bottom, though the order of blocks on that page got changed) Create "Links" block for project nodes http://drupal.org/node/372027 Add a mechanism to store custom links per-project http://drupal.org/node/425742 Again, as I understand it based on a brief conversation with Mark at DCDC, these "recent x" blocks are just meant to give people a sense of how much stuff is going on, not necessarily that people are expected to get much work done via those blocks. That said, I'd love Mark and/or Leisa to jump in and help me out here. ;) Cheers, -Derek (dww) From kkaefer at gmail.com Sat May 9 08:11:25 2009 From: kkaefer at gmail.com (=?ISO-8859-1?Q?Konstantin_K=E4fer?=) Date: Sat, 9 May 2009 10:11:25 +0200 Subject: [development] Drupal SU module anyone? In-Reply-To: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> Message-ID: <1935E2E7-7976-430A-9D03-73CE35488233@gmail.com> There's a module for that already: http://drupal.org/project/adminrole For switching users, the devel.module has a switch users block that allows you to quickly impersonate another user. Konstantin On 09.05.2009, at 04:39, David Metzler wrote: > I had another idea for a simple module that I'm considering > developing. I often get overwhelmed with drupal administration, and > have many sites where admin is shared. Every time I add a module in > drupal I tediously enable all access permissions for my "Admin" > role. I began to think about the Linux sudo model, and thought this > might be cool for dupal. Users with "Become Admin" privilges could > switch to the "admin" user only. This way I could largely see the > view that my content contributors do :). > > Does this seem like a good thing? Anyone know about duplication? > I'm aware of Devel, and Masquerade but I didn't feel the need for > that on the production sites, and I really don't want to expose the > "Become Any User" functionality (but maybe I'm being silly here). -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3383 bytes Desc: not available URL: From earnie at users.sourceforge.net Sat May 9 13:19:45 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Sat, 09 May 2009 13:19:45 +0000 Subject: [development] Drupal SU module anyone? In-Reply-To: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> Message-ID: <20090509131945.568479axb7ui3to0@mail.siebunlimited.com> Quoting David Metzler : > I had another idea for a simple module that I'm considering > developing. I often get overwhelmed with drupal administration, and > have many sites where admin is shared. Every time I add a module in > drupal I tediously enable all access permissions for my "Admin" > role. I began to think about the Linux sudo model, and thought this Are you aware of http://drupal.org/project/adminrole? It'll stop the tedious enable business. > might be cool for dupal. Users with "Become Admin" privilges could > switch to the "admin" user only. This way I could largely see the > view that my content contributors do :). > > Does this seem like a good thing? Anyone know about duplication? > I'm aware of Devel, and Masquerade but I didn't feel the need for > that on the production sites, and I really don't want to expose the > "Become Any User" functionality (but maybe I'm being silly here). It must have been a good idea there is http://drupal.org/project/masquerade already. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From earnie at users.sourceforge.net Sat May 9 13:24:29 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Sat, 09 May 2009 13:24:29 +0000 Subject: [development] Issue queue links from project pages? In-Reply-To: <8ccde8ac0905081900q7f27690fs43768bdffe61c129@mail.gmail.com> References: <20090507184722.BUIV17135.fed1rmmtao104.cox.net@fed1rmimpo03.cox.net> <8ccde8ac0905081900q7f27690fs43768bdffe61c129@mail.gmail.com> Message-ID: <20090509132429.13874sdunftlhsmc@mail.siebunlimited.com> Quoting Michelle Cox : > On Thu, May 7, 2009 at 1:46 PM, As If Productions < > everyone at asifproductions.com> wrote: > >> Meanwhile, if you want to talk about wasted space, listing the "Latest 5 >> Issues" is useless to anyone except the module maintainers. > > > Could we possibly have the last 5 issues tagged XYZ where XYZ is some tag we > all agree upon? Or use flag maybe? Trying to think of a way it could be done > that wouldn't take more coding. The point being to highlight issues that the > maintainer wants you to know about, not just the latest ones. > I don't like the idea. Seems like wasted effort to me. When I visit my issue queues I like to see all of the open issues and the ones with the latest comments. I open the list of issues and narrow down the view. Then use that as an index page to open the interesting ones. I think this tag/flag would just get in the way. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From ml at lairdutemps.org Sat May 9 14:45:23 2009 From: ml at lairdutemps.org (Daniel Caillibaud) Date: Sat, 9 May 2009 16:45:23 +0200 Subject: [development] Display a custom menu by code in hook install Message-ID: <20090509164523.6f89ad5c@h2.lairdutemps.org> Hi, In a module of my own, I build a custom menu, but I don't see how I could enabled it in my install hook. Is it possible ? My code is, in hook install : db_query("INSERT INTO {menu_custom} (menu_name, title, description) VALUES ('%s', '%s', '%s')", 'mymenu', t('Test menu'), t("My own menu tree for testing purpose.")); in hook menu : [...] $items['mymenu1'] = array ( 'title' => t('Entr?e root 1'), 'page callback' => 'mymenu_test', 'page arguments' => array (0), 'type' => MENU_NORMAL_ITEM, 'menu_name' => 'mymenu', 'expanded' => TRUE, 'access callback' => 'user_access', 'access arguments' => array('access content'), ); [...] With this code, I have my custom menu, but I still need to activate it manually in admin/build/block. I can't call db_query on blocks table in my hook install because block doesn't exist yet. Is there a clean solution ? (creating a block entry with sql query in hook install doesn't sounds very nice). Should I have to replace all my items in hook menu and my custom menu by menu_link_save calls (under navigation menu tree) in hook install? Thanks -- Daniel From ml at lairdutemps.org Sat May 9 17:24:48 2009 From: ml at lairdutemps.org (Daniel Caillibaud) Date: Sat, 9 May 2009 19:24:48 +0200 Subject: [development] Display a custom menu by code in hook install In-Reply-To: <20090509164523.6f89ad5c@h2.lairdutemps.org> References: <20090509164523.6f89ad5c@h2.lairdutemps.org> Message-ID: <20090509192448.56657e1c@h2.lairdutemps.org> Le 09/05/09 ? 16:45, Daniel Caillibaud a ?crit : > In a module of my own, I build a custom menu, but I don't see how I could enabled it in my install hook. Is it possible ? hook_enable seems to be what I need. This function do the job, but if you have a better advice, feel free to post it ;-) function mymenu_enable() { // check if dhtml menu is installed $dhtml = variable_get('dhtml_menu_menus', NULL); if ($dhtml != NULL && is_array($dhtml['menu'])) { $dhtml['menu']['mymenu'] = 1; variable_set('dhtml_menu_menus', $dhtml); } $theme = variable_get('theme_default',''); // weight is hardcoded here, OK for my needs but it should be improved return db_query("UPDATE {blocks} SET theme='$theme', status=1, weight=-10, region='left', title='My test menu' WHERE module='menu' AND delta ='mymenu';"); } -- Daniel From news at unleashedmind.com Sat May 9 20:38:24 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Sat, 9 May 2009 22:38:24 +0200 Subject: [development] Issue queue links from project pages? In-Reply-To: <23AB0E88-33A7-4143-9DD1-0B7B19DDC1B6@dwwright.net> Message-ID: <1ccd01c9d0e6$19f19cd0$0200a8c0@structworks.com> > Interesting idea. However, I believe that's more a job for > the forthcoming "Links" block: I would put it more simple: Just display the x issues that users *flagged* recently. :) (note, not based on amount of flags, but most recent flags) sun From shellmultimedia at gmail.com Sun May 10 00:48:12 2009 From: shellmultimedia at gmail.com (Michelle Cox) Date: Sat, 9 May 2009 19:48:12 -0500 Subject: [development] Issue queue links from project pages? In-Reply-To: <1ccd01c9d0e6$19f19cd0$0200a8c0@structworks.com> References: <23AB0E88-33A7-4143-9DD1-0B7B19DDC1B6@dwwright.net> <1ccd01c9d0e6$19f19cd0$0200a8c0@structworks.com> Message-ID: <8ccde8ac0905091748r58ad8107s86d27ad1af19a68f@mail.gmail.com> > Interesting idea. However, I believe that's more a job for > the forthcoming "Links" block: I don't think it's the same as the links block. This would be more automated. Sort of like a sticky tag, except you want something that all maintainers have access to. So it could sort first by "flag" (or whatever gets used) and then by timestamp. If nothing is flagged, you get what you have now. If there are some issues that are getting duped a lot or for some other reason the maintainer really wants you to see, you flag them and they show up first in that block. On Sat, May 9, 2009 at 3:38 PM, Daniel F. Kudwien wrote: > > I would put it more simple: > > Just display the x issues that users *flagged* recently. :) > > (note, not based on amount of flags, but most recent flags) > > sun > > This points out a problem with the idea. I'd like it to be the maintainer that flags the issues to go there. So that makes it more complex because you not only have to look at the flag but at who flagged it. Unless we just go on an honor system that no one but the maintainer should use a particular flag. Dunno how well that would work. Probably not well, I think. Michelle -------------- next part -------------- An HTML attachment was scrubbed... URL: From drupal at dwwright.net Sun May 10 07:28:49 2009 From: drupal at dwwright.net (Derek Wright) Date: Sun, 10 May 2009 00:28:49 -0700 Subject: [development] Issue queue links from project pages? In-Reply-To: <8ccde8ac0905091748r58ad8107s86d27ad1af19a68f@mail.gmail.com> References: <23AB0E88-33A7-4143-9DD1-0B7B19DDC1B6@dwwright.net> <1ccd01c9d0e6$19f19cd0$0200a8c0@structworks.com> <8ccde8ac0905091748r58ad8107s86d27ad1af19a68f@mail.gmail.com> Message-ID: <5BE835F5-3ABC-4888-92CE-B4613C28826D@dwwright.net> On May 9, 2009, at 5:48 PM, Michelle Cox wrote: > I don't think it's the same as the links block. Can we please move this discussion to a feature request in the project_issue queue that's tagged with "drupal.org redesign"? Thanks, -Derek (dww) From shellmultimedia at gmail.com Sun May 10 15:33:54 2009 From: shellmultimedia at gmail.com (Michelle Cox) Date: Sun, 10 May 2009 10:33:54 -0500 Subject: [development] Drupal SU module anyone? In-Reply-To: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> Message-ID: <8ccde8ac0905100833q67427f2fs4df5d7d56659dfcb@mail.gmail.com> On Fri, May 8, 2009 at 9:39 PM, David Metzler wrote: > I had another idea for a simple module that I'm considering developing. I > often get overwhelmed with drupal administration, and have many sites where > admin is shared. Every time I add a module in drupal I tediously enable all > access permissions for my "Admin" role. I began to think about the Linux > sudo model, and thought this might be cool for dupal. Users with "Become > Admin" privilges could switch to the "admin" user only. This way I could > largely see the view that my content contributors do :). > > Does this seem like a good thing? Anyone know about duplication? I'm > aware of Devel, and Masquerade but I didn't feel the need for that on the > production sites, and I really don't want to expose the "Become Any User" > functionality (but maybe I'm being silly here). I love the idea. I have too many privileges on my normal user because I find it tedious to switch to another user to do admin stuff quick. I've tried both the Devl and Masquerade options and didn't care for them. I'd love to have my normal user where I could click something and all the admin options show up and click something else and they all go away without actually changing users. Michelle -------------- next part -------------- An HTML attachment was scrubbed... URL: From darthsteven at gmail.com Mon May 11 06:30:40 2009 From: darthsteven at gmail.com (Steven Jones) Date: Mon, 11 May 2009 06:30:40 +0000 Subject: [development] Drupal SU module anyone? In-Reply-To: <8ccde8ac0905100833q67427f2fs4df5d7d56659dfcb@mail.gmail.com> References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> <8ccde8ac0905100833q67427f2fs4df5d7d56659dfcb@mail.gmail.com> Message-ID: So you essentially want the functionality of the adminrole module, but with a block that allows you to quickly add/remove a role from the current user. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk 2009/5/10 Michelle Cox : > > > On Fri, May 8, 2009 at 9:39 PM, David Metzler wrote: >> >> I had another idea for a simple module that I'm considering developing. I >> often get overwhelmed with drupal administration, and have many sites where >> admin is shared. ?Every time I add a module in drupal I tediously enable all >> access ?permissions for my "Admin" role. ?I began to think about the Linux >> sudo model, and thought this might be cool for dupal. Users with "Become >> Admin" privilges could switch to the "admin" user only. ?This way I could >> largely see the view that my content contributors do :). >> >> Does this seem like a good thing? ?Anyone know about duplication? ?I'm >> aware of Devel, and Masquerade but I didn't feel the need for that on the >> production sites, and I really don't want to expose the "Become Any User" >> functionality (but maybe I'm being silly here). > > I love the idea.? I have too many privileges on my normal user because I > find it tedious to switch to another user to do admin stuff quick. I've > tried both the Devl and Masquerade options and didn't care for them. I'd > love to have my normal user where I could click something and all the admin > options show up and click something else and they all go away without > actually changing users. > > Michelle > > > From arancaytar.ilyaran at gmail.com Mon May 11 06:52:35 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Mon, 11 May 2009 08:52:35 +0200 Subject: [development] Drupal SU module anyone? In-Reply-To: References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> <8ccde8ac0905100833q67427f2fs4df5d7d56659dfcb@mail.gmail.com> Message-ID: <4A07CB33.9050407@gmail.com> This is a terrific idea. I wanted something like that too, a few week ago. Some safety aspects I considered: - the role assignment should probably be temporary - expiring with the session, or after a period of idle time. - the user should maybe reauthenticate (with their own password, or a root password) when activating su mode. From ml at lairdutemps.org Mon May 11 09:28:23 2009 From: ml at lairdutemps.org (Daniel Caillibaud) Date: Mon, 11 May 2009 11:28:23 +0200 Subject: [development] Strange error on drupal_set_message calls in hook enable Message-ID: <20090511112823.0055f2d3@h2.lairdutemps.org> Hi, In hook enable (mymodule.install file), drupal_set_message throws a fatal error, but only if called in a if { bloc }. Strange isn't it ? This is the code, tested with php 5.2.6 define('DEBUG', TRUE); function mytestmodule_enable() { // this line throws Fatal error: Call to undefined function ?drupal_set_message() // if (function_exists('drupal_set_message')) {?drupal_set_message("fct mytestmodule_enable"); } // but this one don't (if previous line disabled) drupal_set_message("fct mytestmodule_enable"); // and this one also throws the fatal error //if (DEBUG) {?drupal_set_message("fct mytestmodule_enable"); } } -- Daniel From earnie at users.sourceforge.net Mon May 11 11:31:25 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Mon, 11 May 2009 11:31:25 +0000 Subject: [development] Drupal SU module anyone? In-Reply-To: <4A07CB33.9050407@gmail.com> References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> <8ccde8ac0905100833q67427f2fs4df5d7d56659dfcb@mail.gmail.com> <4A07CB33.9050407@gmail.com> Message-ID: <20090511113125.206361cehxbnrj40@mail.siebunlimited.com> Quoting Arancaytar Ilyaran : > This is a terrific idea. I wanted something like that too, a few week ago. > You must have missed my response. See http://drupal.org/project/masquerade. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From luca.capra at gmail.com Mon May 11 12:57:15 2009 From: luca.capra at gmail.com (luca capra) Date: Mon, 11 May 2009 14:57:15 +0200 Subject: [development] Drupal SU module anyone? In-Reply-To: <20090511113125.206361cehxbnrj40@mail.siebunlimited.com> References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> <8ccde8ac0905100833q67427f2fs4df5d7d56659dfcb@mail.gmail.com> <4A07CB33.9050407@gmail.com> <20090511113125.206361cehxbnrj40@mail.siebunlimited.com> Message-ID: <4A0820AB.5060903@gmail.com> Hello, sorry I'm out of discussion but I was thinking.. (as I never used masquerade/adminrole, but they seems to be similar to an extended su) 1 As does logintoggoboan module, when encountering a 403 page, put the su module login form (or a link to ?q=curr/path/su). 2 On submit form, check if user is logged && in the "sudoers|admin" role (like adminrole?) 3 add all permission to the user (alike #1) and toggle them on hook_exit (?). 4 Keep a su flag as timestamp in $user session and let it there some time, in case it's needed again (like masquerade?) 5 next 403 will update the time period and let go on as root or else remove if timed out. Is a reasonable approach? Thanks, Luca Earnie Boyd ha scritto: > Quoting Arancaytar Ilyaran : > >> This is a terrific idea. I wanted something like that too, a few week >> ago. >> > > You must have missed my response. See > http://drupal.org/project/masquerade. > > > -- > Earnie > -- http://r-feed.com/ -- http://for-my-kids.com/ > -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ > > > From metzlerd at metzlerd.com Tue May 12 01:20:24 2009 From: metzlerd at metzlerd.com (David Metzler) Date: Mon, 11 May 2009 18:20:24 -0700 Subject: [development] Drupal SU module anyone? In-Reply-To: <20090511113125.206361cehxbnrj40@mail.siebunlimited.com> References: <7DEA680A-8599-45D0-BC90-CA50A901ACDA@metzlerd.com> <8ccde8ac0905100833q67427f2fs4df5d7d56659dfcb@mail.gmail.com> <4A07CB33.9050407@gmail.com> <20090511113125.206361cehxbnrj40@mail.siebunlimited.com> Message-ID: <994D657B-5CA8-4666-ADB2-F0CC9982A731@metzlerd.com> Earnie et al , Certainly Masquerade works as does devel. I was already aware of those. I'm kind of trying to figure out whether I want admin users to be my special "Admin" (In my case uid=1) or I let them be "Anyone" . I was fully aware that I might be being a bit over the top with regard to this requirement, and I'm beginning to wonder based on this response whether creating such a module might do more harm (in terms of duplication) than good (in terms of reduced feature set). I wasn't aware of adminrole, and having that brought up made me think this might be better submitted as a patch to that than its own module, but I'm still waffling a bit here. The real reason that drives me to this though is that you can't apply updates without being uid=1, and that is a particular responsibility I wanted to share amongs admins in my dev shop. I know that I can hack update.php but people keep forgetting to "unhack it", so I was hoping to find a better way. Sounds like people would rather have some combination temporarily assert adminrole than become uid=1 being separated. I'm going to think this over before creating any more duplication. Hmm... On May 11, 2009, at 4:31 AM, Earnie Boyd wrote: > Quoting Arancaytar Ilyaran : > >> This is a terrific idea. I wanted something like that too, a few >> week ago. >> > > You must have missed my response. See http://drupal.org/project/ > masquerade. > > > -- > Earnie > -- http://r-feed.com/ -- http://for-my-kids.com/ > -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ > > From karoly at negyesi.net Tue May 12 05:10:55 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Mon, 11 May 2009 22:10:55 -0700 Subject: [development] Just a note... Message-ID: <7e270cea0905112210i50736986w47996702fa88539c@mail.gmail.com> I just spent about 7 minutes reviewing two Drupal 7 issues before sleep, posted this to twitter and used #ireviewdrupal as a tag. If you so happen to review too (am I already dreaming?) then maybe twitter about it too. I hope we can make the tag reach trending status one day (ok now I am definitely dreaming but lofty dreams are good). From news at unleashedmind.com Tue May 12 08:56:07 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Tue, 12 May 2009 10:56:07 +0200 Subject: [development] Drupal SU module anyone? In-Reply-To: <994D657B-5CA8-4666-ADB2-F0CC9982A731@metzlerd.com> Message-ID: <214601c9d2df$7dad0200$0200a8c0@structworks.com> > The real reason that drives me to this though is that you > can't apply updates without being uid=1, and that is a > particular responsibility I wanted to share amongs admins in > my dev shop. I know that I can hack update.php but people > keep forgetting to "unhack it", so I was hoping to find a better way. FWIW, I would support a core patch that adds a permission to "Run updates". admin_menu exposes this link as well, and can only expose it for uid 1. I see no compelling reason why only uid 1 should be able to run update.php (when the database is available). sun From catch56 at googlemail.com Tue May 12 09:03:39 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Tue, 12 May 2009 10:03:39 +0100 Subject: [development] Drupal SU module anyone? In-Reply-To: <214601c9d2df$7dad0200$0200a8c0@structworks.com> References: <994D657B-5CA8-4666-ADB2-F0CC9982A731@metzlerd.com> <214601c9d2df$7dad0200$0200a8c0@structworks.com> Message-ID: > > FWIW, I would support a core patch that adds a permission to "Run updates". And here it is: http://drupal.org/node/67234 Nat -------------- next part -------------- An HTML attachment was scrubbed... URL: From metzlerd at metzlerd.com Tue May 12 13:49:36 2009 From: metzlerd at metzlerd.com (David Metzler) Date: Tue, 12 May 2009 06:49:36 -0700 Subject: [development] Drupal SU module anyone? In-Reply-To: References: <994D657B-5CA8-4666-ADB2-F0CC9982A731@metzlerd.com> <214601c9d2df$7dad0200$0200a8c0@structworks.com> Message-ID: Ok, given that admin role, or a patch to adminrole to allow sudo seems like a great Idea. I'll move this to the issue queue for that project. On May 12, 2009, at 2:03 AM, Nathaniel Catchpole wrote: > > > FWIW, I would support a core patch that adds a permission to "Run > updates". > > And here it is: http://drupal.org/node/67234 > > Nat -------------- next part -------------- An HTML attachment was scrubbed... URL: From nan_wich at bellsouth.net Tue May 12 19:01:48 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Tue, 12 May 2009 15:01:48 -0400 Subject: [development] Free to a good home Message-ID: http://drupal.org/project/spam_tokens http://drupal.org/project/gotcha Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.26/2110 - Release Date: 5/12/2009 6:22 AM From arancaytar.ilyaran at gmail.com Tue May 12 21:56:33 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Tue, 12 May 2009 23:56:33 +0200 Subject: [development] Just a note... In-Reply-To: <7e270cea0905112210i50736986w47996702fa88539c@mail.gmail.com> References: <7e270cea0905112210i50736986w47996702fa88539c@mail.gmail.com> Message-ID: <4A09F091.5070308@gmail.com> Karoly Negyesi wrote: > I just spent about 7 minutes reviewing two Drupal 7 issues before > sleep, posted this to twitter and used #ireviewdrupal as a tag. If you > so happen to review too (am I already dreaming?) then maybe twitter > about it too. I hope we can make the tag reach trending status one day > (ok now I am definitely dreaming but lofty dreams are good). > Done! I kick out a few patches from the queue every once in a while but haven't twittered about it until just now. :) -- Arancaytar From karoly at negyesi.net Wed May 13 01:22:08 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Tue, 12 May 2009 18:22:08 -0700 Subject: [development] Irresponsible security researcher Message-ID: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> Hi, This guy believes in full disclosure so much he discloses everything he finds instead letting us fix and disclose. This happened more than once. So surely he wont mind if I disclose his mail sent to the security list. According to whois, he is Justin Klein Keane 1122 Green Street Philadelphia, PA 19123 US Phone: 1-215-2320909 Email: jkeane at madirish.net I will let the creative members of the Drupal community figure out ways to express their displeasure with his practice. Mail follows: Hello, First let me state that I love Drupal and evangelize it openly. I run a Drupal users group at my place of employment and have given presentations on the advantages of Drupal at several conferences. I frequently recommend adoption of Drupal and defend its security track record. However, as I said before, I think we've been round the philosophical differences between Drupal security and myself before, and we simply disagree. The first thing I do when I discover a vuln is warn all my colleagues who have Drupal installed. It only makes sense that I warn everyone. I'm not under any illusions that I'm the best at what I do. The "bad guys" get paid to find these vulns, and they don't disclose them. If I've found a vuln, unless you somehow accept that I'm the best at doing this, then you must know that the "bad guys" already know about the vuln. Full disclosure informs end users so they can make an informed decision about whether or not to continue running the system, or whether they need to modify the app or their deployment. I have discovered vulnerabilities before for which Drupal team has not given me credit. Drupal security and I have also disagreed over the severity of security issues which has resulted in patches not being developed (http://drupal.org/node/372836). This combined with the sarcastic replies I often get from the security team, makes me leery of their commitment to credit my discoveries. Furthermore, I've inquired as to contributions I could make to Drupal security team but was rebuffed. So, here's what I have in conclusion: 1) I believe people using Drupal deserve to know about vulnerabilities as soon as possible because "bad guys" already know about them. 2) I don't trust that Drupal security would actually credit me, especially now that relations have sufficiently soured 3) Drupal security seems cliquish and hasn't given me any incentive to work within their framework. I think that leaves us at pretty good loggerheads. I understand you have a tough, and probably thankless job. I laud the contributions you are making to a wonderful open source product. I will be the first to stand up and say you all do a great job at keeping Drupal secure. I will continue to inform Drupal security directly when I discover vulnerabilities, but I would appreciate it if you could respect my motivation for refusing to withhold public disclosure. All the best and keep up the good work, Justin C. Klein Keane http://www.MadIrish.net http://www.LAMPSecurity.org From adame780 at gmail.com Wed May 13 01:30:15 2009 From: adame780 at gmail.com (Adam Ely) Date: Tue, 12 May 2009 18:30:15 -0700 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> Message-ID: <65ee05aa0905121830l129086c6i61ff2861a3b479e9@mail.gmail.com> Seriously, the fact that the info is in the whois database means he is not concerned with it being out there. Furthermore, why act so childish? It is obvious that Mr. Keane is merely concerned with being credited with his discoveries and no matter what you do he will continue down this path of (irresponsible) full disclosure. Should the community stoop to a lower level just because someone does? Do you think this will discourage others from doing the same? The fact is there is a difference in full disclose and responsible full disclosure and Mr. Keane should follow the latter. Read RFP's RFPolicy for a good start on what is considered respnsible for both parties, http://www.wiretrip.net/rfp/policy.html. Adam On Tue, May 12, 2009 at 6:22 PM, Karoly Negyesi wrote: > Hi, > > This guy believes in full disclosure so much he discloses everything > he finds instead letting us fix and disclose. This happened more than > once. So surely he wont mind if I disclose his mail sent to the > security list. According to whois, he is > > Justin Klein Keane > 1122 Green Street > Philadelphia, PA 19123 > US > Phone: 1-215-2320909 > Email: jkeane at madirish.net > > I will let the creative members of the Drupal community figure out > ways to express their displeasure with his practice. Mail follows: > > Hello, > > First let me state that I love Drupal and evangelize it openly. I run > a Drupal users group at my place of employment and have given > presentations on the advantages of Drupal at several conferences. I > frequently recommend adoption of Drupal and defend its security track > record. > > However, as I said before, I think we've been round the philosophical > differences between Drupal security and myself before, and we simply > disagree. The first thing I do when I discover a vuln is warn all my > colleagues who have Drupal installed. It only makes sense that I warn > everyone. I'm not under any illusions that I'm the best at what I do. > The "bad guys" get paid to find these vulns, and they don't disclose > them. If I've found a vuln, unless you somehow accept that I'm the best > at doing this, then you must know that the "bad guys" already know about > the vuln. Full disclosure informs end users so they can make an > informed decision about whether or not to continue running the system, > or whether they need to modify the app or their deployment. > > I have discovered vulnerabilities before for which Drupal team has not > given me credit. Drupal security and I have also disagreed over the > severity of security issues which has resulted in patches not being > developed (http://drupal.org/node/372836). This combined with the > sarcastic replies I often get from the security team, makes me leery of > their commitment to credit my discoveries. Furthermore, I've inquired > as to contributions I could make to Drupal security team but was > rebuffed. So, here's what I have in conclusion: > > 1) I believe people using Drupal deserve to know about vulnerabilities > as soon as possible because "bad guys" already know about them. > 2) I don't trust that Drupal security would actually credit me, > especially now that relations have sufficiently soured > 3) Drupal security seems cliquish and hasn't given me any incentive to > work within their framework. > > I think that leaves us at pretty good loggerheads. I understand you > have a tough, and probably thankless job. I laud the contributions you > are making to a wonderful open source product. I will be the first to > stand up and say you all do a great job at keeping Drupal secure. I > will continue to inform Drupal security directly when I discover > vulnerabilities, but I would appreciate it if you could respect my > motivation for refusing to withhold public disclosure. > > All the best and keep up the good work, > > Justin C. Klein Keane > http://www.MadIrish.net > http://www.LAMPSecurity.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: From simon at emspace.com.au Wed May 13 00:24:28 2009 From: simon at emspace.com.au (Simon Hobbs) Date: Wed, 13 May 2009 10:24:28 +1000 Subject: [development] 3rd party sites/all/plugins Message-ID: Hiya Is there best practice for 3rd party plugins? Recently a tiny site was upgraded, the fckeditor module was updated but the dev didn't re-add fckeditor. The owner didn't notice for ages and eventually I have to work backwards through backups to make sure I get the right (possibly customized) package. So I've started creating a sites/all/plugins folder for all the fckeditors / swfobject / jqueryplugins / pdfwriters / etc that I need for a job. I then use symlinks, so in the scramble the fix is simple. It's nice too I can put different versions of tools side by side, and the symlink just points to the desired one. In theory it would be great if modules expected a plugin folder. For non-professionals we put them under duress with install instructions that tell them to clutter their modules with plugins, making upgrades harder for them, and I think we send the message that altering modules is ok. Thoughts or guidance? Thanks Simon Hobbs / sime From domenic at workhabit.com Wed May 13 02:13:11 2009 From: domenic at workhabit.com (Domenic Santangelo) Date: Tue, 12 May 2009 19:13:11 -0700 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> Message-ID: On Tue, May 12, 2009 at 6:22 PM, Karoly Negyesi wrote: > I will let the creative members of the Drupal community figure out > ways to express their displeasure with his practice. Mail follows: Yeah, you really showed him. -D From naheemzaffar at gmail.com Wed May 13 02:31:04 2009 From: naheemzaffar at gmail.com (Naheem Zaffar) Date: Wed, 13 May 2009 03:31:04 +0100 Subject: [development] 3rd party sites/all/plugins In-Reply-To: References: Message-ID: <3adc77210905121931m2a3e7e93n1834f0bbccc8788d@mail.gmail.com> I think a lot of amatuers would overwrite the existing module folder with the updated version (or use plugin_manager - which does the same thing) - that way any plugin folders inside the module folder should remain intact. -------------- next part -------------- An HTML attachment was scrubbed... URL: From news at unleashedmind.com Wed May 13 06:28:45 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Wed, 13 May 2009 08:28:45 +0200 Subject: [development] 3rd party sites/all/plugins In-Reply-To: Message-ID: <22ee01c9d394$1146e850$0200a8c0@structworks.com> Hi Simon, Separate location for editor libraries http://drupal.org/node/320562 investigates exactly this issue. Of course, that is closely tied to Wysiwyg API - but from all contrib modules out there, I assume that Wysiwyg API is the one that needs this most. Let's discuss on-issue. sun > -----Original Message----- > From: development-bounces at drupal.org > [mailto:development-bounces at drupal.org] On Behalf Of Simon Hobbs > Sent: Wednesday, May 13, 2009 2:24 AM > To: development at drupal.org > Subject: [development] 3rd party sites/all/plugins > > Hiya > > Is there best practice for 3rd party plugins? > > Recently a tiny site was upgraded, the fckeditor module was > updated but the dev didn't re-add fckeditor. The owner didn't > notice for ages and eventually I have to work backwards > through backups to make sure I get the right (possibly > customized) package. > > So I've started creating a sites/all/plugins folder for all > the fckeditors / swfobject / jqueryplugins / pdfwriters / etc > that I need for a job. I then use symlinks, so in the > scramble the fix is simple. > > It's nice too I can put different versions of tools side by > side, and the symlink just points to the desired one. > > In theory it would be great if modules expected a plugin folder. > > For non-professionals we put them under duress with install > instructions that tell them to clutter their modules with > plugins, making upgrades harder for them, and I think we send > the message that altering modules is ok. > > Thoughts or guidance? > > Thanks > Simon Hobbs / sime > From tz at it-arts.org Wed May 13 07:27:00 2009 From: tz at it-arts.org (Thomas Zahreddin) Date: Wed, 13 May 2009 09:27:00 +0200 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> Message-ID: <1242199620.4331.15.camel@thomas-desktop> Hi, i read from this mail and behavior: - this person wants to improve security of drupal - he made a patch, that maybe wasn't accepted or he was disapointed with the procedures of the community - he made a decission for himself how to handle similiar cases -> so what's wrong with the person? Nothing. (Nobody said, that i or someone else should agree with his decission!) He is just one more who does not believe in the practices of the community. It just files a missed chance of participation. Best Thomas Zahreddin Am Dienstag, den 12.05.2009, 18:22 -0700 schrieb Karoly Negyesi: > Hi, > > This guy believes in full disclosure so much he discloses everything > he finds instead letting us fix and disclose. This happened more than > once. So surely he wont mind if I disclose his mail sent to the > security list. According to whois, he is > > Justin Klein Keane > 1122 Green Street > Philadelphia, PA 19123 > US > Phone: 1-215-2320909 > Email: jkeane at madirish.net > > I will let the creative members of the Drupal community figure out > ways to express their displeasure with his practice. Mail follows: > > Hello, > > First let me state that I love Drupal and evangelize it openly. I run > a Drupal users group at my place of employment and have given > presentations on the advantages of Drupal at several conferences. I > frequently recommend adoption of Drupal and defend its security track > record. > > However, as I said before, I think we've been round the philosophical > differences between Drupal security and myself before, and we simply > disagree. The first thing I do when I discover a vuln is warn all my > colleagues who have Drupal installed. It only makes sense that I warn > everyone. I'm not under any illusions that I'm the best at what I do. > The "bad guys" get paid to find these vulns, and they don't disclose > them. If I've found a vuln, unless you somehow accept that I'm the best > at doing this, then you must know that the "bad guys" already know about > the vuln. Full disclosure informs end users so they can make an > informed decision about whether or not to continue running the system, > or whether they need to modify the app or their deployment. > > I have discovered vulnerabilities before for which Drupal team has not > given me credit. Drupal security and I have also disagreed over the > severity of security issues which has resulted in patches not being > developed (http://drupal.org/node/372836). This combined with the > sarcastic replies I often get from the security team, makes me leery of > their commitment to credit my discoveries. Furthermore, I've inquired > as to contributions I could make to Drupal security team but was > rebuffed. So, here's what I have in conclusion: > > 1) I believe people using Drupal deserve to know about vulnerabilities > as soon as possible because "bad guys" already know about them. > 2) I don't trust that Drupal security would actually credit me, > especially now that relations have sufficiently soured > 3) Drupal security seems cliquish and hasn't given me any incentive to > work within their framework. > > I think that leaves us at pretty good loggerheads. I understand you > have a tough, and probably thankless job. I laud the contributions you > are making to a wonderful open source product. I will be the first to > stand up and say you all do a great job at keeping Drupal secure. I > will continue to inform Drupal security directly when I discover > vulnerabilities, but I would appreciate it if you could respect my > motivation for refusing to withhold public disclosure. > > All the best and keep up the good work, > > Justin C. Klein Keane > http://www.MadIrish.net > http://www.LAMPSecurity.org From simon at emspace.com.au Wed May 13 08:11:17 2009 From: simon at emspace.com.au (Simon Hobbs) Date: Wed, 13 May 2009 18:11:17 +1000 Subject: [development] 3rd party sites/all/plugins In-Reply-To: <22ee01c9d394$1146e850$0200a8c0@structworks.com> References: <22ee01c9d394$1146e850$0200a8c0@structworks.com> Message-ID: sun FWIW, I felt that SWF Tools, which has heaps of plugins, also suffered from this (swfobject, flash players, etc). Thanks for the thread link. Simon On Wed, May 13, 2009 at 4:28 PM, Daniel F. Kudwien wrote: > Hi Simon, > > Separate location for editor libraries > http://drupal.org/node/320562 > > investigates exactly this issue. ?Of course, that is closely tied to Wysiwyg > API - but from all contrib modules out there, I assume that Wysiwyg API is > the one that needs this most. > > Let's discuss on-issue. > > sun > >> -----Original Message----- >> From: development-bounces at drupal.org >> [mailto:development-bounces at drupal.org] On Behalf Of Simon Hobbs >> Sent: Wednesday, May 13, 2009 2:24 AM >> To: development at drupal.org >> Subject: [development] 3rd party sites/all/plugins >> >> Hiya >> >> Is there best practice for 3rd party plugins? >> >> Recently a tiny site was upgraded, the fckeditor module was >> updated but the dev didn't re-add fckeditor. The owner didn't >> notice for ages and eventually I have to work backwards >> through backups to make sure I get the right (possibly >> customized) package. >> >> So I've started creating a sites/all/plugins folder for all >> the fckeditors / swfobject / jqueryplugins / pdfwriters / etc >> that I need for a job. I then use symlinks, so in the >> scramble the fix is simple. >> >> It's nice too I can put different versions of tools side by >> side, and the symlink just points to the desired one. >> >> In theory it would be great if modules expected a plugin folder. >> >> For non-professionals we put them under duress with install >> instructions that tell them to clutter their modules with >> plugins, making upgrades harder for them, and I think we send >> the message that altering modules is ok. >> >> Thoughts or guidance? >> >> Thanks >> Simon Hobbs / sime >> > > From karoly at negyesi.net Wed May 13 08:20:47 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Wed, 13 May 2009 01:20:47 -0700 Subject: [development] Irresponsible security researcher In-Reply-To: <1242199620.4331.15.camel@thomas-desktop> References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> <1242199620.4331.15.camel@thomas-desktop> Message-ID: <7e270cea0905130120w3d82bd43x54fe6122439d7cdf@mail.gmail.com> > - this person wants to improve security of drupal > - he made a patch, that maybe wasn't accepted or he was disapointed with > the procedures of the community He made a patch? > -> so what's wrong with the person? Check his site. Maybe the fact that he never posts a fix on the issues he discloses (i might have missed some)? And his disclosures include precise, step-by-step exploits? That's not so nice, is it? Regards NK From tz at it-arts.org Wed May 13 08:33:59 2009 From: tz at it-arts.org (Thomas Zahreddin) Date: Wed, 13 May 2009 10:33:59 +0200 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905130120w3d82bd43x54fe6122439d7cdf@mail.gmail.com> References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> <1242199620.4331.15.camel@thomas-desktop> <7e270cea0905130120w3d82bd43x54fe6122439d7cdf@mail.gmail.com> Message-ID: <1242203639.4331.25.camel@thomas-desktop> Hallo Karoly, and community, thank you for beeing accurate: "Drupal security and I have also disagreed over the severity of security issues which has resulted in patches not being developed (http://drupal.org/node/372836)" so he disagreed at least ... I also don't post fixes, since i see so many patches and issues rotting in the issue queue. Sometimes i suggest something and i get 'it is this way by design'. But how to envole the topic? Sometimes i write for hours doku and it disappears (or is no longer accessible for me) These are expieriences over the last two year, i don't have concrete topics i can point to - but they exist and force me in a leecher state. And by the way it is not true, that drupal needs more code, if you think so take all patches form the issue queues. And it is allso not true, that drupal is a dookratie, since all the authors of the patches contributed. I dislike contributing patches that sit for years or for ever in queues So i can't see the value of just another patch. Best Thomas Zahreddin Am Mittwoch, den 13.05.2009, 01:20 -0700 schrieb Karoly Negyesi: > > - this person wants to improve security of drupal > > - he made a patch, that maybe wasn't accepted or he was disapointed with > > the procedures of the community > > He made a patch? > > > -> so what's wrong with the person? > > Check his site. Maybe the fact that he never posts a fix on the issues > he discloses (i might have missed some)? And his disclosures include > precise, step-by-step exploits? That's not so nice, is it? > > Regards > > NK From news at unleashedmind.com Wed May 13 08:36:10 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Wed, 13 May 2009 10:36:10 +0200 Subject: [development] Irresponsible security researcher In-Reply-To: <1242199620.4331.15.camel@thomas-desktop> Message-ID: <230d01c9d3a5$de6511c0$0200a8c0@structworks.com> > He is just one more who does not believe in the practices of > the community. You, he, me, and everyone else is free to believe whatever one wants to believe. As long as this belief does not result in actions that harm someone else. Justin Klein Keane's publications harm the Drupal community and Drupal site owners at glance. We, the Drupal community, set up and agreed on the security review and announcement process the way it works today. His posts are hi-jacking this process; and that's why he is absolutely irresponsible - no matter whether his findings are valid or not. The result of Justin Klein Keane's actions is that people may think that Drupal is insecure - not providing fixes for potential security vulnerabilities that may exist. Contrary to what Justin Klein Keane thinks; he does not help anyone. Justin's assumpations only make things worse. True is that we cannot prevent him from doing so. True is also that he is not respecting the Drupal community and Security Team by doing so. But true is also that we do not have to respect him for his actions if he even continues to harm everyone after trying to get him on board. sun From news at unleashedmind.com Wed May 13 08:43:31 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Wed, 13 May 2009 10:43:31 +0200 Subject: [development] 3rd party sites/all/plugins In-Reply-To: Message-ID: <230e01c9d3a6$e5248ee0$0200a8c0@structworks.com> > FWIW, I felt that SWF Tools, which has heaps of plugins, also > suffered from this (swfobject, flash players, etc). Thanks > for the thread link. > > Simon I see. I know that there are thoughts and approaches for Drupal core already. But I really think this is something we have to iron-out in contrib, because core on its own does not ship with functionality that depends on external libraries. It would be great if we could standardize on something, maybe starting with SWF Tools and Wysiwyg API. So, let's discuss on-issue, please. sun From cxjohnson at gmail.com Wed May 13 14:12:04 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Wed, 13 May 2009 09:12:04 -0500 Subject: [development] Irresponsible security researcher In-Reply-To: <230d01c9d3a5$de6511c0$0200a8c0@structworks.com> References: <1242199620.4331.15.camel@thomas-desktop> <230d01c9d3a5$de6511c0$0200a8c0@structworks.com> Message-ID: <9ea8d6030905130712j32d44ccbtde6f9d42f26d5e56@mail.gmail.com> Not that we need to have an extensive discussion on this character, but I'm in agreement with sun. JKK is -- as one subculture of slang in America would say -- "dissing" [1] the Drupal community and security team. And although it is only the written word, I detect a personality in his writings which is not the kind of person I'd want to work with or associate with. It's not just that he disagrees, but that he thinks he is better and the rules (if any) in any situation do not apply to him. But as sun wrote, there's not much we can do. It probably won't help our cause to intentionally irritate him. [1] http://en.wiktionary.org/wiki/diss On Wed, May 13, 2009 at 3:36 AM, Daniel F. Kudwien wrote: >> He is just one more who does not believe in the practices of >> the community. > > You, he, me, and everyone else is free to believe whatever one wants to > believe. > > As long as this belief does not result in actions that harm someone else. > > > Justin Klein Keane's publications harm the Drupal community and Drupal site > owners at glance. ?We, the Drupal community, set up and agreed on the > security review and announcement process the way it works today. ?His posts > are hi-jacking this process; and that's why he is absolutely irresponsible - > no matter whether his findings are valid or not. > > The result of Justin Klein Keane's actions is that people may think that > Drupal is insecure - not providing fixes for potential security > vulnerabilities that may exist. ?Contrary to what Justin Klein Keane thinks; > he does not help anyone. ?Justin's assumpations only make things worse. > > > True is that we cannot prevent him from doing so. > > True is also that he is not respecting the Drupal community and Security > Team by doing so. > > But true is also that we do not have to respect him for his actions if he > even continues to harm everyone after trying to get him on board. > > > sun > > From me at joshuarogers.net Wed May 13 14:14:39 2009 From: me at joshuarogers.net (Joshua Rogers) Date: Wed, 13 May 2009 09:14:39 -0500 Subject: [development] Irresponsible security researcher Message-ID: <200905130914.39384.me@joshuarogers.net> I'm not quite sure that giving out his personal information to a group of annoyed developers is a good idea. Something about inciting a riot just seems wrong. We can't force him to play by our rules and see things our way (even though his is wrong. ;) I can say that personally it does cause me to wonder about this "ethical hacker." (It says so on his resume. Really.) Personally, by endangering those who use the software that he exams, I see him more as a passive- aggressive black-hat. And maybe a little over jealous at that. http://drupal.org/node/372836 (which apparently he wasn't credited with) amounts to "if you let someone administer nodes they can change things."... Yes. Better though was http://justin.madirish.net/drupal6-cck-vulnerability. It boils down to 'people with "Use PHP input field settings" permissions can run PHP'... So... I guess that makes this a un-bug report? (Maybe an "Everything is working like it is supposed to." report?) At least now I know one less person that I have to take seriously (on a professional level.) J Rogers On Tuesday 12 May 2009 8:22:08 pm Karoly Negyesi wrote: > Hi, > > This guy believes in full disclosure so much he discloses everything > he finds instead letting us fix and disclose. This happened more than > once. So surely he wont mind if I disclose his mail sent to the > security list. According to whois, he is > > Justin Klein Keane > 1122 Green Street > Philadelphia, PA 19123 > US > Phone: 1-215-2320909 > Email: jkeane at madirish.net > > I will let the creative members of the Drupal community figure out > ways to express their displeasure with his practice. From karoly at negyesi.net Wed May 13 14:46:16 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Wed, 13 May 2009 07:46:16 -0700 Subject: [development] Irresponsible security researcher In-Reply-To: <200905130914.39384.me@joshuarogers.net> References: <200905130914.39384.me@joshuarogers.net> Message-ID: <7e270cea0905130746g6efd0063u907d68f9ca830420@mail.gmail.com> > Justin Klein Keane's publications harm the Drupal community and Drupal site > owners at glance. > I'm not quite sure that giving out his personal information to a group of > Something about inciting a riot just seems wrong. >> I will let the creative members of the Drupal community figure out >> ways to express their displeasure with his practice. I was not asking for riots, violence or harm in any ways. I have chosen my words rather carefully and people apparently did not read them. I was asking for creative, funny pranks which makes him look and feel like the asshat he is. From me at joshuarogers.net Wed May 13 14:56:48 2009 From: me at joshuarogers.net (Joshua Rogers) Date: Wed, 13 May 2009 09:56:48 -0500 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905130746g6efd0063u907d68f9ca830420@mail.gmail.com> References: <200905130914.39384.me@joshuarogers.net> <7e270cea0905130746g6efd0063u907d68f9ca830420@mail.gmail.com> Message-ID: <200905130956.48889.me@joshuarogers.net> Sorry. I seem to have forgotten my ;) I didn't really suspect that you wanted to do start a riot. I think we should help him. Personally, I discovered a vulnerability of my own this morning. It's right up his alley. If you have an administrator on your site, it seems that they can change almost anything! (Yes, massively sarcastic.) To make drupal safer, we should get rid of uid 1. Yep... Safer.... ;) Any objections? > I was not asking for riots, violence or harm in any ways. I have > chosen my words rather carefully and people apparently did not read > them. I was asking for creative, funny pranks which makes him look and > feel like the asshat he is. From andrewberry at sentex.net Wed May 13 15:00:14 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Wed, 13 May 2009 11:00:14 -0400 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> Message-ID: On 12-May-09, at 9:22 PM, Karoly Negyesi wrote: > This guy believes in full disclosure so much he discloses everything > he finds instead letting us fix and disclose. Did he report this issue? http://justin.madirish.net/node/339. I still seems exploitable. I see he's been credited for SA's in the past. It's a shame that the noise from him is drowning out the real issues he's finding. If there are a sizeable number of issues on his site which he hasn't reported, any idea how much of a backlog this will create for the SA team? Since the exploits are public, perhaps we should organize to go through his site and figure out what is still exploitable. --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available URL: From greg.knaddison at gmail.com Wed May 13 15:01:41 2009 From: greg.knaddison at gmail.com (Greg Knaddison) Date: Wed, 13 May 2009 09:01:41 -0600 Subject: [development] Irresponsible security researcher In-Reply-To: <200905130914.39384.me@joshuarogers.net> References: <200905130914.39384.me@joshuarogers.net> Message-ID: <3861c6770905130801r182ad812sd48ad4bb5738a04d@mail.gmail.com> On Wed, May 13, 2009 at 8:14 AM, Joshua Rogers wrote: > I can say that personally it does cause me to wonder about this "ethical > hacker." ?(It says so on his resume. ?Really.) ?Personally, by endangering > those who use the software that he exams, I see him more as a passive- > aggressive black-hat. ?And maybe a little over jealous at that. I'm not sure about "black-hat". As far as I know he's not breaking into sites... He's a system admin for his employer and part of that work is to identify vulnerabilities in their server sotware which happens to include Drupal. It's nice that he is putting effort into finding weaknesses (that's often a huge part of the process). It would be even better if he (and/or his employers) would allocate time to fixing the bugs rather than just finding and shouting about it. > http://drupal.org/node/372836 (which apparently he wasn't credited with) > amounts to "if you let someone administer nodes they can change things."... > Yes. ?Better though was http://justin.madirish.net/drupal6-cck-vulnerability. > It boils down to 'people with "Use PHP input field settings" permissions can > run PHP'... ?So... ?I guess that makes this a un-bug report? ?(Maybe an > "Everything is working like it is supposed to." report?) Exactly! It's not a vulnerability so there's no need to credit someone with finding it... The security team tries to address issues within 2 weeks, but that's often hard. When there is a public disclosure we try harder to address them quickly, but the extra attention and confusion it creates doesn't help. A lot of the decisions from the security team are compromises - we do things for 5.x and 6.x that are guaranteed to work, but are not clean enough to be accepted into Drupal in general (see http://drupal.org/node/449078 for example). The specific SA where Justin did not get credit was another situation of making a compromise: the "vulnerability" was disclosed and nobody on the team felt it was important enough to fix personally. Justin and his employer were unwilling to allocate their resources to fix it. So, given that public disclosure had occurred and that the security team wasn't going to fix it and that we wanted to respond in a timely manner...we did a "public service announcement" reminding people that admin means admin. > At least now I know one less person that I have to take seriously (on a > professional level.) This is somewhat true, and I certainly don't have a lot of love for Justin's online behavior. However, it's easy to get pissed at people online. I imagine that if I got to hang out with Justin over a delicious Philadelphia cheesesteak we'd be pretty friendly. He's got a different philosophy on security disclosure and doesn't prioritize contributing patches the same way that a lot of us do. That different philosophy and lower value on contributing patches doesn't mean he's unprofessional or an evil human. Regards, Greg -- Greg Knaddison | 303-800-5623 | http://growingventuresolutions.com Cracking Drupal - Learn to protect your Drupal site from hackers Now available from Wiley http://crackingdrupal.com From Greg at GrowingVentureSolutions.com Wed May 13 15:07:37 2009 From: Greg at GrowingVentureSolutions.com (Greg Knaddison) Date: Wed, 13 May 2009 09:07:37 -0600 Subject: [development] Irresponsible security researcher In-Reply-To: References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> Message-ID: <3861c6770905130807x79c33eaaoae153c4841899b0@mail.gmail.com> On Wed, May 13, 2009 at 9:00 AM, Andrew Berry wrote: > On 12-May-09, at 9:22 PM, Karoly Negyesi wrote: > >> This guy believes in full disclosure so much he discloses everything >> he finds instead letting us fix and disclose. > > Did he report this issue? http://justin.madirish.net/node/339. I still seems > exploitable. I see he's been credited for SA's in the past. It's a shame > that the noise from him is drowning out the real issues he's finding. It's the same as http://drupal.org/node/372836 or maybe it's even the issue that prompted http://drupal.org/node/372836 Either way, it's "addressed." Regards, Greg -- Greg Knaddison | 303-800-5623 | http://growingventuresolutions.com Cracking Drupal - Learn to protect your Drupal site from hackers Now available from Wiley http://crackingdrupal.com From winborn at advomatic.com Wed May 13 15:14:31 2009 From: winborn at advomatic.com (Aaron Winborn) Date: Wed, 13 May 2009 11:14:31 -0400 Subject: [development] 3rd party sites/all/plugins In-Reply-To: References: Message-ID: <4A0AE3D7.3090608@advomatic.com> I'm in favor going forward of using sites/all/plugins for third party plugins. First, it's a centralized location, and the convention is being adopted throughout contrib, and even core (http://drupal.org/node/315100). Secondly, as you note, it discourages the practice of directly modifying a module directory structure. Thirdly, it allows for drupal_get_path('plugins', 'foo'), if a foo.info file exists (i.e., /sites/all/plugins/foo/foo.info). Aaron Simon Hobbs wrote: > Hiya > > Is there best practice for 3rd party plugins? > > Recently a tiny site was upgraded, the fckeditor module was updated > but the dev didn't re-add fckeditor. The owner didn't notice for ages > and eventually I have to work backwards through backups to make sure I > get the right (possibly customized) package. > > So I've started creating a sites/all/plugins folder for all the > fckeditors / swfobject / jqueryplugins / pdfwriters / etc that I need > for a job. I then use symlinks, so in the scramble the fix is simple. > > It's nice too I can put different versions of tools side by side, and > the symlink just points to the desired one. > > In theory it would be great if modules expected a plugin folder. > > For non-professionals we put them under duress with install > instructions that tell them to clutter their modules with plugins, > making upgrades harder for them, and I think we send the message that > altering modules is ok. > > Thoughts or guidance? > > Thanks > Simon Hobbs / sime > -- Aaron Winborn Advomatic, LLC http://advomatic.com/ Drupal Multimedia available in September! http://www.packtpub.com/create-multimedia-website-with-drupal/book My blog: http://aaronwinborn.com/ From simon at emspace.com.au Wed May 13 15:38:53 2009 From: simon at emspace.com.au (Simon Hobbs) Date: Thu, 14 May 2009 01:38:53 +1000 Subject: [development] 3rd party sites/all/plugins In-Reply-To: <4A0AE3D7.3090608@advomatic.com> References: <4A0AE3D7.3090608@advomatic.com> Message-ID: Hi Aaron I've posted some ideas on sun's link http://drupal.org/node/320562 would love your comments there, as WYSIWYG could be a great leader in establishing a convention. Simon On Thu, May 14, 2009 at 1:14 AM, Aaron Winborn wrote: > I'm in favor going forward of using sites/all/plugins for third party > plugins. First, it's a centralized location, and the convention is being > adopted throughout contrib, and even core (http://drupal.org/node/315100). > Secondly, as you note, it discourages the practice of directly modifying a > module directory structure. Thirdly, it allows for > drupal_get_path('plugins', 'foo'), if a foo.info file exists (i.e., > /sites/all/plugins/foo/foo.info). > > Aaron > > Simon Hobbs wrote: >> >> Hiya >> >> Is there best practice for 3rd party plugins? >> >> Recently a tiny site was upgraded, the fckeditor module was updated >> but the dev didn't re-add fckeditor. The owner didn't notice for ages >> and eventually I have to work backwards through backups to make sure I >> get the right (possibly customized) package. >> >> So I've started creating a sites/all/plugins folder for all the >> fckeditors / swfobject / jqueryplugins / pdfwriters / etc that I need >> for a job. I then use symlinks, so in the scramble the fix is simple. >> >> It's nice too I can put different versions of tools side by side, and >> the symlink just points to the desired one. >> >> In theory it would be great if modules expected a plugin folder. >> >> For non-professionals we put them under duress with install >> instructions that tell them to clutter their modules with plugins, >> making upgrades harder for them, and I think we send the message that >> altering modules is ok. >> >> Thoughts or guidance? >> >> Thanks >> Simon Hobbs / sime >> > > > -- > Aaron Winborn > > Advomatic, LLC > http://advomatic.com/ > > Drupal Multimedia available in September! > http://www.packtpub.com/create-multimedia-website-with-drupal/book > > My blog: > http://aaronwinborn.com/ > > From enboig at gmail.com Wed May 13 15:49:55 2009 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Wed, 13 May 2009 17:49:55 +0200 Subject: [development] rebuilding permissions stuck at node 35 Message-ID: <45a29f450905130849u7e2f9760icdfcd8fca3cbffa7@mail.gmail.com> I have coded a module to modify access to nodes; but when I rebuild permissions, it starts at node 1, goes counting, and then when it reaches 49 it starts rebuilding permission for node 35. My custom function to write permissions is: function wu_node_access_records($node) { $extra_strings=module_invoke_all('wu_node_access_records', $node); //this allow other modules to add strings sort($extra_strings); // idem $res=db_query("SELECT * FROM {wu_nodes} WHERE nid=%d",$node->nid); while ($row=db_fetch_object($res)) $grants[] = array( 'realm' => 'wu_'.$row->wu_realm.(!empty($extra_strings) ? " <###> ".implode(" <###> ", $extra_strings): ""), 'gid' => $row->wu_nid, 'grant_view' => 1, 'grant_update' => 1, 'grant_delete' => 1, 'priority' => 0, //maybe should be increased ); drupal_set_message("rebuilding node: ".$node->nid."-".$node->vid); //debug return isset($grants) ? $grants : NULL; } and it returns: * rebuilding node: 1-1 * rebuilding node: 23-23 * rebuilding node: 24-24 * rebuilding node: 27-27 * rebuilding node: 28-28 * rebuilding node: 29-29 * rebuilding node: 30-30 * rebuilding node: 31-31 * rebuilding node: 32-32 * rebuilding node: 33-33 * rebuilding node: 34-34 * rebuilding node: 35-35 * rebuilding node: 36-36 * rebuilding node: 40-40 * rebuilding node: 42-42 * rebuilding node: 43-43 * rebuilding node: 44-44 * rebuilding node: 45-45 * rebuilding node: 35-35 * rebuilding node: 47-47 * rebuilding node: 48-48 * rebuilding node: 49-49 * rebuilding node: 35-35 * rebuilding node: 35-35 * The content access permissions have been rebuilt. Any hint is wellcome -- *La vida ?s com una taronja, qu? esperes a exprimir-la? *Si creus que l'educaci? ?s cara, prova la ignor?ncia. *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From news at unleashedmind.com Wed May 13 15:56:18 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Wed, 13 May 2009 17:56:18 +0200 Subject: [development] 3rd party sites/all/plugins In-Reply-To: <4A0AE3D7.3090608@advomatic.com> Message-ID: <241d01c9d3e3$5a86f240$0200a8c0@structworks.com> > I'm in favor going forward of using sites/all/plugins for > third party plugins. First, it's a centralized location, and > the convention is being adopted throughout contrib, and even > core (http://drupal.org/node/315100). Secondly, as you note, > it discourages the practice of directly modifying a module > directory structure. > Thirdly, it allows for drupal_get_path('plugins', 'foo'), if > a foo.info file exists (i.e., /sites/all/plugins/foo/foo.info). > > Aaron I specifically did not point to that core issue, because the way "plugins" are discussed there is something completely different. Modules don't ship with external libraries and external libraries do not ship with .info files. Period. The entire proposed design for "plugins" does not apply. Luckily, sime already followed up on the other issue and added valuable thoughts about requirements of SWF Tools and potential other use-cases. sun From enboig at gmail.com Wed May 13 16:07:59 2009 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Wed, 13 May 2009 18:07:59 +0200 Subject: [development] rebuilding permissions stuck at node 35 In-Reply-To: <45a29f450905130849u7e2f9760icdfcd8fca3cbffa7@mail.gmail.com> References: <45a29f450905130849u7e2f9760icdfcd8fca3cbffa7@mail.gmail.com> Message-ID: <45a29f450905130907x27f0e319t9d651b7bcdc03853@mail.gmail.com> It was a mistake of the load function, it was (I don't know why) modifying the nid of the node. On Wed, May 13, 2009 at 5:49 PM, Llu?s wrote: > I have coded a module to modify access to nodes; but when I rebuild > permissions, it starts at node 1, goes counting, and then when it > reaches 49 it starts rebuilding permission for node 35. My custom > function to write permissions is: > > function wu_node_access_records($node) { > ?$extra_strings=module_invoke_all('wu_node_access_records', $node); > //this allow other modules to add strings > ?sort($extra_strings); ?// idem > > ?$res=db_query("SELECT * FROM {wu_nodes} WHERE nid=%d",$node->nid); > ?while ($row=db_fetch_object($res)) > ? ?$grants[] = array( > ? ? ?'realm' => 'wu_'.$row->wu_realm.(!empty($extra_strings) ? " > <###> ".implode(" <###> ", $extra_strings): ""), > ? ? ?'gid' => $row->wu_nid, > ? ? ?'grant_view' => 1, > ? ? ?'grant_update' => 1, > ? ? ?'grant_delete' => 1, > ? ? ?'priority' => 0, ?//maybe should be increased > ? ?); > ?drupal_set_message("rebuilding node: ".$node->nid."-".$node->vid); //debug > ?return isset($grants) ? $grants : NULL; > } > > and it returns: > ? ?* rebuilding node: 1-1 > ? ?* rebuilding node: 23-23 > ? ?* rebuilding node: 24-24 > ? ?* rebuilding node: 27-27 > ? ?* rebuilding node: 28-28 > ? ?* rebuilding node: 29-29 > ? ?* rebuilding node: 30-30 > ? ?* rebuilding node: 31-31 > ? ?* rebuilding node: 32-32 > ? ?* rebuilding node: 33-33 > ? ?* rebuilding node: 34-34 > ? ?* rebuilding node: 35-35 > ? ?* rebuilding node: 36-36 > ? ?* rebuilding node: 40-40 > ? ?* rebuilding node: 42-42 > ? ?* rebuilding node: 43-43 > ? ?* rebuilding node: 44-44 > ? ?* rebuilding node: 45-45 > ? ?* rebuilding node: 35-35 > ? ?* rebuilding node: 47-47 > ? ?* rebuilding node: 48-48 > ? ?* rebuilding node: 49-49 > ? ?* rebuilding node: 35-35 > ? ?* rebuilding node: 35-35 > ? ?* The content access permissions have been rebuilt. > > > Any hint is wellcome > > -- > *La vida ?s com una taronja, qu? esperes a exprimir-la? > *Si creus que l'educaci? ?s cara, prova la ignor?ncia. > *La vida ?s com una moneda, la pots gastar en el que vulguis per? > nom?s una vegada. > *Abans d'imprimir aquest missatge, pensa en el medi ambient. > -- *La vida ?s com una taronja, qu? esperes a exprimir-la? *Si creus que l'educaci? ?s cara, prova la ignor?ncia. *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From mike at mikeyp.net Wed May 13 21:16:37 2009 From: mike at mikeyp.net (Michael Prasuhn) Date: Wed, 13 May 2009 14:16:37 -0700 Subject: [development] Irresponsible security researcher In-Reply-To: <3861c6770905130801r182ad812sd48ad4bb5738a04d@mail.gmail.com> References: <200905130914.39384.me@joshuarogers.net> <3861c6770905130801r182ad812sd48ad4bb5738a04d@mail.gmail.com> Message-ID: On May 13, 2009, at 8:01 AM, Greg Knaddison wrote: > The specific SA where Justin did not get credit was another situation > of making a compromise: the "vulnerability" was disclosed and nobody > on the team felt it was important enough to fix personally. Justin > and his employer were unwilling to allocate their resources to fix it. > > So, given that public disclosure had occurred and that the security > team wasn't going to fix it and that we wanted to respond in a timely > manner...we did a "public service announcement" reminding people that > admin means admin. While I'm not on the security team, I would like to point out that Justin was also not the only person to report a possible XSS vulnerability resulting from the 'administer content types' permission prior to SA-CORE-2009-002 ;) -Mike * Please don't interpret this as my attempt to receive credit or any such thing. The thought of attempting to receive credit for such an obvious and commonly reported issue hadn't even crossed my mind until now. __________________ Michael Prasuhn mike at mikeyp.net http://mikeyp.net From shiva at io.com Thu May 14 00:08:41 2009 From: shiva at io.com (Earl Cooley III) Date: Wed, 13 May 2009 19:08:41 -0500 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905130746g6efd0063u907d68f9ca830420@mail.gmail.com> References: <200905130914.39384.me@joshuarogers.net> <7e270cea0905130746g6efd0063u907d68f9ca830420@mail.gmail.com> Message-ID: <4A0B6109.7020500@io.com> Karoly Negyesi wrote: > I was asking for creative, funny pranks which makes him look and > feel like the asshat he is. That sounds petty, irresponsible and unprofessional to me. If he's done black hat damage, get him thrown in jail, don't TP his house. -- Earl Cooley III (shiva at io.com) From cwgordon7 at gmail.com Thu May 14 04:12:11 2009 From: cwgordon7 at gmail.com (Charlie Gordon) Date: Thu, 14 May 2009 00:12:11 -0400 Subject: [development] Irresponsible security researcher In-Reply-To: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> References: <7e270cea0905121822x9ba2de9k2f2efd1f2fdbcebf@mail.gmail.com> Message-ID: <4A0B9A1B.6000107@cwgordon.com> Just to clarify, Karoly's position on this does not in any way reflect the position of the Drupal security team as a whole. We have had a few past problems with Justin Klein Keane, but the Drupal security team did not in any way wish to publicly disclose Mr. Keane's personal information, nor mandate action against him. The security team would prefer to work with Mr. Klein, but failing that, we certainly wouldn't want to advocate for any sort of action against him. The security team can be reached at security at drupal.org for any further questions. Regards, Charlie Karoly Negyesi wrote: > I will let the creative members of the Drupal community figure out > ways to express their displeasure with his practice. From mail at webthatworks.it Thu May 14 13:32:03 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Thu, 14 May 2009 15:32:03 +0200 Subject: [development] D7 $page and global objects Message-ID: <20090514153203.13a29c26@dawn.webthatworks.it> I needed somewhere where to store in a more structured way so that modules can modify head easier. Jeff Eaton suggested to put it in $page. I tried to get an idea about what $page is but I'm not sure I got it. eg. block uses _page_alter to fill $page elements. node doesn't. Finally everything is somehow "serialized" in template_preprocess_page But most of the things that end up in the $page (theme.inc template_preprocess_page) arrive there from functions that don't take any parameter eg. drupal_get_breadcrumb(), menu_main_menu(), drupal_add_css() etc... Currently very few things reach $page directly or through _alter_page. I definitively don't like the idea of adding one more global object but I can't see any way to fill $page in the same context in which content is created. $page doesn't look as a global object but still doesn't get passed to modules hook. Let's stick to the initial itch (structured head) and see how things may work. Still you can extend the problem to other page "sections" and you'll have the same hook vs. global problem. Currently anything that need to "modify" head... is actually modifying a global object through drupal_add_html_head. So when I'm preparing a page content, no matter if it is a node or just something pushed to a page I can access head. Now if I plan to use _page_alter... I won't be able to access head content in the same context in which I'm creating the page content. On the other side if I add one more global object, wrapped up in a function with a static variable (that should be declared in core so that everything can access it) as the many already used in template_preprocess_page I can't see the real advantage of having head in $page. I remember I've read something about handlers... by Larry Garfield... Is there any shift in policy about "objects" in Drupal? http://api.drupal.org/api/file/developer/topics/oop.html/7 mainly for a namespace reason at the moment. -- Ivan Sergio Borgonovo http://www.webthatworks.it From nan_wich at bellsouth.net Thu May 14 16:10:53 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Thu, 14 May 2009 12:10:53 -0400 Subject: [development] DB Column Format Message-ID: I have a module for which users seem to run the updates more than once, so I try to make the update code sensitive to this. In my latest change, I am converting from unix time to DATETIME. I don?t see a function in the APIs that allows me to check what type the column is. I can easily use ?SHOW COLUMNS,? but I suspect that MySql and PgSql return different results. Any ideas on how to make this database independent? Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.29/2114 - Release Date: 5/14/2009 6:28 AM From nan_wich at bellsouth.net Thu May 14 16:46:05 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Thu, 14 May 2009 12:46:05 -0400 Subject: [development] DB Column Format In-Reply-To: Message-ID: Okay, I found: $schema = drupal_get_schema('mytable'); if ($schema['fields']['last_checked']['type'] != 'datetime') { } Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]On Behalf Of Nancy Wichmann Sent: Thursday, May 14, 2009 12:11 PM To: Development at Drupal. Org Subject: [development] DB Column Format I have a module for which users seem to run the updates more than once, so I try to make the update code sensitive to this. In my latest change, I am converting from unix time to DATETIME. I don?t see a function in the APIs that allows me to check what type the column is. I can easily use ?SHOW COLUMNS,? but I suspect that MySql and PgSql return different results. Any ideas on how to make this database independent? Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.29/2114 - Release Date: 5/14/2009 6:28 AM From nan_wich at bellsouth.net Thu May 14 18:07:43 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Thu, 14 May 2009 14:07:43 -0400 Subject: [development] DB Column Format In-Reply-To: Message-ID: That doesn?t work because the schema is updated by the time the update runs. The only thing I can think of now is to rename the old column and use ?db_column_exists.? Next question: Is there are Drupal or database-independent date formatting function that produces a DATETIME value. I know I can use date() with something appropriate, but I don?t know how efficient that is. Would there be any interest in my submitting a patch for ?format_date($time, ?datetime?)?? Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]On Behalf Of Nancy Wichmann Sent: Thursday, May 14, 2009 12:46 PM To: development at drupal.org Subject: Re: [development] DB Column Format Okay, I found: $schema = drupal_get_schema('mytable'); if ($schema['fields']['last_checked']['type'] != 'datetime') { } -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.29/2114 - Release Date: 5/14/2009 6:28 AM From michael at favias.org Thu May 14 18:14:43 2009 From: michael at favias.org (Michael Favia) Date: Thu, 14 May 2009 13:14:43 -0500 Subject: [development] DB Column Format In-Reply-To: References: Message-ID: <4A0C5F93.8040405@favias.org> Nancy Wichmann wrote: > > That doesn?t work because the schema is updated by the time the update > runs. The only thing I can think of now is to rename the old column > and use ?db_column_exists.? > Renaming the field sounds like a reasonable alternative to me. Using the same field in two different fashions even over time can lead to bugs in third party modules that are difficult to track down because they don't see actual errors. That said I have since delete the origin of this thread so i dont know why this was an issue in the first place. Advice worth price paid. Good luck. -mf From mfburdett at gmail.com Thu May 14 18:47:50 2009 From: mfburdett at gmail.com (mark burdett) Date: Thu, 14 May 2009 11:47:50 -0700 Subject: [development] DB Column Format In-Reply-To: References: Message-ID: On Thu, May 14, 2009 at 11:07 AM, Nancy Wichmann wrote: > Next question: Is there are Drupal or database-independent date formatting > function that produces a DATETIME value. I know I can use date() with > something appropriate, but I don?t know how efficient that is. using PHP functions like gmdate() should always be more efficient, because these functions (or, date_create() and date_format() in drupal 7) are what format_date() uses anyways. Multiple times in fact.. it's a rather slow function if you benchmark it. If you do use format_date() to put dates in the database make sure you give it a time zone to use, otherwise you will end up with datetimes in different time zones depending on the current user's configured time zone. > Would there be any interest in my submitting a patch for ?format_date($time, > ?datetime?)?? If this patch gets committed http://drupal.org/node/325827 then date() function will also work in the current user's time zone, not the server-wide time zone, so it wouldn't be useful for inserting dates in the database or generating date-based URL path components that should not vary depending on the current user's time zone. I might be interested in a helper function that generates dates in the site-wide default time zone, otherwise developers will be doing this which is pretty verbose for getting a date: format_date($timestamp, 'custom', $format, variable_get('date_default_timezone', date_default_timezone_get()), 'en') --mark From nan_wich at bellsouth.net Thu May 14 19:51:20 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Thu, 14 May 2009 15:51:20 -0400 Subject: [development] DB Column Format In-Reply-To: Message-ID: mark Burdett wrote: > If you do use format_date() to put dates in the database make sure you give it a time zone to use, otherwise you will end up > with datetimes in different time zones depending on the current user's configured time zone. Thanks, Mark. In my case, it is the server (hook_cron) that is creating these dates, so the timezone doesn't matter. I just decided to use "date('Y-m-d H:i:s', $now)" where $now is set from the PHP 'REQUEST_TIME' value. Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]On Behalf Of mark burdett Sent: Thursday, May 14, 2009 2:48 PM To: development at drupal.org Subject: Re: [development] DB Column Format On Thu, May 14, 2009 at 11:07 AM, Nancy Wichmann wrote: > Next question: Is there are Drupal or database-independent date formatting > function that produces a DATETIME value. I know I can use date() with > something appropriate, but I don't know how efficient that is. using PHP functions like gmdate() should always be more efficient, because these functions (or, date_create() and date_format() in drupal 7) are what format_date() uses anyways. Multiple times in fact.. it's a rather slow function if you benchmark it. If you do use format_date() to put dates in the database make sure you give it a time zone to use, otherwise you will end up with datetimes in different time zones depending on the current user's configured time zone. > Would there be any interest in my submitting a patch for "format_date($time, > 'datetime')?" If this patch gets committed http://drupal.org/node/325827 then date() function will also work in the current user's time zone, not the server-wide time zone, so it wouldn't be useful for inserting dates in the database or generating date-based URL path components that should not vary depending on the current user's time zone. I might be interested in a helper function that generates dates in the site-wide default time zone, otherwise developers will be doing this which is pretty verbose for getting a date: format_date($timestamp, 'custom', $format, variable_get('date_default_timezone', date_default_timezone_get()), 'en') --mark -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.29/2114 - Release Date: 5/14/2009 6:28 AM From cxjohnson at gmail.com Thu May 14 23:12:02 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Thu, 14 May 2009 18:12:02 -0500 Subject: [development] DB Column Format In-Reply-To: References: Message-ID: <9ea8d6030905141612h665e0fai35e546b421629ebf@mail.gmail.com> I think it would be cleaner and clearer to simply find a way to record which update had completed and check that before running the update. Checking the column type is always going to be problematic. Better to avoid that specific issue altogether. ..chris On Thu, May 14, 2009 at 2:51 PM, Nancy Wichmann wrote: > mark Burdett wrote: >> If you do use format_date() to put dates in the database make sure you > give it a time zone to use, otherwise you will end up >> with datetimes in different time zones depending on the current user's > configured time zone. > > Thanks, Mark. In my case, it is the server (hook_cron) that is creating > these dates, so the timezone doesn't matter. > > I just decided to use "date('Y-m-d H:i:s', $now)" where $now is set from the > PHP 'REQUEST_TIME' value. > > Nancy E. Wichmann, PMP > Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. > > -----Original Message----- > From: development-bounces at drupal.org > [mailto:development-bounces at drupal.org]On Behalf Of mark burdett > Sent: Thursday, May 14, 2009 2:48 PM > To: development at drupal.org > Subject: Re: [development] DB Column Format > > On Thu, May 14, 2009 at 11:07 AM, Nancy Wichmann > wrote: >> Next question: Is there are Drupal or database-independent date formatting >> function that produces a DATETIME value. I know I can use date() with >> something appropriate, but I don't know how efficient that is. > > using PHP functions like gmdate() should always be more efficient, > because these functions (or, date_create() and date_format() in drupal > 7) are what format_date() uses anyways. Multiple times in fact.. it's > a rather slow function if you benchmark it. > > If you do use format_date() to put dates in the database make sure you > give it a time zone to use, otherwise you will end up with datetimes > in different time zones depending on the current user's configured > time zone. > >> Would there be any interest in my submitting a patch for > "format_date($time, >> 'datetime')?" > > If this patch gets committed http://drupal.org/node/325827 then date() > function will also work in the current user's time zone, not the > server-wide time zone, so it wouldn't be useful for inserting dates in > the database or generating date-based URL path components that should > not vary depending on the current user's time zone. ?I might be > interested in a helper function that generates dates in the site-wide > default time zone, otherwise developers will be doing this which is > pretty verbose for getting a date: format_date($timestamp, 'custom', > $format, variable_get('date_default_timezone', > date_default_timezone_get()), 'en') > > --mark > > > No virus found in this outgoing message. > Checked by AVG - http://www.avg.com > Version: 8.0.176 / Virus Database: 270.12.29/2114 - Release Date: 5/14/2009 6:28 AM > > From prometheus6 at gmail.com Fri May 15 05:59:48 2009 From: prometheus6 at gmail.com (Earl Dunovant) Date: Fri, 15 May 2009 01:59:48 -0400 Subject: [development] Lost CVS access Message-ID: I have a couple of modules kicking around that are pretty stable. I was just asked to modify one in particular, the Week module, to create a monthly archive and block for selected node types (one block and archive for multiple node types AND individual block and archives for selected node types). I wound up with much better code and decided to upgrade the week module along the same lines. Problem is, I haven't had to touch CVS since 6x dropped, I've switched a couple of machines around and lost track of my CVS access stuff. Who can I ask for help? From solitude at solitude.dk Fri May 15 06:19:07 2009 From: solitude at solitude.dk (Andreas Haugstrup Pedersen) Date: Fri, 15 May 2009 08:19:07 +0200 Subject: [development] Lost CVS access In-Reply-To: References: Message-ID: 1) Go to drupal.org and login 2) Go to My Account and then click the Edit tab 3) Click the CVS tab There you can change your CVS password. - Andreas Den 15.05.2009 kl. 07:59 skrev Earl Dunovant : > I have a couple of modules kicking around that are pretty stable. I > was just asked to modify one in particular, the Week module, to create > a monthly archive and block for selected node types (one block and > archive for multiple node types AND individual block and archives for > selected node types). I wound up with much better code and decided to > upgrade the week module along the same lines. > > Problem is, I haven't had to touch CVS since 6x dropped, I've switched > a couple of machines around and lost track of my CVS access stuff. Who > can I ask for help? -- Andreas Haugstrup Pedersen http://www.solitude.dk/ From prometheus6 at gmail.com Fri May 15 14:28:45 2009 From: prometheus6 at gmail.com (Earl Dunovant) Date: Fri, 15 May 2009 10:28:45 -0400 Subject: [development] Lost CVS access In-Reply-To: References: Message-ID: Thanks. On Fri, May 15, 2009 at 2:19 AM, Andreas Haugstrup Pedersen wrote: > 1) Go to drupal.org and login > 2) Go to My Account and then click the Edit tab > 3) Click the CVS tab > > There you can change your CVS password. > > - Andreas > > Den 15.05.2009 kl. 07:59 skrev Earl Dunovant : > >> I have a couple of modules kicking around that are pretty stable. I >> was just asked to modify one in particular, the Week module, to create >> a monthly archive and block for selected node types (one block and >> archive for multiple node types AND individual block and archives for >> selected node types). I wound up with much better code and decided to >> upgrade the week module along the same lines. >> >> Problem is, I haven't had to touch CVS since 6x dropped, I've switched >> a couple of machines around and lost track of my CVS access stuff. Who >> can I ask for help? > > > > -- > Andreas Haugstrup Pedersen > http://www.solitude.dk/ > From nan_wich at bellsouth.net Fri May 15 15:41:35 2009 From: nan_wich at bellsouth.net (Nancy Wichmann) Date: Fri, 15 May 2009 11:41:35 -0400 Subject: [development] DB Column Format In-Reply-To: <9ea8d6030905141612h665e0fai35e546b421629ebf@mail.gmail.com> Message-ID: Chris Johnson wrote: > I think it would be cleaner and clearer to simply find a way to record > which update had completed One would think that checking the "schema_version" in the system table would be an easy way to do this. Unfortuantely, update.php is too "smart;" when one selects, for example, update 6113 to run, update.php resets the system table to 6112 before the hook_update_6113 runs, so checking the table doesn't work. Much as I hate to do it, I guess the only way to do this is to set a variable. Nancy E. Wichmann, PMP Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. -------------- next part -------------- No virus found in this outgoing message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.12.31/2116 - Release Date: 5/15/2009 6:16 AM From darthsteven at gmail.com Fri May 15 15:47:58 2009 From: darthsteven at gmail.com (Steven Jones) Date: Fri, 15 May 2009 16:47:58 +0100 Subject: [development] DB Column Format In-Reply-To: References: <9ea8d6030905141612h665e0fai35e546b421629ebf@mail.gmail.com> Message-ID: Hi Nancy, If you have users that run the updates more than once either: 1. There is a bug in Drupal causing updates to be run more than once. 2. Users are selecting the update to be re-run of their own accord. 3. Users are selecting the update to be re-run for some other reason. So: 1. Is a fairly serious issue. 2. Is their fault. 3. depends who is telling them to do it. Regards Steven Jones ComputerMinds ltd - Perfect Drupal Websites Phone : 0121 288 0434 Mobile : 07951 270 026 http://www.computerminds.co.uk 2009/5/15 Nancy Wichmann : > Chris Johnson wrote: >> I think it would be cleaner and clearer to simply find a way to record >> which update had completed > > One would think that checking the "schema_version" in the system table would > be an easy way to do this. Unfortuantely, update.php is too "smart;" when > one selects, for example, update 6113 to run, update.php resets the system > table to 6112 before the hook_update_6113 runs, so checking the table > doesn't work. Much as I hate to do it, I guess the only way to do this is to > set a variable. > > Nancy E. Wichmann, PMP > Injustice anywhere is a threat to justice everywhere. - Martin L. King, Jr. > > > > No virus found in this outgoing message. > Checked by AVG - http://www.avg.com > Version: 8.0.176 / Virus Database: 270.12.31/2116 - Release Date: 5/15/2009 6:16 AM > > From earnie at users.sourceforge.net Fri May 15 21:01:35 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Fri, 15 May 2009 21:01:35 +0000 Subject: [development] DB Column Format In-Reply-To: References: Message-ID: <20090515210135.144578slbafu5p0c@mail.siebunlimited.com> Quoting Nancy Wichmann : > I guess the only way to do this is to set a variable. > This is the only way for your module to know about its data and what I suggest. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From pwolanin at gmail.com Sun May 17 03:19:52 2009 From: pwolanin at gmail.com (Peter Wolanin) Date: Sat, 16 May 2009 23:19:52 -0400 Subject: [development] need a standard for contrib node build_mode constants Message-ID: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> When doing some cleanup of my Modr8 module, I wanted to define a new build_mode for use by http://api.drupal.org/api/function/node_build_content/6 I realized that we don't have any standard for picking new int constants for this case in specific, or more generally. So, here's a suggested standard that I think is nearly fool-proof: When defining an additional build mode constant (or similar constant) in a contributed module, the suggested standard is to use the unix timestamp of when you write the code to minimize the likelihood of two modules using the same value. I think it's sane and nearly perfect since a new module will then never pick the same value as an existing module, and in general it's very unlikely that 2 people will by writing a new constant the same second. Am I missing anything? Any reason not to suggest this as a standard? -Peter PS - a couple easy ways to get the timestamp on you command line: date -j "+%s" php -r 'echo time() ."\n";' From merlin at logrus.com Sun May 17 03:50:07 2009 From: merlin at logrus.com (Earl Miles) Date: Sat, 16 May 2009 20:50:07 -0700 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> Message-ID: <4A0F896F.2040706@logrus.com> Peter Wolanin wrote: > When doing some cleanup of my Modr8 module, I wanted to define a new > build_mode for use by > http://api.drupal.org/api/function/node_build_content/6 I believe there is no need to stick with ints; CCK uses this and I think it's using strings. From pwolanin at gmail.com Sun May 17 04:22:41 2009 From: pwolanin at gmail.com (Peter Wolanin) Date: Sun, 17 May 2009 00:22:41 -0400 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <4A0F896F.2040706@logrus.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> Message-ID: <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> The reason I was suggesting sticking with ints is that strings are cast to int 0 during comparison: php -r"var_dump('cck' == 0);" bool(true) And core has code like: modules/upload/upload.module:363: if ($node->build_mode == NODE_BUILD_RSS) { modules/book/book.module:710: if (!empty($node->book['bid']) && $node->build_mode == NODE_BUILD_NORMAL) { So if CCK is using ints, that's a potentially serious bug - 0 is NODE_BUILD_NORMAL, so I think any string build modes will basically end up being this mode. -Peter On Sat, May 16, 2009 at 11:50 PM, Earl Miles wrote: > Peter Wolanin wrote: >> >> When doing some cleanup of my Modr8 module, I wanted to define a new >> build_mode for use by >> http://api.drupal.org/api/function/node_build_content/6 > > I believe there is no need to stick with ints; CCK uses this and I think > it's using strings. > From tloud365 at gmail.com Sun May 17 23:56:16 2009 From: tloud365 at gmail.com (T L) Date: Sun, 17 May 2009 19:56:16 -0400 Subject: [development] 5.x to 6.x migration timeline, best practices, tips Message-ID: Hello All, I've inherited a 5.x (5.05 I think) site with about 20 contributed modules and one monster custom module (~ 7000 lines), and I'm looking at migrating to 6.x sometime in the next few months. I've looked over the handbook pages and done a little bit of googling with some good success. But I haven't found much info on planning or common pitfalls. So I was wondering if anyone had any suggestions on things to look out for or a generalized timeline? My guess was at least 100 hours to upgrade to 5.18, migrate to 6.12, test the system, and then adjust the theme and api calls. Does this seem reasonable at all? Any thoughts, suggestions, or redirects to resources would be much appreciated. Thanks so much, Tim -- Tim Loudon t: 781.686.6096 e: tloud365 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From naheemzaffar at gmail.com Mon May 18 00:02:25 2009 From: naheemzaffar at gmail.com (Naheem Zaffar) Date: Mon, 18 May 2009 01:02:25 +0100 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: References: Message-ID: <3adc77210905171702x434d8bb7tf9c92e4e14707695@mail.gmail.com> It probably depends on how many of those modules have been ported to drupal 6 already and how much work the custom module would need. Here, coder module and deadwood may be big helps: http://drupal.org/project/coder http://drupal.org/project/deadwood -------------- next part -------------- An HTML attachment was scrubbed... URL: From Peter at attiks.com Mon May 18 07:58:03 2009 From: Peter at attiks.com (Peter Droogmans) Date: Mon, 18 May 2009 09:58:03 +0200 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: References: Message-ID: You can have a look at coder (http://drupal.org/project/coder) and deadwood (http://drupal.org/project/deadwood and http://boombatower.com/tools/deadwood), the first one gives you pointers on how to convert, the second one tries to convert it for you. If all other modules are available for D6 100 seems reasonable From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of T L Sent: maandag 18 mei 2009 01:56 To: development at drupal.org Subject: [development] 5.x to 6.x migration timeline, best practices, tips Hello All, I've inherited a 5.x (5.05 I think) site with about 20 contributed modules and one monster custom module (~ 7000 lines), and I'm looking at migrating to 6.x sometime in the next few months. I've looked over the handbook pages and done a little bit of googling with some good success. But I haven't found much info on planning or common pitfalls. So I was wondering if anyone had any suggestions on things to look out for or a generalized timeline? My guess was at least 100 hours to upgrade to 5.18, migrate to 6.12, test the system, and then adjust the theme and api calls. Does this seem reasonable at all? Any thoughts, suggestions, or redirects to resources would be much appreciated. Thanks so much, Tim -- Tim Loudon t: 781.686.6096 e: tloud365 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From earnie at users.sourceforge.net Mon May 18 12:27:23 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Mon, 18 May 2009 12:27:23 +0000 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: References: Message-ID: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> Quoting T L : > Hello All, > > I've inherited a 5.x (5.05 I think) site with about 20 contributed modules > and one monster custom module (~ 7000 lines), and I'm looking at migrating > to 6.x sometime in the next few months. I've looked over the handbook pages > and done a little bit of googling with some good success. But I haven't > found much info on planning or common pitfalls. > > So I was wondering if anyone had any suggestions on things to look out for > or a generalized timeline? My guess was at least 100 hours to upgrade to > 5.18, migrate to 6.12, test the system, and then adjust the theme and api > calls. Does this seem reasonable at all? > > Any thoughts, suggestions, or redirects to resources would be much > appreciated. > Here is what I did to move from 4.7.3 to 6.10: http://for-my-kids.com/Upgrading-Drupal. Be sure to move the contrib modules directory out of the Drupal tree while upgrading the core modules. Others have already mentioned coder and deadwood modules. When using deadwood, take the resulting module as a report of what needs to be done manually; there is a lot left to the user but most of it is documented in the resulting source. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From mdshrops at shropnet.net Mon May 18 12:37:05 2009 From: mdshrops at shropnet.net (Mark Shropshire) Date: Mon, 18 May 2009 08:37:05 -0400 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> Message-ID: <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> Earnie, Thanks for the instructions on this. You included the step of going to 5.0 first, then the latest 5.x. I always wondered if this was necessary. Thanks! Mark >> > > Here is what I did to move from 4.7.3 to 6.10: http://for-my-kids.com/Upgrading-Drupal > . > > Be sure to move the contrib modules directory out of the Drupal tree > while upgrading the core modules. Others have already mentioned > coder and deadwood modules. When using deadwood, take the resulting > module as a report of what needs to be done manually; there is a lot > left to the user but most of it is documented in the resulting source. > > -- > Earnie > -- http://r-feed.com/ -- http://for-my-kids.com/ > -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2425 bytes Desc: not available URL: From andrewberry at sentex.net Mon May 18 18:25:58 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Mon, 18 May 2009 14:25:58 -0400 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> Message-ID: <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> On 18-May-09, at 8:37 AM, Mark Shropshire wrote: > Thanks for the instructions on this. You included the step of going > to 5.0 first, then the latest 5.x. I always wondered if this was > necessary. AFAIK it shouldn't be; Earnie, can you explain why you did it that way? > My guess was at least 100 hours to upgrade to 5.18, migrate to 6.12 The vast majority of that should be in the 5-6 migration; upgrading from 5.5 to 5.18 should be pretty trivial, assuming the site was built without too many core hacks. --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available URL: From fredthejonester at gmail.com Mon May 18 18:40:19 2009 From: fredthejonester at gmail.com (Fred Jones) Date: Mon, 18 May 2009 21:40:19 +0300 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: References: Message-ID: <177c0a10905181140i6c345facq84fed593c60e41d1@mail.gmail.com> > and one monster custom module (~ 7000 lines), and I'm looking at migrating > to 6.x sometime in the next few months. 7K? Wow. > So I was wondering if anyone had any suggestions on things to look out for > or a generalized timeline?? My guess was at least 100 hours to upgrade to > 5.18, migrate to 6.12, test the system, and then adjust the theme and api > calls. It's a very tough call when you consider that you have 7K lines of code that you aren't familiar with it. One note I can share is that you definitely must examine each contrib module's upgrade instructions--many *require* that you first upgrade them to the latest/last 5.x version before moving to 6. And they mean it. ;) Good luck. From larry at garfieldtech.com Mon May 18 19:13:59 2009 From: larry at garfieldtech.com (larry at garfieldtech.com) Date: Mon, 18 May 2009 14:13:59 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> Message-ID: <4A11B377.4060006@garfieldtech.com> Peter's suggestion may work for D6, but for D7, I refer people to Eaton's "How to make good APIs" session from DCDC. Digest version: If you expect people to extend your list of flags/constants/modes, for the love of god use strings, not ints. Ints WILL break. Don't be stupid, use strings. So it sounds like if we expect people to extend the build modes from contrib, then core should switch from ints to strings anyway. Who wants to roll the patch? :-) --Larry Garfield Peter Wolanin wrote: > The reason I was suggesting sticking with ints is that strings are > cast to int 0 during comparison: > > php -r"var_dump('cck' == 0);" > > bool(true) > > And core has code like: > > modules/upload/upload.module:363: if ($node->build_mode == NODE_BUILD_RSS) { > > modules/book/book.module:710: if (!empty($node->book['bid']) && > $node->build_mode == NODE_BUILD_NORMAL) { > > So if CCK is using ints, that's a potentially serious bug - 0 is > NODE_BUILD_NORMAL, so I think any string build modes will basically > end up being this mode. > > -Peter > > On Sat, May 16, 2009 at 11:50 PM, Earl Miles wrote: >> Peter Wolanin wrote: >>> When doing some cleanup of my Modr8 module, I wanted to define a new >>> build_mode for use by >>> http://api.drupal.org/api/function/node_build_content/6 >> I believe there is no need to stick with ints; CCK uses this and I think >> it's using strings. >> From weitzman at tejasa.com Mon May 18 19:16:44 2009 From: weitzman at tejasa.com (Moshe Weitzman) Date: Mon, 18 May 2009 15:16:44 -0400 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <4A11B377.4060006@garfieldtech.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> Message-ID: <6117a7500905181216j20d86307pdbd0f3fa1b808551@mail.gmail.com> Peter clarified in IRC that his timestamp proposal for for D6 and that we should use strings for D7. And yes, we need a patch at http://drupal.org/node/409750 On Mon, May 18, 2009 at 3:13 PM, larry at garfieldtech.com wrote: > Peter's suggestion may work for D6, but for D7, I refer people to Eaton's > "How to make good APIs" session from DCDC. ?Digest version: If you expect > people to extend your list of flags/constants/modes, for the love of god use > strings, not ints. ?Ints WILL break. ?Don't be stupid, use strings. > > So it sounds like if we expect people to extend the build modes from > contrib, then core should switch from ints to strings anyway. ?Who wants to > roll the patch? :-) > > --Larry Garfield > > Peter Wolanin wrote: >> >> The reason I was suggesting sticking with ints is that strings are >> cast to int 0 during comparison: >> >> php -r"var_dump('cck' == 0);" >> >> bool(true) >> >> And core has code like: >> >> modules/upload/upload.module:363: ?if ($node->build_mode == >> NODE_BUILD_RSS) { >> >> modules/book/book.module:710: ? ?if (!empty($node->book['bid']) && >> $node->build_mode == NODE_BUILD_NORMAL) { >> >> So if CCK is using ints, that's a potentially serious bug - 0 is >> NODE_BUILD_NORMAL, so I think any string build modes will basically >> end up being this mode. >> >> -Peter >> >> On Sat, May 16, 2009 at 11:50 PM, Earl Miles wrote: >>> >>> Peter Wolanin wrote: >>>> >>>> When doing some cleanup of my Modr8 module, I wanted to define a new >>>> build_mode for use by >>>> http://api.drupal.org/api/function/node_build_content/6 >>> >>> I believe there is no need to stick with ints; CCK uses this and I think >>> it's using strings. >>> > From tloud365 at gmail.com Mon May 18 19:18:36 2009 From: tloud365 at gmail.com (T L) Date: Mon, 18 May 2009 15:18:36 -0400 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <177c0a10905181140i6c345facq84fed593c60e41d1@mail.gmail.com> References: <177c0a10905181140i6c345facq84fed593c60e41d1@mail.gmail.com> Message-ID: Thanks for all the great tips y'all! I will definitely look into deadwood--hadn't heard of it and it's got such a catchy name. On the 7k, it's one of those things where they were like "yeah...you're gonna want to take care of that at some point." I was hoping to upgrade first and then remove some of the code either through core functionality or improved contribs--views 2 for example :). Expect another dev mailing list request in a couple of months on how to refactor monster modules. I don't think there was much/any core hacking, but there was some contributed module hacking "somewhere". Seriously though, it's working software made by really nice, really busy people. They recognize the limitations of the current state and want to take the time to migrate and create more maintainable software now. I've slung far smellier code before (I've got a BA in English), and besides, this way I get to perfect my svn diff skills. Thanks again y'all, Tim On Mon, May 18, 2009 at 2:40 PM, Fred Jones wrote: > > and one monster custom module (~ 7000 lines), and I'm looking at > migrating > > to 6.x sometime in the next few months. > > 7K? Wow. > > > So I was wondering if anyone had any suggestions on things to look out > for > > or a generalized timeline? My guess was at least 100 hours to upgrade to > > 5.18, migrate to 6.12, test the system, and then adjust the theme and api > > calls. > > It's a very tough call when you consider that you have 7K lines of > code that you aren't familiar with it. One note I can share is that > you definitely must examine each contrib module's upgrade > instructions--many *require* that you first upgrade them to the > latest/last 5.x version before moving to 6. And they mean it. ;) > > Good luck. > -- Tim Loudon t: 781.686.6096 e: tloud365 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From karoly at negyesi.net Mon May 18 20:27:04 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Mon, 18 May 2009 13:27:04 -0700 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <4A11B377.4060006@garfieldtech.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> Message-ID: <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> On Mon, May 18, 2009 at 12:13 PM, larry at garfieldtech.com wrote: > Peter's suggestion may work for D6, but for D7, I refer people to Eaton's > "How to make good APIs" session from DCDC. ?Digest version: If you expect > people to extend your list of flags/constants/modes, for the love of god use > strings, not ints. ?Ints WILL break. ?Don't be stupid, use strings. Hummm. Ints, strings, these are just ways to express bits of information. Each character of a string will have approx 5 bit of info (or a bit less, 26 english chars, underscore, thats 27 not 32 but lets say 32). It also must be noted that its unlikely you will use all possible combinations, I bet XRNQW will not be used for example... I am with Peter, his proposal makes sense to me and can code more possibilities than strings. From bill at funnymonkey.com Mon May 18 20:39:15 2009 From: bill at funnymonkey.com (Bill Fitzgerald) Date: Mon, 18 May 2009 13:39:15 -0700 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: References: <177c0a10905181140i6c345facq84fed593c60e41d1@mail.gmail.com> Message-ID: <4A11C773.4000301@funnymonkey.com> T L wrote: > > On the 7k, it's one of those things where they were like > "yeah...you're gonna want to take care of that at some point." I was > hoping to upgrade first and then remove some of the code either > through core functionality or improved contribs--views 2 for example > :). Expect another dev mailing list request in a couple of months on > how to refactor monster modules. > The jump from Views to Views2 has the potential to save you many lines of code. The simple reality of how relationships work in Views2 can save you hours. Two other thing you should look at: 1. How much, if any, markup/php is contained within custom blocks or node bodies? 2. How is the theme structured? Both of these areas can provide ways to become more efficient upon upgrade, and additional complexity in these areas can complicate the upgrade. Cheers, Bill -- Bill Fitzgerald http://funnymonkey.com FunnyMonkey -- Click. Connect. Learn. ph. 503 897 7160 From earnie at users.sourceforge.net Mon May 18 21:06:49 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Mon, 18 May 2009 21:06:49 +0000 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> Message-ID: <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> Quoting Andrew Berry : > On 18-May-09, at 8:37 AM, Mark Shropshire wrote: > >> Thanks for the instructions on this. You included the step of going >> to 5.0 first, then the latest 5.x. I always wondered if this was >> necessary. > > AFAIK it shouldn't be; Earnie, can you explain why you did it that way? > Because it ensures that all updates marked for 5.x are made since those updates are not carried to 6.x. >> My guess was at least 100 hours to upgrade to 5.18, migrate to 6.12 > > The vast majority of that should be in the 5-6 migration; upgrading > from 5.5 to 5.18 should be pretty trivial, assuming the site was > built without too many core hacks. > It took me about 2 hours to do mine but all of the modules were 6.x ready. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From mike at mikeyp.net Mon May 18 21:12:40 2009 From: mike at mikeyp.net (Michael Prasuhn) Date: Mon, 18 May 2009 14:12:40 -0700 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> Message-ID: <1BEA0C03-A340-426A-A007-855165BD2635@mikeyp.net> On May 18, 2009, at 11:25 AM, Andrew Berry wrote: > On 18-May-09, at 8:37 AM, Mark Shropshire wrote: > >> Thanks for the instructions on this. You included the step of going >> to 5.0 first, then the latest 5.x. I always wondered if this was >> necessary. > > AFAIK it shouldn't be; Earnie, can you explain why you did it that > way? The update system as it is designed is technically capable of this, but managing updates for one release to the next (i.e. 5 to 6) is hard enough on core developers, and there is no testing done on major version skip-updates (i.e. 4.7-6) and consequently no support for that. -Mike __________________ Michael Prasuhn mike at mikeyp.net http://mikeyp.net From andrewberry at sentex.net Mon May 18 21:32:22 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Mon, 18 May 2009 17:32:22 -0400 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> Message-ID: <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> On 18-May-09, at 5:06 PM, Earnie Boyd wrote: > Quoting Andrew Berry : > >> On 18-May-09, at 8:37 AM, Mark Shropshire wrote: >> >>> Thanks for the instructions on this. You included the step of >>> going to 5.0 first, then the latest 5.x. I always wondered if >>> this was necessary. >> >> AFAIK it shouldn't be; Earnie, can you explain why you did it that >> way? >> > > Because it ensures that all updates marked for 5.x are made since > those updates are not carried to 6.x. Sorry, I guess I wasn't clear. I was curious as to why you did the extra step of 5.0 to 5.x. Are updates being removed within the 5.x releases? If you had a 4.7.x site, wouldn't you want to go from 4.7.11 directly to 5.18? --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available URL: From mdshrops at shropnet.net Mon May 18 21:34:07 2009 From: mdshrops at shropnet.net (Mark Shropshire) Date: Mon, 18 May 2009 17:34:07 -0400 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> Message-ID: <67195AB3-246E-4306-952B-663F695739B1@shropnet.net> That was I was getting at in my original email too. Thanks for clarifying. On May 18, 2009, at 5:32 PM, Andrew Berry wrote: > On 18-May-09, at 5:06 PM, Earnie Boyd wrote: > >> Quoting Andrew Berry : >> >>> On 18-May-09, at 8:37 AM, Mark Shropshire wrote: >>> >>>> Thanks for the instructions on this. You included the step of >>>> going to 5.0 first, then the latest 5.x. I always wondered if >>>> this was necessary. >>> >>> AFAIK it shouldn't be; Earnie, can you explain why you did it that >>> way? >>> >> >> Because it ensures that all updates marked for 5.x are made since >> those updates are not carried to 6.x. > > Sorry, I guess I wasn't clear. I was curious as to why you did the > extra step of 5.0 to 5.x. Are updates being removed within the 5.x > releases? If you had a 4.7.x site, wouldn't you want to go from > 4.7.11 directly to 5.18? > > --Andrew From earnie at users.sourceforge.net Tue May 19 12:25:05 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 19 May 2009 12:25:05 +0000 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> Message-ID: <20090519122505.11277464zongieck@mail.siebunlimited.com> Quoting Andrew Berry : > On 18-May-09, at 5:06 PM, Earnie Boyd wrote: > >> Quoting Andrew Berry : >> >>> On 18-May-09, at 8:37 AM, Mark Shropshire wrote: >>> >>>> Thanks for the instructions on this. You included the step of >>>> going to 5.0 first, then the latest 5.x. I always wondered if >>>> this was necessary. >>> >>> AFAIK it shouldn't be; Earnie, can you explain why you did it that way? >>> >> >> Because it ensures that all updates marked for 5.x are made since >> those updates are not carried to 6.x. > > Sorry, I guess I wasn't clear. I was curious as to why you did the > extra step of 5.0 to 5.x. Are updates being removed within the 5.x > releases? If you had a 4.7.x site, wouldn't you want to go from > 4.7.11 directly to 5.18? My sanity is the only reason. I didn't try directly to 5.18. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From catch56 at googlemail.com Tue May 19 12:36:07 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Tue, 19 May 2009 13:36:07 +0100 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <20090519122505.11277464zongieck@mail.siebunlimited.com> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> <20090519122505.11277464zongieck@mail.siebunlimited.com> Message-ID: The only reason to upgrade from 5.x to 5.latest-stable would be if there's been schema changes in a minor version. This is very rare, but sometimes necessary - however it's easy to check by comparing system.install between 5.0 and 5.18 to see if any new hook_update_N() has been added. Nat >>> >>> On 18-May-09, at 8:37 AM, Mark Shropshire wrote: >>>> >>>> Thanks for the instructions on this. You included the step of going >>>>> to 5.0 first, then the latest 5.x. I always wondered if this was >>>>> necessary. >>>>> >>>> >>>> AFAIK it shouldn't be; Earnie, can you explain why you did it that way? >>>> >>>> >>> Because it ensures that all updates marked for 5.x are made since those >>> updates are not carried to 6.x. >>> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: From earnie at users.sourceforge.net Tue May 19 16:29:13 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 19 May 2009 16:29:13 +0000 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> <20090519122505.11277464zongieck@mail.siebunlimited.com> Message-ID: <20090519162913.82637d1f1rem0cso@mail.siebunlimited.com> Quoting Nathaniel Catchpole : > The only reason to upgrade from 5.x to 5.latest-stable would be if there's > been schema changes in a minor version. This is very rare, but sometimes > necessary - however it's easy to check by comparing system.install between > 5.0 and 5.18 to see if any new hook_update_N() has been added. > Really? Then why is it documented practice? 1. Upgrade to the latest minor version in the major version you're currently on (e.g. if you are on 5.5 and want to upgrade to 6.10, and there is a 5.12 version out, upgrade to 5.12 first). -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From jeff at viapositiva.net Tue May 19 16:52:24 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Tue, 19 May 2009 11:52:24 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> Message-ID: The problem is not one of information storage length, but of flag collision. Ints are fine as primary keys on a lookup table, or constant values for internal flags that will never be extensible. For things we know people will build on -- like node types, or node build modes -- strings are the only way to avoid collisions when module developers start expanding. --Jeff On May 18, 2009, at 3:27 PM, Karoly Negyesi wrote: > Ints, strings, these are just ways to express bits of information. > > Each character of a string will have approx 5 bit of info (or a bit > less, 26 english chars, underscore, thats 27 not 32 but lets say 32). > It also must be noted that its unlikely you will use all possible > combinations, I bet XRNQW will not be used for example... > > I am with Peter, his proposal makes sense to me and can code more > possibilities than strings. From karoly at negyesi.net Tue May 19 16:57:03 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Tue, 19 May 2009 09:57:03 -0700 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> Message-ID: <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> To the contrary, Peter's proposition makes a very good standard to avoid collisions, it's actually better than strings IMO. From andrewberry at sentex.net Tue May 19 17:04:07 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Tue, 19 May 2009 13:04:07 -0400 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <20090519162913.82637d1f1rem0cso@mail.siebunlimited.com> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> <20090519122505.11277464zongieck@mail.siebunlimited.com> <20090519162913.82637d1f1rem0cso@mail.siebunlimited.com> Message-ID: <4761578C-78EC-454B-BF9A-3337206C9FE9@sentex.net> On 19-May-09, at 12:29 PM, Earnie Boyd wrote: > Really? Then why is it documented practice? > > > 1. Upgrade to the latest minor version in the major version you're > currently on (e.g. if you are on 5.5 and want to upgrade to 6.10, > and there is a 5.12 version out, upgrade to 5.12 first). > I assume in this case it's so that if there are any API-changing fixes in the point release, they are more easily dealt with than during a full upgrade. --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available URL: From merlin at logrus.com Tue May 19 17:05:01 2009 From: merlin at logrus.com (Earl Miles) Date: Tue, 19 May 2009 10:05:01 -0700 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> Message-ID: <4A12E6BD.20509@logrus.com> Karoly Negyesi wrote: > To the contrary, Peter's proposition makes a very good standard to > avoid collisions, it's actually better than strings IMO. Hardly. You have an int that has no real meaning and then a string anyway, which is the define. The *only* improvement is that in theory a 32 bit int is slightly faster to look up via index. From jvandyk at iastate.edu Tue May 19 17:12:46 2009 From: jvandyk at iastate.edu (John VanDyk) Date: Tue, 19 May 2009 12:12:46 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> Message-ID: >To the contrary, Peter's proposition makes a very good standard to >avoid collisions, it's actually better than strings IMO. To really make it unique, you'd want to prepend your drupal.org uid and append your shoe size. From cxjohnson at gmail.com Tue May 19 17:33:47 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Tue, 19 May 2009 12:33:47 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> Message-ID: <9ea8d6030905191033l45fa7a1cq1f49f800dfe04c57@mail.gmail.com> Maybe I'm missing something here, but it's just as possible to accidentally re-use a string constant as a numeric constant. How does using a string help things at all? Either the developer reads and enumerates a list of all existing uses and avoids collision -- or does not -- regardless of whether they are integers, strings, or ice cream flavors. Please educate me! ..chris On Tue, May 19, 2009 at 12:12 PM, John VanDyk wrote: >> To the contrary, Peter's proposition makes a very good standard to >> avoid collisions, it's actually better than strings IMO. > > To really make it unique, you'd want to prepend your drupal.org uid and > append your shoe size. > From catch56 at googlemail.com Tue May 19 17:55:27 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Tue, 19 May 2009 18:55:27 +0100 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <20090519162913.82637d1f1rem0cso@mail.siebunlimited.com> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> <20090519122505.11277464zongieck@mail.siebunlimited.com> <20090519162913.82637d1f1rem0cso@mail.siebunlimited.com> Message-ID: Because changing those instructions to "Do a diff between all the core .install files to check for schema changes between the release you're currently on and the latest stable release, if there have been any updates, upgrade to the latest stable first, if not, proceed directly to 6" wouldn't make any sense to 90% of people? Nat On Tue, May 19, 2009 at 5:29 PM, Earnie Boyd wrote: > Quoting Nathaniel Catchpole : > > The only reason to upgrade from 5.x to 5.latest-stable would be if there's >> been schema changes in a minor version. This is very rare, but sometimes >> necessary - however it's easy to check by comparing system.install between >> 5.0 and 5.18 to see if any new hook_update_N() has been added. >> >> > Really? Then why is it documented practice? > > > 1. Upgrade to the latest minor version in the major version you're > currently on (e.g. if you are on 5.5 and want to upgrade to 6.10, and there > is a 5.12 version out, upgrade to 5.12 first). > > > > -- > Earnie > -- http://r-feed.com/ -- http://for-my-kids.com/ > -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From merlin at logrus.com Tue May 19 18:08:54 2009 From: merlin at logrus.com (Earl Miles) Date: Tue, 19 May 2009 11:08:54 -0700 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <9ea8d6030905191033l45fa7a1cq1f49f800dfe04c57@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> <9ea8d6030905191033l45fa7a1cq1f49f800dfe04c57@mail.gmail.com> Message-ID: <4A12F5B6.1080800@logrus.com> Chris Johnson wrote: > Maybe I'm missing something here, but it's just as possible to > accidentally re-use a string constant as a numeric constant. How does > using a string help things at all? Either the developer reads and > enumerates a list of all existing uses and avoids collision -- or does > not -- regardless of whether they are integers, strings, or ice cream > flavors. > > Please educate me! Strings have meaning. Ints do not. Therefore if there is a collision it is at least a collision over meaning. From rob at robshouse.net Tue May 19 18:18:40 2009 From: rob at robshouse.net (Robert Douglass) Date: Tue, 19 May 2009 20:18:40 +0200 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <4A12F5B6.1080800@logrus.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> <9ea8d6030905191033l45fa7a1cq1f49f800dfe04c57@mail.gmail.com> <4A12F5B6.1080800@logrus.com> Message-ID: Or we could have a factory function that takes a string hint and returns a lightweight object based on the hint. This might actually open the door to making the build mode useful, as you could delegate build-mode specific actions to the build mode object. It would also make the system extensible because you could provide a sub-class of any existing build mode object and the factory function would have to return that instead, even though you had passed in the same hint. Robert Douglass The RobsHouse.net Newsletter: http://robshouse.net/newsletter/robshousenet-newsletter Follow me on Twitter: http://twitter.com/robertDouglass On May 19, 2009, at 8:08 PM, Earl Miles wrote: > Chris Johnson wrote: >> Maybe I'm missing something here, but it's just as possible to >> accidentally re-use a string constant as a numeric constant. How >> does >> using a string help things at all? Either the developer reads and >> enumerates a list of all existing uses and avoids collision -- or >> does >> not -- regardless of whether they are integers, strings, or ice cream >> flavors. >> Please educate me! > > Strings have meaning. Ints do not. Therefore if there is a collision > it is at least a collision over meaning. From earnie at users.sourceforge.net Tue May 19 18:39:53 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 19 May 2009 18:39:53 +0000 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> <20090519122505.11277464zongieck@mail.siebunlimited.com> <20090519162913.82637d1f1rem0cso@mail.siebunlimited.com> Message-ID: <20090519183953.15743d6m56fsyvqc@mail.siebunlimited.com> Quoting Nathaniel Catchpole : > Because changing those instructions to "Do a diff between all the core > .install files to check for schema changes between the release you're > currently on and the latest stable release, if there have been any updates, > upgrade to the latest stable first, if not, proceed directly to 6" wouldn't > make any sense to 90% of people? > I'm fine with that except that there isn't a real need then to bring it up here, IMO. It only takes a matter of a few seconds to upgrade to the latest version. It would take me just as long to prepare and read the diff which is manual work where I might get it wrong. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From earnie at users.sourceforge.net Tue May 19 18:47:44 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 19 May 2009 18:47:44 +0000 Subject: [development] 5.x to 6.x migration timeline, best practices, tips In-Reply-To: <4761578C-78EC-454B-BF9A-3337206C9FE9@sentex.net> References: <20090518122723.15224xni3t2ho7c4@mail.siebunlimited.com> <2CA1F0B2-593B-4F60-914F-E63AF20ECA3E@shropnet.net> <80B1BAC3-F639-4202-B0B3-9770077E1D6A@sentex.net> <20090518210649.21086gwkbiizvg0s@mail.siebunlimited.com> <7A5F68D6-EA90-4003-A04C-BADAD9592EA6@sentex.net> <20090519122505.11277464zongieck@mail.siebunlimited.com> <20090519162913.82637d1f1rem0cso@mail.siebunlimited.com> <4761578C-78EC-454B-BF9A-3337206C9FE9@sentex.net> Message-ID: <20090519184744.85871whg79znv8bo@mail.siebunlimited.com> Quoting Andrew Berry : >> >> >> 1. Upgrade to the latest minor version in the major version you're >> currently on (e.g. if you are on 5.5 and want to upgrade to 6.10, >> and there is a 5.12 version out, upgrade to 5.12 first). >> > > I assume in this case it's so that if there are any API-changing > fixes in the point release, they are more easily dealt with than > during a full upgrade. Yes, hook_update_N for the current release is not carried forward to the next major release. So, you might miss something important like a variable change, a new table column, a new index, or whatever the change may be if you don't upgrade to the latest point version first. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From earnie at users.sourceforge.net Tue May 19 18:57:35 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 19 May 2009 18:57:35 +0000 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> Message-ID: <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> Quoting Jeff Eaton : > The problem is not one of information storage length, but of flag collision. > > Ints are fine as primary keys on a lookup table, or constant values > for internal flags that will never be extensible. For things we know > people will build on -- like node types, or node build modes -- > strings are the only way to avoid collisions when module developers > start expanding. > The only way to avoid a collision between developers of modules is to create a namespace based on the module name for whatever the data is. So for node_type a unique key of module and name creates the necessary uniqueness required. The system though needs to include the module for the content type in it's presentation so that one knows by looking at the UI which module the content type is for. Perhaps the use of fieldsets where the fieldset is the module name could help clear up the confusion when more than one module could create a UI data conflict. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From nevets at tds.net Tue May 19 18:10:09 2009 From: nevets at tds.net (Steve Ringwood) Date: Tue, 19 May 2009 13:10:09 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <9ea8d6030905191033l45fa7a1cq1f49f800dfe04c57@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <7e270cea0905190957j889c020r22149dcd0f9506a0@mail.gmail.com> <9ea8d6030905191033l45fa7a1cq1f49f800dfe04c57@mail.gmail.com> Message-ID: <4A12F601.9040906@mailbag.com> With string constants you follow (or at least should) the naming convention that the first part is the module name. nevets From mail at webthatworks.it Wed May 20 08:39:56 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 20 May 2009 10:39:56 +0200 Subject: [development] drupal Windows and PostgreSQL Message-ID: <20090520103956.6d94c7c4@dawn.webthatworks.it> I was recently positively surprised to see that the Windows installer of PostgreSQL offers you the chance to install Drupal as well. This honour our CMS and it should be an incentive to avoid to consider Postgresql as a poster child. I wonder if any other open source DB comes bundled with Drupal on Windows. -- Ivan Sergio Borgonovo http://www.webthatworks.it From earnie at users.sourceforge.net Wed May 20 12:02:47 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 20 May 2009 12:02:47 +0000 Subject: [development] drupal Windows and PostgreSQL In-Reply-To: <20090520103956.6d94c7c4@dawn.webthatworks.it> References: <20090520103956.6d94c7c4@dawn.webthatworks.it> Message-ID: <20090520120247.103877qlrlph05oo@mail.siebunlimited.com> Quoting Ivan Sergio Borgonovo : > I was recently positively surprised to see that the Windows > installer of PostgreSQL offers you the chance to install Drupal as > well. > Which distribution of PostgreSQL? There seem to be a few. > This honour our CMS and it should be an incentive to avoid to > consider Postgresql as a poster child. > > I wonder if any other open source DB comes bundled with Drupal on > Windows. > You could offer one. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From mail at webthatworks.it Wed May 20 13:05:24 2009 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 20 May 2009 15:05:24 +0200 Subject: [development] drupal Windows and PostgreSQL In-Reply-To: <20090520120247.103877qlrlph05oo@mail.siebunlimited.com> References: <20090520103956.6d94c7c4@dawn.webthatworks.it> <20090520120247.103877qlrlph05oo@mail.siebunlimited.com> Message-ID: <20090520150524.5195de48@dawn.webthatworks.it> On Wed, 20 May 2009 12:02:47 +0000 Earnie Boyd wrote: > Quoting Ivan Sergio Borgonovo : > > > I was recently positively surprised to see that the Windows > > installer of PostgreSQL offers you the chance to install Drupal > > as well. > > > > Which distribution of PostgreSQL? There seem to be a few. It looks like the official one with the installer. http://www.postgresql.org/ftp/binary/v8.3.7/win32/ I admit I didn't try to install Drupal on XP. My interest in PostgreSQL this time was a quick&dirty reporting tool and I wasn't that willing to see which other packages was going to install other than Drupal. > > This honour our CMS and it should be an incentive to avoid to > > consider Postgresql as a poster child. > > I wonder if any other open source DB comes bundled with Drupal on > > Windows. > You could offer one. I've no personal interest in Drupal on Windows currently... but still that lower the bar of a lot of people willing to try Drupal on Windows quite a bit. Actually the overall installation process of the things I needed was painless but I didn't try to install Drupal on XP. If installing Drupal with that bundle is going to be as easy as what I tried, that package is really going to be a good tool to promote Drupal... with all the consequences a Drupal/PostgreSQL installation may imply on a larger scale. -- Ivan Sergio Borgonovo http://www.webthatworks.it From jeff at viapositiva.net Wed May 20 18:04:52 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Wed, 20 May 2009 13:04:52 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> Message-ID: <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> Indeed. At least with strings it's possible to develop meaningful conventions. With ints, there is literally no meaning other than "first come, first served, set up a registry." --Jeff On May 19, 2009, at 1:57 PM, Earnie Boyd wrote: > Quoting Jeff Eaton : > >> The problem is not one of information storage length, but of flag >> collision. >> >> Ints are fine as primary keys on a lookup table, or constant values >> for internal flags that will never be extensible. For things we >> know people will build on -- like node types, or node build modes >> -- strings are the only way to avoid collisions when module >> developers start expanding. >> > > The only way to avoid a collision between developers of modules is > to create a namespace based on the module name for whatever the data > is. So for node_type a unique key of module and name creates the > necessary uniqueness required. The system though needs to include > the module for the content type in it's presentation so that one > knows by looking at the UI which module the content type is for. > Perhaps the use of fieldsets where the fieldset is the module name > could help clear up the confusion when more than one module could > create a UI data conflict. From arancaytar.ilyaran at gmail.com Thu May 21 12:54:03 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Thu, 21 May 2009 14:54:03 +0200 Subject: [development] The future of hook_node_info() Message-ID: <4A154EEB.7040308@gmail.com> Hey all, This is just a bit of idle speculation (and it may even have been discussed before) but I wanted to share my observation. There may be a changing trend in how Drupal perceives node types. Way back, a node type was handled by exactly one module. Most type-specific functionality could only be applied to the native type. For example, CCK defined "cck-clones" of all existing content types in 4.7. You need to go back as far as 4.0 (see changelog) to see book.module adding support for non-book nodes, but that's still where we came from. Even in Drupal 4.7 we had story.module and page.module providing what have since become custom content types created by the installation profile. Between Drupal 4.7 and Drupal 5, a lot of these type-specific features became universal. CCK stopped implementing hook_node_info and expanded hook_nodeapi (which had only watched the 'delete revision' action before). story.module and page.module got axed. In Drupal 6, book.module stopped implementing hook_node_info() too, in favor of creating a type handled by node.module, and treating all node types the same way. Altogether, we're down to three hook_node_info implementations in Drupal 7 (from six in Drupal 4.7), which are blog.module, forum.module and poll.module. Coincidentally, these modules are all somewhat notorious: forum.module's has a very frustrating visual style, poll.module has been called our "regression test", and both poll.module and blog.module have been considered for removal (Google "remove X from core"). Only poll.module can still make a convincing case for using hook_node_info, but even poll stuff could in theory be added to generic nodes. Will hook_node_info() eventually die entirely, in favor of working on nodes centrally handled by node.module? Should it? Thanks for reading all the way, :) -Aran -- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 @icq / RealArancaytar @aim URL: http://ermarian.net -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature URL: From larry at garfieldtech.com Thu May 21 13:57:37 2009 From: larry at garfieldtech.com (Larry Garfield) Date: Thu, 21 May 2009 08:57:37 -0500 Subject: [development] The future of hook_node_info() In-Reply-To: <4A154EEB.7040308@gmail.com> References: <4A154EEB.7040308@gmail.com> Message-ID: <200905210857.37608.larry@garfieldtech.com> On Thursday 21 May 2009 7:54:03 am Arancaytar Ilyaran wrote: > Will hook_node_info() eventually die entirely, in favor of working on > nodes centrally handled by node.module? Should it? > > Thanks for reading all the way, :) > > -Aran Potentially, but there are two key things that need to happen first: 1) There are still things that can only be done by a custom-defined node in its own module. The most notable is hook_access(), which still must be defined by the declaring module if you want permissions that differ even ever so slightly from what node module defaults to. That needs to get ripped out and made pluggable per-type, and stackable. There has bee discussion on how to do this well back in Szeged, but unfortunately no one who was at that BoF has had the spare mental cycles to work on it. :-( (If you want to volunteer, let me know and I'll try to help.) I think there's a few others items that must be done by the declaring module still, but I can't recall them off the top of my head. 2) Easy programmatic creation of new nodes. Some modules need to have custom behavior that comes with their nodes. Poll is a text-book example. For hook_node_info() to go away, it would need to be replaced by a *good*, *easy to use*, *flexible* way to declare a node type and additional behavior (eg, Fields) in a way that could be easily imported on module installation; patterns.module looks like it could be a step in that direction (I understand it's in the process of moving away from doing everything via drupal_execute(), which is good), but there are other efforts along similar lines. If you want to kill hook_node_info(), tackle one of those problems first. :-) -- Larry Garfield larry at garfieldtech.com From catch56 at googlemail.com Thu May 21 14:07:07 2009 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Thu, 21 May 2009 15:07:07 +0100 Subject: [development] The future of hook_node_info() In-Reply-To: <200905210857.37608.larry@garfieldtech.com> References: <4A154EEB.7040308@gmail.com> <200905210857.37608.larry@garfieldtech.com> Message-ID: I'd love to see it go, but Larry's explanation matches what I've been told when it's been discussed before. It'd also be worth grepping Drupal 6 contrib to see which modules are using it and how. Nat On Thu, May 21, 2009 at 2:57 PM, Larry Garfield wrote: > On Thursday 21 May 2009 7:54:03 am Arancaytar Ilyaran wrote: > > > Will hook_node_info() eventually die entirely, in favor of working on > > nodes centrally handled by node.module? Should it? > > > > Thanks for reading all the way, :) > > > > -Aran > > Potentially, but there are two key things that need to happen first: > > 1) There are still things that can only be done by a custom-defined node in > its > own module. The most notable is hook_access(), which still must be defined > by > the declaring module if you want permissions that differ even ever so > slightly > from what node module defaults to. That needs to get ripped out and made > pluggable per-type, and stackable. There has bee discussion on how to do > this > well back in Szeged, but unfortunately no one who was at that BoF has had > the > spare mental cycles to work on it. :-( (If you want to volunteer, let me > know > and I'll try to help.) I think there's a few others items that must be > done > by the declaring module still, but I can't recall them off the top of my > head. > > 2) Easy programmatic creation of new nodes. Some modules need to have > custom > behavior that comes with their nodes. Poll is a text-book example. For > hook_node_info() to go away, it would need to be replaced by a *good*, > *easy > to use*, *flexible* way to declare a node type and additional behavior (eg, > Fields) in a way that could be easily imported on module installation; > patterns.module looks like it could be a step in that direction (I > understand > it's in the process of moving away from doing everything via > drupal_execute(), > which is good), but there are other efforts along similar lines. > > If you want to kill hook_node_info(), tackle one of those problems first. > :-) > > -- > Larry Garfield > larry at garfieldtech.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From news at unleashedmind.com Thu May 21 15:26:41 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Thu, 21 May 2009 17:26:41 +0200 Subject: [development] The future of hook_node_info() In-Reply-To: <200905210857.37608.larry@garfieldtech.com> Message-ID: <03b601c9da28$8aef10c0$0200a8c0@structworks.com> > 1) ... That needs to > get ripped out and made pluggable per-type, and stackable. There is an initial idea/approach and patch that needs architectural review: http://drupal.org/node/441148 > 2) Easy programmatic creation of new nodes. Some modules > need to have custom behavior that comes with their nodes. > Poll is a text-book example. Also note that Poll could as well provide a field only, as someone suggested in http://drupal.org/node/61285 I'd like to add: 3) Make Node API re-usable (like Cache API) There are many, many, many modules in contrib that could and would very happily use "nodes" as storage type and for processing (i.e. load, load_multiple, view, edit, insert, update, delete, *_multiple, + being fieldable). But they can't, because we still have a lot of magic happening around nodes: - Nodes appear on admin/content/node - Nodes appear in search results - Nodes appear on node/add - Aforementioned default access permissions - Possibly more. What we currently call and understand as "node" is clearly a node of the type "content" in reality. Also, considering modules for private messaging or automated feed imports that could (re-)use Node API, {node} would quickly become a bloat of container for everything. So lately, I was wondering whether we could open the door to allow modules to use the (proven) Node API design by "classifying" nodes and making its storage re-usable, _exactly_ like we do it with cache tables already. All cache tables share the same schema, and we can do: cache_get('cache_form') Considering classified nodes, a module could do: node_load($nid, 'message'); Thoughts? sun From damz at prealable.org Thu May 21 15:36:57 2009 From: damz at prealable.org (Damien Tournoud) Date: Thu, 21 May 2009 17:36:57 +0200 Subject: [development] The future of hook_node_info() In-Reply-To: <03b601c9da28$8aef10c0$0200a8c0@structworks.com> References: <200905210857.37608.larry@garfieldtech.com> <03b601c9da28$8aef10c0$0200a8c0@structworks.com> Message-ID: On Thu, May 21, 2009 at 5:26 PM, Daniel F. Kudwien wrote: > 3) Make Node API re-usable (like Cache API) > > There are many, many, many modules in contrib that could and would very > happily use "nodes" as storage type and for processing (i.e. load, > load_multiple, view, edit, insert, update, delete, *_multiple, + being > fieldable). ?But they can't, because we still have a lot of magic happening > around nodes: > > - Nodes appear on admin/content/node > - Nodes appear in search results > - Nodes appear on node/add > - Aforementioned default access permissions > - Possibly more. In the "more": nodes have revisions. They have a body in the node_revisions table. > What we currently call and understand as "node" is clearly a node of the > type "content" in reality. True. Which makes it a little bit less useful. > Also, considering modules for private messaging or automated feed imports > that could (re-)use Node API, {node} would quickly become a bloat of > container for everything. > > So lately, I was wondering whether we could open the door to allow modules > to use the (proven) Node API design by "classifying" nodes and making its > storage re-usable, _exactly_ like we do it with cache tables already. What you are proposing is to implement a more generic "Drupal Object", of which the Node as we know it would be a particular version. That makes a lot of sense, and would allow us to also properly implement "set based lazy-loading" one day. Potential candidates (in core), for such an API (providing life cycle management and field support for those objects): - taxonomy vocabulary - taxonomy terms - aggregator feed - aggregator posts - comments - url alias? - menus - menu links? - others? Damien From drupal at dwwright.net Thu May 21 15:43:23 2009 From: drupal at dwwright.net (Derek Wright) Date: Thu, 21 May 2009 08:43:23 -0700 Subject: [development] The future of hook_node_info() In-Reply-To: References: <4A154EEB.7040308@gmail.com> <200905210857.37608.larry@garfieldtech.com> Message-ID: <87CAF1C0-9B45-4AB2-A5CC-4353B118C366@dwwright.net> On May 21, 2009, at 7:07 AM, Nathaniel Catchpole wrote: > It'd also be worth grepping Drupal 6 contrib to see which modules > are using it and how. A few node types you're all *very* familiar with, which are handled via hook_node_info(): project_project project_release project_issue That can't change until everything about each of these node types is handled by pure fields: "convert project* to CCK" http://drupal.org/node/85049 That's going to be a very huge task, and will require quite an upgrade path. It could be started in a 6.x-2.* branch to get us closer to core fields in time for the D7 port, or we could just do the whole conversion during the D7 port itself. I guess it depends on how different D6 CCK API is from D7 field API. And yeah, all the stuff Larry said is true, too. ;) Off the top of my head, the only reasons project* uses hook_node_info() are: A) It's almost as old as Drupal itself, completely predates CCK, etc, and no one's ever provided resources to convert it to CCK before. B) hook_access(), and the lack of something like an 'access' operation in hook_nodeapi() (there are at least two big issues in core about, (one now dupe with the other) both of which have stalled): http://drupal.org/node/122173 http://drupal.org/node/143075 C) The hassle of programatically defining CCK content types and fields. Cheers, -Derek (dww) From news at unleashedmind.com Thu May 21 16:50:33 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Thu, 21 May 2009 18:50:33 +0200 Subject: [development] The future of hook_node_info() In-Reply-To: Message-ID: <03e101c9da34$422b5360$0200a8c0@structworks.com> > In the "more": nodes have revisions. They have a body in the > node_revisions table. Yes, and AFAIK, there is already an effort to turn node_revisions into field revisions, eliminating node_revisions. But then again, who says that a contrib module implementing private messages (or whatever) has no use for revisions? > What you are proposing is to implement a more generic "Drupal > Object", of which the Node as we know it would be a > particular version. That makes a lot of sense, and would > allow us to also properly implement "set based lazy-loading" one day. I'm not sure whether I would go that far. Was rather thinking that re-using the schema of {node} along with the API for nodes would dramatically simplify a lot of contrib modules and would "automatically" introduce the flexibility and customizability of nodes. - Which also results in a much nicer DX experience, because you wouldn't have to lookup, learn, and hook into countless of node-alike implementations. But, most probably, you are right. :) sun From cxjohnson at gmail.com Thu May 21 16:50:46 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Thu, 21 May 2009 11:50:46 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> Message-ID: <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> After all, we wouldn't want developers to have actually document anything they write. ;-) On Wed, May 20, 2009 at 1:04 PM, Jeff Eaton wrote: > Indeed. > > At least with strings it's possible to develop meaningful conventions. With > ints, there is literally no meaning other than "first come, first served, > set up a registry." > > --Jeff > > > On May 19, 2009, at 1:57 PM, Earnie Boyd wrote: > >> Quoting Jeff Eaton : >> >>> The problem is not one of information storage length, but of flag >>> collision. >>> >>> Ints are fine as primary keys on a lookup table, or constant values for >>> internal flags that will never be extensible. For things we know people will >>> build on -- like node types, or node build modes -- strings are the only way >>> to avoid collisions when module developers start expanding. >>> >> >> The only way to avoid a collision between developers of modules is to >> create a namespace based on the module name for whatever the data is. ?So >> for node_type a unique key of module and name creates the necessary >> uniqueness required. ?The system though needs to include the module for the >> content type in it's presentation so that one knows by looking at the UI >> which module the content type is for. ?Perhaps the use of fieldsets where >> the fieldset is the module name could help clear up the confusion when more >> than one module could create a UI data conflict. > From cxjohnson at gmail.com Thu May 21 16:58:22 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Thu, 21 May 2009 11:58:22 -0500 Subject: [development] The future of hook_node_info() In-Reply-To: <03e101c9da34$422b5360$0200a8c0@structworks.com> References: <03e101c9da34$422b5360$0200a8c0@structworks.com> Message-ID: <9ea8d6030905210958v59494bedy8fbcea26b308f15f@mail.gmail.com> Maybe we actually need node objects AND generic, stripped-down Drupal objects. All of the extra "baggage" that comes along with node types is actually sometimes very beneficial and powerful, making it much easier to do some things. At other times, it's completely in the way -- hence, I've sometimes created completely new objects in my modules without using nodes at all. Just as a wild idea which might have some potential use -- maybe take a look at how the file framework handles its objects (http://drupal.org/project/fileframework). On Thu, May 21, 2009 at 11:50 AM, Daniel F. Kudwien wrote: >> In the "more": nodes have revisions. They have a body in the >> node_revisions table. > > Yes, and AFAIK, there is already an effort to turn node_revisions into field revisions, eliminating node_revisions. ?But then again, who says that a contrib module implementing private messages (or whatever) has no use for revisions? > >> What you are proposing is to implement a more generic "Drupal >> Object", of which the Node as we know it would be a >> particular version. That makes a lot of sense, and would >> allow us to also properly implement "set based lazy-loading" one day. > > I'm not sure whether I would go that far. ?Was rather thinking that re-using the schema of {node} along with the API for nodes would dramatically simplify a lot of contrib modules and would "automatically" introduce the flexibility and customizability of nodes. - Which also results in a much nicer DX experience, because you wouldn't have to lookup, learn, and hook into countless of node-alike implementations. > > But, most probably, you are right. :) > > sun > > From earnie at users.sourceforge.net Thu May 21 18:40:39 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 21 May 2009 18:40:39 +0000 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> Message-ID: <20090521184039.12792fs6xbpme98g@mail.siebunlimited.com> Quoting Chris Johnson : > After all, we wouldn't want developers to have actually document > anything they write. ;-) > It isn't the developer of the module that would be confused. It would be the users of the module that would be confused and users rarely read the documentation because the developer is too technical with it. User initial experience of a product gears toward is the product self documenting or in other words natural to use. -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From jeff at viapositiva.net Thu May 21 19:09:09 2009 From: jeff at viapositiva.net (Jeff Eaton) Date: Thu, 21 May 2009 14:09:09 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> Message-ID: <8313605F-3EF9-40C7-BB97-2BFEC9422DA0@viapositiva.net> On May 21, 2009, at 11:50 AM, Chris Johnson wrote: > After all, we wouldn't want developers to have actually document > anything they write. ;-) Well... documentation is needed in either case. But with ints, collisions are absolutely inevitable. I ran into this with VotingAPI early on -- I had a const for 'vote_type', and it had 3 values out of the box. Pretty quickly, two other modules both defined fourth value types. suddenly, those modules couldn't co-exist with each other. There's nothing in *my* documentation that could have solved that, other than a pointer to a wiki page where everyone claimed ints. From mikejoconnor at gmail.com Thu May 21 19:40:20 2009 From: mikejoconnor at gmail.com (Mike O'Connor) Date: Thu, 21 May 2009 15:40:20 -0400 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <8313605F-3EF9-40C7-BB97-2BFEC9422DA0@viapositiva.net> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> <8313605F-3EF9-40C7-BB97-2BFEC9422DA0@viapositiva.net> Message-ID: I think the best example of using strings over ints is DNS. How many people know IP address of their favorite website? Using a numeric based name space is great for machines, but in order for the web to be usable, we had to create DNS. I suspect the same logic would apply here. If we are going to have a usable api, we should use a string. Mike O. With that in mind, you would have to do a lot to convince me that int's were a better solution for an API. On Thu, May 21, 2009 at 3:09 PM, Jeff Eaton wrote: > On May 21, 2009, at 11:50 AM, Chris Johnson wrote: > > After all, we wouldn't want developers to have actually document >> anything they write. ;-) >> > > Well... documentation is needed in either case. But with ints, collisions > are absolutely inevitable. I ran into this with VotingAPI early on -- I had > a const for 'vote_type', and it had 3 values out of the box. Pretty quickly, > two other modules both defined fourth value types. suddenly, those modules > couldn't co-exist with each other. > > There's nothing in *my* documentation that could have solved that, other > than a pointer to a wiki page where everyone claimed ints. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cxjohnson at gmail.com Thu May 21 21:26:24 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Thu, 21 May 2009 16:26:24 -0500 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <8313605F-3EF9-40C7-BB97-2BFEC9422DA0@viapositiva.net> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> <8313605F-3EF9-40C7-BB97-2BFEC9422DA0@viapositiva.net> Message-ID: <9ea8d6030905211426q1bd39f8ge393f2191da80489@mail.gmail.com> On Thu, May 21, 2009 at 2:09 PM, Jeff Eaton wrote: > On May 21, 2009, at 11:50 AM, Chris Johnson wrote: > >> After all, we wouldn't want developers to have actually document >> anything they write. ?;-) > > Well... documentation is needed in either case. But with ints, collisions > are absolutely inevitable. I ran into this with VotingAPI early on -- I had > a const for 'vote_type', and it had 3 values out of the box. Pretty quickly, > two other modules both defined fourth value types. suddenly, those modules > couldn't co-exist with each other. > > There's nothing in *my* documentation that could have solved that, other > than a pointer to a wiki page where everyone claimed ints. Thanks for the clear example, Jeff. It makes a huge difference. If developers of other modules can arbitrarily define new values your module has to work with, collisions are inevitable, whether integer or strings. Strings do enjoy some advantages, including being easier to grep for. P.S. Of course, *user* visible constants should be strings. I always thought we were talking about developer-only constants here. From drupal at dave-cohen.com Fri May 22 03:56:42 2009 From: drupal at dave-cohen.com (David Cohen) Date: Thu, 21 May 2009 20:56:42 -0700 Subject: [development] The future of hook_node_info() In-Reply-To: <03b601c9da28$8aef10c0$0200a8c0@structworks.com> References: <03b601c9da28$8aef10c0$0200a8c0@structworks.com> Message-ID: <1242964602.18913.1316697093@webmail.messagingengine.com> On Thu, 21 May 2009 17:26 +0200, "Daniel F. Kudwien" wrote: > > There are many, many, many modules in contrib that could and would very > happily use "nodes" as storage type and for processing (i.e. load, > load_multiple, view, edit, insert, update, delete, *_multiple, + being > fieldable). Drupal for Facebook (http://drupal.org/project/fb) does just this. It supports any number of Facebook Apps, and any number of Feed Templates. So for these two things it defines custom content types. This beats writing all the CRUD functionality all over again. Also, additional modules add features, and they use hook_form_alter and hook_nodeapi to add properties to these content types. > But they can't, because we still have a lot of magic > happening > around nodes: > > - Nodes appear on admin/content/node > - Nodes appear in search results > - Nodes appear on node/add > - Aforementioned default access permissions > - Possibly more. None of these is a deal-breaker for my purposes. They can even be viewed as advantages. I may be old-school, but I like the original content type API. I'd hate to see it go away. -Dave From earnie at users.sourceforge.net Fri May 22 12:17:47 2009 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Fri, 22 May 2009 12:17:47 +0000 Subject: [development] need a standard for contrib node build_mode constants In-Reply-To: <9ea8d6030905211426q1bd39f8ge393f2191da80489@mail.gmail.com> References: <2247a8a70905162019k6cdfcb34t8270beb935a58ac3@mail.gmail.com> <4A0F896F.2040706@logrus.com> <2247a8a70905162122n68b7d6c6j237f239a7c364a62@mail.gmail.com> <4A11B377.4060006@garfieldtech.com> <7e270cea0905181327g6cbea5f3v298f60c46be0f60f@mail.gmail.com> <20090519185735.109521j9hxvvp1y8@mail.siebunlimited.com> <0CA6ACFB-4FC9-4EB6-A7FB-748DB9CDCB27@viapositiva.net> <9ea8d6030905210950s2ce9a062r50678841b0e4e581@mail.gmail.com> <8313605F-3EF9-40C7-BB97-2BFEC9422DA0@viapositiva.net> <9ea8d6030905211426q1bd39f8ge393f2191da80489@mail.gmail.com> Message-ID: <20090522121747.69261y9yc5ue77j4@mail.siebunlimited.com> Quoting Chris Johnson : > > P.S. Of course, *user* visible constants should be strings. I always > thought we were talking about developer-only constants here. > Which must be translated somehow for ease of use by the developer to strings. I.E. in PHP define ('DEVELOPER_ONLY_CONSTANTS', 1); -- Earnie -- http://r-feed.com/ -- http://for-my-kids.com/ -- http://www.4offer.biz/ -- http://give-me-an-offer.com/ From news at unleashedmind.com Sat May 23 06:41:46 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Sat, 23 May 2009 08:41:46 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core Message-ID: <074101c9db71$8b539d70$0200a8c0@structworks.com> tha_sun: on the previous subject..so you know, wysiwyg is less customizable than straight up fck[editor.]module tha_sun: it's missing the ability to re-skin the buttons tha_sun: and it won't drop down a 2nd or 3rd bar for a full set of menu bar buttons If you can code, you know how to alter the default skin. tha_sun: i mean by standard configuration sure We've got a lot to do in the area of wysiwyg api... tha_sun: no complaints though, that is definitely a better module once it is a bit more mature OTOH, unlike fckeditor.module, wysiwyg api requires no hacks in other modules, manual config file changes, etc. tha_sun: that's a plus...fckeditor.module burned several hours of my time tha_sun: initially ... tha_sun: what's keeping you from getting that module standardized in drupal? Digital7: I guess you mean in core? tha_sun: yes--if that's the proper term for a module included with the standard installation Digital7: There are many reasons. Digital7: Starting with http://drupal.org/project/libraries Digital7: A few others... But ultimately ending in: countless support and feature requests, which Drupal core most likely can't handle. tha_sun: seems like it'd be a top priority for the project..given how significantly it improves the usability We have yet to find a solution for this issue. You know. I'm an evil maintainer. You get a won't fix before you submit an issue. Drupal core, though, depends on many volunteers to do this job. And, many of them, don't know the innards of the system. i still see it happening whether it be sooner or later So, insane feature/support requests live too long, although they won't ever fix. If we add wysiwyg to that list, we will double or even triple the size of all open core issues. It will happen. We just have to find out _how_. From damz at prealable.org Sat May 23 08:06:36 2009 From: damz at prealable.org (Damien Tournoud) Date: Sat, 23 May 2009 10:06:36 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <074101c9db71$8b539d70$0200a8c0@structworks.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> Message-ID: On Sat, May 23, 2009 at 8:41 AM, Daniel F. Kudwien wrote: > [...] Long IRC message from Daniel > Erm. WYSIWYG support not being in Drupal core because the core queue could not handle the support requests? That seems a little bit far fetched. My own explanation is more simple: - We haven't found yet a non-crappy jQuery WYSIWYG editor licensed under the GPL (and a even just a non-crappy WYSIWYG editor, for that matter) - It is doubtful that a WYSIWYG editor improve usability - On the other hand it is certain that a (non correctly configured) WYSIWYG editor can decrease the efficiency, by (1) encouraging people to use inadequate markup, and (2) allowing them to copy/paste from some brain-dead desktop applications In a nutshell, the WYSIWYG editors, as we currently know them, doesn't fit every need, so there is no reason to bother to have one in core. I have said that a few times already, but the answer to questions like "everyone needs a WYSIWYG editor, Drupal should support that out of the box" (feel free to replace "WYSIWYG editor" by "a better forum", "trackback support" or "a pony stable") is *not* "that should be in core", but "people should step up to create and maintain a Drupal distribution that fits these particular needs". Because, no, not everyone needs that, and core is already sufficiently large so that a few areas are already poorly maintained. Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: From arancaytar.ilyaran at gmail.com Sat May 23 08:54:12 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Sat, 23 May 2009 10:54:12 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: References: <074101c9db71$8b539d70$0200a8c0@structworks.com> Message-ID: <4A17B9B4.2020807@gmail.com> Damien Tournoud wrote: > - It is doubtful that a WYSIWYG editor improve usability Hear, hear. BBCode and Markdown isn't hard to get into, and it's used on all forums I've ever seen. On the few forums that offer a choice between BBcode and WYSIWYG, people complain that WYSIWYG is clumsy to work with, puts extra line-breaks and paragraphs where you don't want them, doesn't usually reflect how your post will actually look after submission, and slows down the browser. I feel that the very concept of WYSIWYG editors does great damage to user experience - ultimately, learning to emphasize like *this* or /this/ or even [i]this[/i] will be less frustrating than clicking buttons that don't quite do what you want. The only "familiar experience" it offers is similarity with poorly written word processors that these same users are usually cursing all day. Madness! :( (Sorry for the rant.) -- Aran From hans.rossel at koba.be Sat May 23 09:33:39 2009 From: hans.rossel at koba.be (KOBA | Hans Rossel) Date: Sat, 23 May 2009 11:33:39 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4A17B9B4.2020807@gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> Message-ID: <51a9b8330905230233h4ae06396uea7b82ad49f976b2@mail.gmail.com> I agree with the fact that developers don't need a WYSIWYG editor. Writing code is easy and html is easiest of all. So its logical most developers are against WYSIWYG editors. They are not needed for them and above that pollute the code. But even if you write fluiently html, adding a big piece of content with headers, lists, tables is really a lot more work without a WYSIWYG editor. Certainly for people that are not used to write code. For them one of the advantages of using a CMS is that you don't have to learn html to add content. I feel when there will be a discussion among developers whether or not to have a WYSIWYG editor, there will be of course consensus that there should not be one as its not good for the code. But developers are not the ones that add the content to a site, ask the people that add the content what they prefer. Hans 2009/5/23 Arancaytar Ilyaran > > I feel that the very concept of WYSIWYG editors does great damage to > user experience - ultimately, learning to emphasize like *this* or > /this/ or even [i]this[/i] will be less frustrating than clicking > buttons that don't quite do what you want. -------------- next part -------------- An HTML attachment was scrubbed... URL: From davemyb at gmail.com Sat May 23 12:57:59 2009 From: davemyb at gmail.com (Dave Myburgh) Date: Sat, 23 May 2009 08:57:59 -0400 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <51a9b8330905230233h4ae06396uea7b82ad49f976b2@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <51a9b8330905230233h4ae06396uea7b82ad49f976b2@mail.gmail.com> Message-ID: <6bc75a3b0905230557l6001a88dk6f2f306246ed632f@mail.gmail.com> > > But even if you write fluiently html, adding a big piece of content with > headers, lists, tables is really a lot more work without a WYSIWYG editor. > Exactly. I find the same thing, and I like using BUEditor for this kind of thing. In fact, I try and push my clients to use BUEditor instead of FCK or TinyMCE. This avoids the problems associated with people copying and pasting from Word. Anyway, most people don't need all those icons in other editors, all they really need is the basic ones in the default BUEditor install. Plus, its easy to add new icons and functions if you want them. Having something like this editor in core might be a better option, although I am fine with keeping it as a contrib module. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: From development at standoutdesign.nl Sat May 23 14:05:46 2009 From: development at standoutdesign.nl (Stefan Nagtegaal) Date: Sat, 23 May 2009 16:05:46 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <6bc75a3b0905230557l6001a88dk6f2f306246ed632f@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <51a9b8330905230233h4ae06396uea7b82ad49f976b2@mail.gmail.com> <6bc75a3b0905230557l6001a88dk6f2f306246ed632f@mail.gmail.com> Message-ID: <7BADF856-8C01-4B29-BD56-56F3E7C114B2@standoutdesign.nl> http://markitup.jaysalvat.com/home/ The ultimate jQuery WYSIWYG-editor, easily configurable and usable with different input formats. NO doubt that *if* we want an WYSIWYG- editor in core at all, that it should be this one. Kind regards, Stefan Nagtegaal From andrewberry at sentex.net Sat May 23 17:03:28 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Sat, 23 May 2009 13:03:28 -0400 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <074101c9db71$8b539d70$0200a8c0@structworks.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> Message-ID: On 23-May-09, at 2:41 AM, Daniel F. Kudwien wrote: > tha_sun: seems like it'd be a top priority for the > project..given how significantly it improves the usability Does anyone know of any papers studying the differences between various editor types, and if any of them can be shown to actually improve usability and user satisfaction? I did some searching, and I found: http://www.jasoncornwell.net/projects/BloggerFinalReport.pdf which is about a UI redesign of blogger.com; not much in there other than that users found editors to be problematic for image placement, and that the concept of previewing an edit didn't stick very well. I also found this which may be of interest: http://doi.acm.org/10.1145/275269.275272 It's from 1998, but many of the issues it finds about HTML editors still seem relevant today. Complaints about poor code, overwriting custom changes, and general unreliability are mentioned, which all seem to apply to most of the JS editors today. A comparison of WYSIWYG vs WYMIWYG would be very useful. --Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2672 bytes Desc: not available URL: From naheemzaffar at gmail.com Sat May 23 17:10:27 2009 From: naheemzaffar at gmail.com (Naheem Zaffar) Date: Sat, 23 May 2009 18:10:27 +0100 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: References: <074101c9db71$8b539d70$0200a8c0@structworks.com> Message-ID: <3adc77210905231010h8194b70paa63a684b688eefa@mail.gmail.com> I don't think anyone would argue that having buttons on an textarea for commonly used actions is a problem in any way - I personally hate having th type out log tags like blockquote multiple times where spelling errors can cause problems. As for actual wysiwyg, it depends on the implementation, and the thing here is if its not tightly coupled with the software, it shows. A dual mode like in wordpress could be interesting, however I have visited fora (using invision power board I think) where there is some sort of hybrid mode where test was as in wysiwyg, but new additions could be made through adding more tags too. -------------- next part -------------- An HTML attachment was scrubbed... URL: From killshot91 at comcast.net Sat May 23 17:17:45 2009 From: killshot91 at comcast.net (Steve Edwards) Date: Sat, 23 May 2009 10:17:45 -0700 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: References: <074101c9db71$8b539d70$0200a8c0@structworks.com> Message-ID: <4A182FB9.6090408@comcast.net> http://drupal.org/node/208456 Andrew Berry wrote: > On 23-May-09, at 2:41 AM, Daniel F. Kudwien wrote: > >> tha_sun: seems like it'd be a top priority for the >> project..given how significantly it improves the usability > > Does anyone know of any papers studying the differences between various > editor types, and if any of them can be shown to actually improve > usability and user satisfaction? I did some searching, and I found: > > http://www.jasoncornwell.net/projects/BloggerFinalReport.pdf > > which is about a UI redesign of blogger.com; not much in there other > than that users found editors to be problematic for image placement, and > that the concept of previewing an edit didn't stick very well. > > I also found this which may be of interest: > http://doi.acm.org/10.1145/275269.275272 > > It's from 1998, but many of the issues it finds about HTML editors still > seem relevant today. Complaints about poor code, overwriting custom > changes, and general unreliability are mentioned, which all seem to > apply to most of the JS editors today. > > A comparison of WYSIWYG vs WYMIWYG would be very useful. > > --Andrew From cxjohnson at gmail.com Sat May 23 20:19:42 2009 From: cxjohnson at gmail.com (Chris Johnson) Date: Sat, 23 May 2009 15:19:42 -0500 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4A17B9B4.2020807@gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> Message-ID: <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> On Sat, May 23, 2009 at 3:54 AM, Arancaytar Ilyaran wrote: > Damien Tournoud wrote: >> - It is doubtful that a WYSIWYG editor improve usability > > Hear, hear. > > BBCode and Markdown isn't hard to get into, and it's used on all forums > I've ever seen. I've got my own little rant here. Folks who say WYSIWYG editors do not improve usability are myopic programmers who I never want determining the specifications for projects I work on for my customers. Every customer we have demands WYSIWYG as part of their deliverable -- and for good reason. A lot of their end users are barely capable of using email. Expecting them to learn Markdown or something similar is insane. A lot of the time, my customers also expect to do things like copy/paste from MS Word documents and have it "just work" as far as formatting goes. Making that work is even uglier and less reliable than straight-up WYSIWYG. However, it doesn't matter what we as developers think about the crappy state of WYSIWYG editors and the impossibility of pasting horrible Word formatting. Our job is to make computer software work better and more easily for the end users, not to force end users to adapt to cryptic computer limitations. End of rant. Yup, all of the WYSIWYG editors out there have some sort of limitation or another. That's a technical challenge. Can we solve it? Or do we throw up our hands and give up? ..chris From news at unleashedmind.com Sat May 23 21:00:37 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Sat, 23 May 2009 23:00:37 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> Message-ID: <089901c9dbe9$865b67d0$0200a8c0@structworks.com> > However, it doesn't matter what we as developers think about > the crappy state of WYSIWYG editors and the impossibility of > pasting horrible Word formatting. Our job is to make > computer software work better and more easily for the end > users, not to force end users to adapt to cryptic computer > limitations. Thanks. Finally someone who understands the issue at hand. > Yup, all of the WYSIWYG editors out there have some sort of > limitation or another. That's a technical challenge. Can we > solve it? Or do we throw up our hands and give up? Yes, we can. Major parts of the challenge are solved already. There is no "the editor for Drupal core". In the same way you can have multiple input formats for HTML, BBCode, Markdown or PHP, you can have an appropriate client-side editor attached to each one of them. Switching the input format means switching the editor. If you don't understand that, then you don't understand the overall issue. Also, we allow all Drupal modules to expose functionality to all editors. Without requiring module developers to learn and understand gazillion of different editor libraries. Certainly, we still have to tackle some larger issues. However, we are slowly getting there. If you want to help, just ping me. sun From wdlists at optonline.net Sun May 24 13:06:40 2009 From: wdlists at optonline.net (Walt Daniels) Date: Sun, 24 May 2009 09:06:40 -0400 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> Message-ID: My sentiments, exactly! If the users can't use it without problems they will leave you site for one that is more user friendly. Without problems means whatever ugly hacks under the covers are needed to really strip Word junk. They don't understand the need to use paste from Word (in tinyMCE) and it gets it wrong fairly often. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Chris Johnson Sent: Saturday, May 23, 2009 4:20 PM To: development at drupal.org Subject: Re: [development] Status update: WYSIWYG support in Drupal core On Sat, May 23, 2009 at 3:54 AM, Arancaytar Ilyaran wrote: > Damien Tournoud wrote: >> - It is doubtful that a WYSIWYG editor improve usability > > Hear, hear. > > BBCode and Markdown isn't hard to get into, and it's used on all forums > I've ever seen. I've got my own little rant here. Folks who say WYSIWYG editors do not improve usability are myopic programmers who I never want determining the specifications for projects I work on for my customers. Every customer we have demands WYSIWYG as part of their deliverable -- and for good reason. A lot of their end users are barely capable of using email. Expecting them to learn Markdown or something similar is insane. A lot of the time, my customers also expect to do things like copy/paste from MS Word documents and have it "just work" as far as formatting goes. Making that work is even uglier and less reliable than straight-up WYSIWYG. However, it doesn't matter what we as developers think about the crappy state of WYSIWYG editors and the impossibility of pasting horrible Word formatting. Our job is to make computer software work better and more easily for the end users, not to force end users to adapt to cryptic computer limitations. End of rant. Yup, all of the WYSIWYG editors out there have some sort of limitation or another. That's a technical challenge. Can we solve it? Or do we throw up our hands and give up? ..chris From drupal at ryancross.com Sun May 24 13:19:04 2009 From: drupal at ryancross.com (Ryan Cross) Date: Sun, 24 May 2009 23:19:04 +1000 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> Message-ID: <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> On Sun, May 24, 2009 at 11:06 PM, Walt Daniels wrote: > My sentiments, exactly! If the users can't use it without problems they will > leave you site for one that is more user friendly. Without problems means > whatever ugly hacks under the covers are needed to really strip Word junk. > They don't understand the need to use paste from Word (in tinyMCE) and it > gets it wrong fairly often. Do you know of any other site or WYSIWYG editor that handles M$ word better than what's available? I don't think there is one, otherwise I'm sure it would be quite popular. I'd be happy to be proven wrong though. I just don't want people chasing a mythical "perfect" wysiwyg editor. From kathleen at ceardach.com Sun May 24 14:27:26 2009 From: kathleen at ceardach.com (Kathleen Murtagh) Date: Sun, 24 May 2009 10:27:26 -0400 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> Message-ID: <78789e870905240727l2c67e801ob291e6d3b8474e20@mail.gmail.com> On Sun, May 24, 2009 at 9:19 AM, Ryan Cross wrote: > On Sun, May 24, 2009 at 11:06 PM, Walt Daniels > wrote: > > My sentiments, exactly! If the users can't use it without problems they > will > > leave you site for one that is more user friendly. Without problems means > > whatever ugly hacks under the covers are needed to really strip Word > junk. > > They don't understand the need to use paste from Word (in tinyMCE) and it > > gets it wrong fairly often. > > Do you know of any other site or WYSIWYG editor that handles M$ word > better than what's available? > > My team just recently had to solve this problem. We created a new plugin based on TinyMCE's "Paste from Word" button that automatically runs based on an algorithm that detects if a user has pasted. It's not perfect, because for instance it strips all styles from any HTML (so no right or center text alignment). However, for a limited input format, its appears to have solved the problem we have. It even works with Image Assist. We no longer get complaints, the editor really is displaying what they'll get, and all the font formatting is consistent across the site. Obviously, we need to bundle it up and provide it back to the community. We'll be working on those tasks after the site's release. However, you can still access it off the SCF github repository if you're interested: http://github.com/benjamin-agaric/scf/tree/90aa5f4114bd468122c6a6b833d314b219600869/modules/custom/cleanword (It may be out of date. We fixed some critical bugs about two weeks ago) -------------- next part -------------- An HTML attachment was scrubbed... URL: From drewish at katherinehouse.com Sun May 24 15:55:31 2009 From: drewish at katherinehouse.com (andrew morton) Date: Sun, 24 May 2009 11:55:31 -0400 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> Message-ID: On Sun, May 24, 2009 at 9:06 AM, Walt Daniels wrote: > My sentiments, exactly! If the users can't use it without problems they will > leave you site for one that is more user friendly. Without problems means > whatever ugly hacks under the covers are needed to really strip Word junk. > They don't understand the need to use paste from Word (in tinyMCE) and it > gets it wrong fairly often. One of the things that I found insanely frustrating with pasting from Word was that depending on which browser you pasted it into you'd get an entirely different DOM tree as a result. IE6 would end up with something really broken while FF3 would actually handle it pretty well. It added another agonizing level of complexity to the testing process. andrew From bryan at cmsreport.com Sun May 24 18:29:33 2009 From: bryan at cmsreport.com (Bryan Ruby) Date: Sun, 24 May 2009 13:29:33 -0500 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> Message-ID: <4A19920D.6@cmsreport.com> Ryan Cross wrote: > Do you know of any other site or WYSIWYG editor that handles M$ word > better than what's available? > > I don't think there is one, otherwise I'm sure it would be quite > popular. I'd be happy to be proven wrong though. I just don't want > people chasing a mythical "perfect" wysiwyg editor. I've found that a number of WYSIWYG editors work much better in Internet Explorer than say Firefox when doing a copy/paste from MS Word (2007). Don't ask me why, it's just an observation. There is and never shall be a perfect rich text editor, but that shouldn't be a reason for not implementing a WYSIWYG editor. In fact I don't know a single Drupal core module that is perfect but it hasn't stopped us from loving Drupal. I believe the original point of this thread was not a discussion on the advantages and disadvantages of an RTE. Instead, the discussion is how best do we move forward in implementing WYSIWYG in Drupal. On a side note, I'm a huge fan of the WYSIWYG API ( http://drupal.org/project/wysiwyg ). Bravo to this project and others in recently moving the third party code over to "|sites/all/libraries/" |it should make future Drupal upgrades much easier to manage. Bryan || From tz at it-arts.org Sun May 24 19:30:30 2009 From: tz at it-arts.org (Thomas Zahreddin) Date: Sun, 24 May 2009 21:30:30 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4A19920D.6@cmsreport.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> Message-ID: <1243193430.22213.6.camel@thomas-desktop> Hi, fckeditor does a good job: http://docs.fckeditor.net/FCKeditor_2.x/Users_Guide/Common_Tasks/Cut% 2C_Copy_and_Paste fckeditor has a paste from word option, Point 3 on the website best Thomas Zahreddin From bill at funnymonkey.com Sun May 24 20:12:49 2009 From: bill at funnymonkey.com (Bill Fitzgerald) Date: Sun, 24 May 2009 13:12:49 -0700 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4A19920D.6@cmsreport.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> Message-ID: <4A19AA41.5050705@funnymonkey.com> > > On a side note, I'm a huge fan of the WYSIWYG API ( > http://drupal.org/project/wysiwyg ). Bravo to this project and others > in recently moving the third party code over to > "|sites/all/libraries/" |it should make future Drupal upgrades much > easier to manage. > > Second the kudos for the WYSIWYG API -- it's also worth noting that when using both Tiny and FCK, the WYSIWYG API offers an option to have the default paste clean up formatting. This simplifies things for the end user. This, in combination with the work on Filefield inserts, actually makes for a WYSIWYG experience that approaches something that will satisfy end users without horrifying developers. And, fwiw, I am no fan of text editors. But I am a fan of meeting client expectations. The WYSIWYG API offers the hope that these will not always be mutually exclusive attitudes. Cheers, Bill -- Bill Fitzgerald http://funnymonkey.com FunnyMonkey -- Click. Connect. Learn. ph. 503 897 7160 From karoly at negyesi.net Mon May 25 00:12:53 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Sun, 24 May 2009 17:12:53 -0700 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4A19AA41.5050705@funnymonkey.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> Message-ID: <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> If we were here to satisfy clients with core then all the core files would be writeable by Apache so you can just update them from a browser. We do not do that. However, we DO recognize the need for that and I have spec'd out somewhat Plugin Manager which Joshua Rogers has written as a GSoC project last summer and is now headed for core. http://drupal.org/node/395472 have you reviewed it? In a similar vein, if we were to satisfy clients who (to quote webchick) think a patch is something you sew on a jacket, we would have TinyMCE or some horror in core already. Instead, NOONE paid attention to Stefan Negtaal who pointed an editor that COULD be a core candidate and instead yelped about Word copy-paste. Word is a proprietary product and I be damned if we deliver a crap product because of something that's not even open source. This does not mean we do not want to lower barriers -- for example, one of the design goals for DBTNG was to enable MS SQL and Oracle support. Have you seen that Andrea wrote an Oracle driver? http://drupal.org/project/oracle Did you help him? That's soemething a lot of clients want and I *bet* it wont pass the tests 100% right now. To sum up my angry rant which was trigerred by the word "client": *) I am very much in favor of enabling techniques. The first is in http://drupal.org/node/125315 note the people working on it. I have not seen many people bleating in here helping there. Further patches will find me helping, too. *) I will fight very hard against a WYSIWYG editor in core. *) I will help as much as I can without significant JS skills adding a markup editor with live preview. Steef's a strong a candidate. Regards NK From karoly at negyesi.net Mon May 25 00:33:14 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Sun, 24 May 2009 17:33:14 -0700 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> Message-ID: <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> In a much lower voice, have you seen that Steef largely stopped contributing? Guess why: mostly because the old small community feeling of Drupal is waning and there is too much "clients" around. Think. From drupal-devel at webchick.net Mon May 25 05:03:52 2009 From: drupal-devel at webchick.net (Angela Byron) Date: Mon, 25 May 2009 01:03:52 -0400 Subject: [development] HEAD broken for a few hours tonight Message-ID: <731D8B65-5D8C-4889-8F7A-92B13FECA420@webchick.net> Really sorry, folks. :\ I made the fatal error of jumping the gun before waiting for testing bot results on a "trivial" patch http://drupal.org/node/471234 which just so happened to break the installer. Oops. :\ I'm pretty sure I reset the statuses of all the issues that were mistakenly "needs work"ed but if you see that testing bot has said that your patch has "Failed: Failed to install HEAD." sometime tonight, go ahead and submit it for re-testing, as it was probably a mistake. /me dons the dunce cap of SHAME... -Angie From arancaytar.ilyaran at gmail.com Mon May 25 07:53:47 2009 From: arancaytar.ilyaran at gmail.com (Arancaytar Ilyaran) Date: Mon, 25 May 2009 09:53:47 +0200 Subject: [development] HEAD broken for a few hours tonight In-Reply-To: <731D8B65-5D8C-4889-8F7A-92B13FECA420@webchick.net> References: <731D8B65-5D8C-4889-8F7A-92B13FECA420@webchick.net> Message-ID: <4A1A4E8B.6000300@gmail.com> Wasn't the testing bot reprogrammed to run tests against a clean checkout, and shut down if HEAD was broken? I remember that being discussed after the last big breakage. It would be a useful feature, since none of us are immune to mistakes. Congrats on fixing it quickly and minimizing the damage! :) -Arancaytar Angela Byron wrote: > Really sorry, folks. :\ I made the fatal error of jumping the gun before > waiting for testing bot results on a "trivial" patch > http://drupal.org/node/471234 which just so happened to break the > installer. Oops. :\ > > I'm pretty sure I reset the statuses of all the issues that were > mistakenly "needs work"ed but if you see that testing bot has said that > your patch has "Failed: Failed to install HEAD." sometime tonight, go > ahead and submit it for re-testing, as it was probably a mistake. > > /me dons the dunce cap of SHAME... > -Angie > > -- PGP: http://ermarian.net/downloads/0x27CA5C74 XMPP: arancaytar.ilyaran at gmail.com AOL: 282026638 @icq / RealArancaytar @aim URL: http://ermarian.net * * * eternity lies ahead of us, and behind. have you drunk your fill? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature URL: From development at standoutdesign.nl Mon May 25 08:51:35 2009 From: development at standoutdesign.nl (Stefan Nagtegaal) Date: Mon, 25 May 2009 10:51:35 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> Message-ID: <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> Op 25 mei 2009, om 02:33 heeft Karoly Negyesi het volgende geschreven: > In a much lower voice, have you seen that Steef largely stopped > contributing? Guess why: mostly because the old small community > feeling of Drupal is waning and there is too much "clients" around. > Think. True, I have nothing to add here. I'm glad that at least (by me, the very respected and legendary core contributor) Karoly noticed that I sort of gave up on drupal and I'm not contributing much at the moment. That *does* however convince me that I was - in some way - valuable to the drupal project in the past and did things which brought drupal to a higher level. It also makes me re-think my consideration of comletely abandoning drupal as a whole, although I'm not convinced yet. Not sure why I answered this e-mail, as it does not add some value to the discussion. But I had the feeling that I had to let you guys know, how I'm feeling at the moment and the way I'm thinking about drupal. Kind regards, Stefan From karoly at negyesi.net Mon May 25 12:03:28 2009 From: karoly at negyesi.net (Karoly Negyesi) Date: Mon, 25 May 2009 05:03:28 -0700 Subject: [development] HEAD broken for a few hours tonight In-Reply-To: <4A1A4E8B.6000300@gmail.com> References: <731D8B65-5D8C-4889-8F7A-92B13FECA420@webchick.net> <4A1A4E8B.6000300@gmail.com> Message-ID: <7e270cea0905250503n63ee144bk707aaea1ee7c3b8b@mail.gmail.com> Thats in PIFR2. http://boombatower.chipin.com/automated-testing-system-development From bill at funnymonkey.com Mon May 25 15:06:43 2009 From: bill at funnymonkey.com (Bill Fitzgerald) Date: Mon, 25 May 2009 08:06:43 -0700 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> Message-ID: <4A1AB403.5070000@funnymonkey.com> When I first read Karoly's response, my inclination was to let this drop, as I freely admit to not understanding the rationale behind Karoly's initial response. But, given that my statement -- "But I am a fan of meeting client expectations" -- has sparked some comments, I wanted to take a moment to respond. As I've been thinking about this, I have a hard time understanding the reaction to the word "client." I suspect that this is largely due to our client base -- we work mostly with educational orgs and non-profits; our clients, frankly, are awesome, reasonable people, doing great work. I feel very fortunate that our work (as a web development shop) supports their work (as people doing great things to try and make the world a better place). But, to state the obvious, many clients are not like that, and I suspect that when most people hear the word client, they think of corporate types who think that real issues can be glossed over with better marketing materials. In my time in the community, I have definitely seen the tensions between the developer community, and those who think that Drupal needs a makeover to appeal to a larger corporate audience. The concerns that Drupal could become too corporate are, IMO, very valid, and something that the community needs to watch for. In some ways, I see this mirrored in the discussions about what DrupalCons should be, but that's a broader topic than can be discussed here. WRT Word, Oracle, and MS SQL: these are all proprietary apps. In very general terms, when we look to support people (also known as users, or clients), we should look for functionality that makes life better for as many people as possible. The notion that "supporting people" equates with accepting lower quality code is just not true; shortcuts are not acceptable. So, any statements that "supporting feature x" will result in bad code need to fall under the weight of their own inadequacy. Bad code in pursuit of a real need is still bad code, and will always be unacceptable. In looking at the people who use Word, Oracle, and MS SQL, if an org is using Oracle, they are likely to have some resources on hand, in either the form of money, staffing, or both. In short, these folks are in a relatively resource-rich environment. It takes a fair amount of money to launch an app based on Oracle, and even more in recurring fees. Word, on the other hand, is used by many people on the lower end of the technology spectrum. In many non-profits/schools, the people typing in Word don't have access to support personnel. They just want to get their work done. In short, these are the people/smaller orgs who are *always* disempowered by technology -- and there are a lot more of them than there are Oracle DB Admins. When we look for solutions that help to empower people, it's *good* to target things that make life easier for people who have traditionally been shut out -- and this is more likely to be true of your admin staff working in Word than your Oracle DB Admin working for Monster Corporation X. Stefan -- fwiw, I hope you make the choice to continue on with your involvement in the community. Cheers, Bill -- Bill Fitzgerald http://funnymonkey.com FunnyMonkey -- Click. Connect. Learn. ph. 503 897 7160 From naheemzaffar at gmail.com Mon May 25 15:25:31 2009 From: naheemzaffar at gmail.com (Naheem Zaffar) Date: Mon, 25 May 2009 16:25:31 +0100 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4A1AB403.5070000@funnymonkey.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> <4A1AB403.5070000@funnymonkey.com> Message-ID: <3adc77210905250825x4840869ew63cb4d5a5cde8da2@mail.gmail.com> I think many people will be happy with a(n easily customiseable/extendable) tag editor in core - even those who want a full fledged wysiwyg, if their only other option is no editor in core at all. I myself prefer a simple tag editor too - it also has this "ability" to strip out all the extra markup when copying and pasting from word... Ofcourse most developers, if asked for an opinion will choose the editor they like and personally prefer to be the one that is included in core, but that cannot happen, so what is probably needed is someone to lead the effort. Someone who has buy in with the developers to decide "This is the editor that we want in. Either it gets in or nothing" and after that point, I suspect most of the bike shedding will be less common and people may try to work on the actual issues to get that to happen. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tloud365 at gmail.com Tue May 26 15:57:12 2009 From: tloud365 at gmail.com (T L) Date: Tue, 26 May 2009 11:57:12 -0400 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <3adc77210905250825x4840869ew63cb4d5a5cde8da2@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> <4A1AB403.5070000@funnymonkey.com> <3adc77210905250825x4840869ew63cb4d5a5cde8da2@mail.gmail.com> Message-ID: I think it's easy and tempting but ultimately counter-productive to focus on who's right or really gets it or works in the real world. If it were a simple, one-sided issue, it wouldn't be a problem. Really, if you remove the specifics, it's yet another debate about what Drupal should or should not include. This seems natural and inevitable: the many flavors of *nix exemplify, in my mind, that even in the OSS world different people have different needs and want their needs prioritized first (security, usability, stability, maintainability, etc). It also seems pretty difficult to expect everyone to agree on what the community's needs are, let alone what the order is. (And hey, the founding members of the community have been pretty amazingly successful at meeting most needs through the modular design.) So while we could say 'fork it', walk away, or continue to have these passionate but inherently divisive discussions on a case-by-case basis; we could also recognize our common interests and gains by working together and focus on finding an inclusive solution. That doesn't have to mean compromise, it's not always a binary world. Globally speaking, I say we concentrate all this energy into discovering creative solutions. Warm Regards, Tim On Mon, May 25, 2009 at 11:25 AM, Naheem Zaffar wrote: > I think many people will be happy with a(n easily customiseable/extendable) > tag editor in core - even those who want a full fledged wysiwyg, if their > only other option is no editor in core at all. > > I myself prefer a simple tag editor too - it also has this "ability" to > strip out all the extra markup when copying and pasting from word... > > Ofcourse most developers, if asked for an opinion will choose the editor > they like and personally prefer to be the one that is included in core, but > that cannot happen, so what is probably needed is someone to lead the > effort. Someone who has buy in with the developers to decide "This is the > editor that we want in. Either it gets in or nothing" and after that point, > I suspect most of the bike shedding will be less common and people may try > to work on the actual issues to get that to happen. > -- Tim Loudon t: 781.686.6096 e: tloud365 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From larry at garfieldtech.com Tue May 26 15:58:51 2009 From: larry at garfieldtech.com (larry at garfieldtech.com) Date: Tue, 26 May 2009 10:58:51 -0500 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <3adc77210905250825x4840869ew63cb4d5a5cde8da2@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> <4A1AB403.5070000@funnymonkey.com> <3adc77210905250825x4840869ew63cb4d5a5cde8da2@mail.gmail.com> Message-ID: <4A1C11BB.9000104@garfieldtech.com> Naheem Zaffar wrote: > I think many people will be happy with a(n easily > customiseable/extendable) tag editor in core - even those who want a > full fledged wysiwyg, if their only other option is no editor in core at > all. > > I myself prefer a simple tag editor too - it also has this "ability" to > strip out all the extra markup when copying and pasting from word... > > Ofcourse most developers, if asked for an opinion will choose the editor > they like and personally prefer to be the one that is included in core, > but that cannot happen, so what is probably needed is someone to lead > the effort. Someone who has buy in with the developers to decide "This > is the editor that we want in. Either it gets in or nothing" and after > that point, I suspect most of the bike shedding will be less common and > people may try to work on the actual issues to get that to happen. It's not that simple. I have build sites for "clients" where we installed a WYSIWYG and it was good. I have built sites for "clients" where we installed a tag editor or wiki-style input filter, and it was good. I have built sites for "clients" where we gave them just the plain textarea and let them write tags themselves, and it was good. And I have sites where I would want to do a little of each for different textareas. Bottom line: Those who say that we have no need for a WYSIWYG editor and we shouldn't bother with it (whatever the justification given) are wrong. Flat out, unequivocally, wrong. Period. Those who insist that we need a WYSIWYG editor in core by default so that it's always available are also wrong. Flat out, unequivocally, wrong. Period. Drupal is a flexible multi-purpose tool, and in some use cases a fancy schmancy editor is absolutely critical. In others it would totally destroy the usability of the site. So what are we supposed to do with that? What we should always do when faced with that sort of dilemma: Make it as dead-simple to extend and customize as humanly possible. I want to be able to change between a heavy WYSIWYG of my choice, a tightly filtered set of manual HTML tags, an liberal set of manual HTML tags, a wiki-style syntax, and absolutely plain text only input... *per text area, per user, per user preference*, for multiple combinations of those. Why? Because I have run into use cases for every single one of those, in both personal and professional work. That's what we need to be building toward. The WYSIWYG API module is a very good step in that direction but it's not there yet; Think of this as the Filter system TNG, which desperately needs someone who can champion and drive that the way that the Menu API, DBTNG, and the D7 usability work does. And it goes deep enough that it's something that has to happen in core, especially now with Fields in core. If we don't think holistically like that, we end up with the body field teaser splitter button... A major WTF usability fail that has exactly one use case (blogs by people who can't write an HTML comment) that is one of the key reasons why Palantir does not use the core body field, ever. It's broken by the flawed concept that there is One True Input Workflow, which is simply not true. Yours is not the only use case or workflow that Drupal needs to support. Whoever you are or whatever your use case, that statement still holds true. --Larry Garfield From websweetweb at gmail.com Wed May 27 03:01:28 2009 From: websweetweb at gmail.com (Raja Sekharan) Date: Wed, 27 May 2009 08:31:28 +0530 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A17B9B4.2020807@gmail.com> <9ea8d6030905231319o4b88c55ar3516b7702409b8a0@mail.gmail.com> Message-ID: <1243393288.8165.5.camel@Xecutionr> On Sun, 2009-05-24 at 11:55 -0400, andrew morton wrote: > One of the things that I found insanely frustrating with pasting from > Word was that depending on which browser you pasted it into you'd get > an entirely different DOM tree as a result. IE6 would end up with > something really broken while FF3 would actually handle it pretty > well. It added another agonizing level of complexity to the testing > process. > > andrew The reason for this is that the
that is used to provide the WYSIWYG editing is implemented by the browser rendering engine and not javascript. Raj From drupal-devel at webchick.net Wed May 27 05:23:43 2009 From: drupal-devel at webchick.net (Angela Byron) Date: Wed, 27 May 2009 01:23:43 -0400 Subject: [development] Announcing DRUPAL-7-0-UNSTABLE-7 Message-ID: Bonsoir, devel list! It's been a *stupidly* long time since our last interim Drupal 7 unstable release. Sorry about that! I'm going to go ahead and blame this on taxes. And traveling. And a general lack of delicious ice cream in my freezer. It's a tragedy, really. But the *good* news is that DRUPAL-7-0-UNSTABLE-7 is jam packed full of awesomeness! That's right! JAM packed! The complete commit log is attached. There's also a full list of API changes in UNSTABLE-7 at http://drupal.org/node/224333#UNSTABLE-7 We are just about at the *three-month mark* until code freeze. That means the time to make your wildest Drupal dreams come true is RIGHT NOW. Check out the Drupal core initiatives page at http://drupal.org/community-initiatives/drupal-core to see what folks are tackling now if you're looking for a place to jump in. Or, feel free to add your own! Ok. Here we go! Changes for developers: ======================= - A spangly new Job Queue API which allows for batch processing of items. See http://api.drupal.org/api/group/queue/7 for more info. - Some nice performance improvements: o SimpleTest module no longer has to instantiate every test class in order to simply read its metadata. $memory_usage--; o There's now a taxonomy_vocabulary_load_multiple(), user_delete_multiple() to improve performance around massive amounts of these types of data. o Drupal now serves more sensible headrs for reverse proxies. o Core now defaults to using MySQL's InnoDB storage engine rather than MyISAM. - A new centralized static caching mechanism, so we don't need to litter $reset parameters all over the dang place. - New hooks hook_node_access_records_alter() and hook_node_grants_alter() to allow for complex interactions between multiple node access modules. - Field API improvements, including a pluggable storage mechanism, increased test coverage, and de-coupling from Form API. - Lots of DBTNG conversions. Less than 10 more to go! http://bit.ly/DBTNG_Conversion Yeehaw!! - Tests for OpenID module. We actually got a lot of tests, but these were *extra* awesome (and sorely needed), so I wanted to mention them specially here. ;) Changes for themers: ==================== - There are now nice extra body classes added to match a page's template suggestions. So for example node/1/edit would give you classes of page-node, page-node-edit, and page-node-1. The Zen theme offers this too in Drupal 6. - box.tpl.php is DEAD. DEAD, my friends! In its place are far more sensible theme_comment_form_box() and theme_search_results_listing(). That's right. There was absolutely nothing about box.tpl.php that had anything to do with block.module. Go figure. - A whole gaggle of formerly "special" things are now just regular old blocks. Footer message, feature-specific help text, mission statement, and even $content! This means they can be more precisely positioned and have the same configurable visibility as other blocks in the system. Changes for users: ================== - Those tired and ugly collapsed fieldsets on the node form have now become nice looking and useful Vertical Tabs! See http://buytaert.net/drupal-7-usability-update for a screeshot. - The horrible frankenstein "dumping ground of random crap" monster that is the default "Navigation" menu has now been split up into: o User menu: Contains "My account" and "Logout" links. This is positioned in the upper-right corner. o Management menu: Contains "Add new content" (formerly "Create content") and "Administer" links. Think of this as the "do stuff" menu. o Navigation menu: The same as before, but now at least with fewer links! :D - There's a slick new input format selector. Goodbye, 3-foot long collapsed fieldset with radios showing every godforsaken option known to mankind, hello compact, JS-ified select box! - There's a new top-level "International" administration menu for any localization/translation-related modules to put their stuff and a "Development" administration menu for developer tools. - On the permissions page, permissions checked for authenticated users will auto-check the same permissions for all other roles on the client side. This helps make it more obvious to people what checking that box actually does. - Removed Clean URL choice from installer. Seriously, are you ever going to opt *not* to have Clean URLs? If so, there's a settings page for that. :P - Some security improvements: o A watchdog event is now fired whenever modules are enabled/ disabled. o PHP module is now the "global killswitch" for whether users can use PHP anywhere in the system. Catch you next month, Drupalistas! :D -Angie -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: DRUPAL-7-0-UNSTABLE-7.txt URL: -------------- next part -------------- From m at ooh.dk Wed May 27 10:16:09 2009 From: m at ooh.dk (=?UTF-8?B?TWlra2VsIEjDuGdo?=) Date: Wed, 27 May 2009 12:16:09 +0200 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <4A1C11BB.9000104@garfieldtech.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4e983be00905240619v9076e99kdd0a0798e1a2b97b@mail.gmail.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> <4A1AB403.5070000@funnymonkey.com> <3adc77210905250825x4840869ew63cb4d5a5cde8da2@mail.gmail.com> <4A1C11BB.9000104@garfieldtech.com> Message-ID: <52d800cd0905270316q908924an88d32516a9eeb0ef@mail.gmail.com> On Tue, May 26, 2009 at 5:58 PM, larry at garfieldtech.com wrote: > Yours is not the only use case or workflow that Drupal needs to support. > ?Whoever you are or whatever your use case, that statement still holds true. > > --Larry Garfield I think that is spot on, and perhaps should be promoted to the official motto of this list. For the record, I do not think that having WYSIWYG in core is the way to go. I'm quite comfortable with being able to tack on Markdown, with or without helpful buttons, WYSIWYG with HTMLawed or just use plain text based on customer preference. I think having the WYSIWYG API in core would be encouraging a specific workflow that core has no business encouraging. More importantly, I think the default response to any sort of "add x to core" shoud be a loud and resounding "NO". In my opinion, core should be as slim and lean as possible. We might consider having more distributions, like "Drupal ready to go with WYSIWYG, blog and image gallery", but adding that to the code weight being dragged around across thousands of servers would be wasteful. Saying "no" to adding more stuff to core would actually be a great way to reduce your carbon emissions ;) -- Kind regards, Mikkel H?gh From syscrusher at 4th.com Wed May 27 12:47:05 2009 From: syscrusher at 4th.com (Syscrusher) Date: Wed, 27 May 2009 08:47:05 -0400 Subject: [development] Announcing DRUPAL-7-0-UNSTABLE-7 In-Reply-To: (sfid-20090527_012449_428150_2E7E7B88) References: (sfid-20090527_012449_428150_2E7E7B88) Message-ID: <1243428425.7643.54.camel@marcus> On Wed, 2009-05-27 at 01:23 -0400, Angela Byron wrote: > - Those tired and ugly collapsed fieldsets on the node form have now > become nice looking and useful Vertical Tabs! See > http://buytaert.net/drupal-7-usability-update > for a screeshot. I like this a lot for the standard node authoring, publishing info, and so on, but I have a question. Will contrib modules still have a way to generate the old-style full-width fieldset? I have a couple of modules that I maintain whose node dialogs won't fit very well into the narrower space. Again, I'm not criticizing the new design, which I like very much, just trying to figure out my best option for adapting my modules. Thanks! Scott -- Syscrusher From drewish at katherinehouse.com Wed May 27 15:56:01 2009 From: drewish at katherinehouse.com (andrew morton) Date: Wed, 27 May 2009 11:56:01 -0400 Subject: [development] Status update: WYSIWYG support in Drupal core In-Reply-To: <52d800cd0905270316q908924an88d32516a9eeb0ef@mail.gmail.com> References: <074101c9db71$8b539d70$0200a8c0@structworks.com> <4A19920D.6@cmsreport.com> <4A19AA41.5050705@funnymonkey.com> <7e270cea0905241712s43dede3cw1555d71765d10667@mail.gmail.com> <7e270cea0905241733i7903e6fhfc9e3c4d0ded4ea8@mail.gmail.com> <5A208C59-85D6-403C-ADD2-44AD76B07356@standoutdesign.nl> <4A1AB403.5070000@funnymonkey.com> <3adc77210905250825x4840869ew63cb4d5a5cde8da2@mail.gmail.com> <4A1C11BB.9000104@garfieldtech.com> <52d800cd0905270316q908924an88d32516a9eeb0ef@mail.gmail.com> Message-ID: On Wed, May 27, 2009 at 6:16 AM, Mikkel H?gh wrote: > More importantly, I think the default response to any sort of "add x > to core" shoud be a loud and resounding "NO". In my opinion, core > should be as slim and lean as possible. We might consider having more > distributions, like "Drupal ready to go with WYSIWYG, blog and image > gallery", but adding that to the code weight being dragged around > across thousands of servers would be wasteful. Not to pick on you specifically but I think this kind of a rigid, absolute thinking is actually as harmful to the project as the idea that core should be all things to all people. In my mind core should be about providing APIs that enable contrib. So while I'd agree that Drupal core should probably not ship with a WYSIWYG editor, it should provide APIs to make it easy to add them in contrib--the subject of this thread is WYSIWYG support after all. Any time you have 5-10 modules doing roughly the same thing in incompatible ways it's time to look at creating core APIs to allow them to work together and not duplicate the same functionality. The successful examples that come to my mind are node access modules from 4.7 to 5 and file modules from 6 to 7 (though it remains to be seen how well the file API works in practice). andrew From dmitrig01 at gmail.com Thu May 28 01:52:09 2009 From: dmitrig01 at gmail.com (Dmitri G) Date: Wed, 27 May 2009 18:52:09 -0700 Subject: [development] Announcing DRUPAL-7-0-UNSTABLE-7 In-Reply-To: <1243428425.7643.54.camel@marcus> References: <1243428425.7643.54.camel@marcus> Message-ID: <9d2095ce0905271852q114be17dub94d7914216c22ed@mail.gmail.com> Yep, either works. It'd be nicer to have it in the vertical tabs, so I think you should try it first. Dmitri On Wed, May 27, 2009 at 5:47 AM, Syscrusher wrote: > On Wed, 2009-05-27 at 01:23 -0400, Angela Byron wrote: > > - Those tired and ugly collapsed fieldsets on the node form have now > > become nice looking and useful Vertical Tabs! See > > http://buytaert.net/drupal-7-usability-update > > for a screeshot. > > > I like this a lot for the standard node authoring, publishing info, and > so on, but I have a question. Will contrib modules still have a way to > generate the old-style full-width fieldset? I have a couple of modules > that I maintain whose node dialogs won't fit very well into the narrower > space. > > Again, I'm not criticizing the new design, which I like very much, just > trying to figure out my best option for adapting my modules. Thanks! > > Scott > -- > Syscrusher > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From caleb at caleboconnell.com Thu May 28 03:28:14 2009 From: caleb at caleboconnell.com (Caleb O'Connell) Date: Wed, 27 May 2009 23:28:14 -0400 Subject: [development] noderefernace cck Message-ID: <200905272328.14404.caleb@caleboconnell.com> I am looking to get info about the cck module in drupal. I've been trying to write a cck module that will basically do the exact same as nodereference but with two free entry text fields to go along with it. Basically, one field to be the noderef lookup and two to add prices to associate to the referred field. I wasn't sure who I could get in touch with in the cck development who is familiar with this so I can ask some questions about where to put the code I want in place to make the custom module I was looking for. Thanks again in advance. -- -- Caleb Dylan O'Connell -- caleb at caleboconnell.com -- 207.319.4746 -- http://blog.caleboconnell.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrewberry at sentex.net Thu May 28 03:55:03 2009 From: andrewberry at sentex.net (Andrew Berry) Date: Wed, 27 May 2009 23:55:03 -0400 Subject: [development] noderefernace cck In-Reply-To: <200905272328.14404.caleb@caleboconnell.com> References: <200905272328.14404.caleb@caleboconnell.com> Message-ID: Take a look at filefield and imagefield. You should be able to extend nodereference in the same way. On 27-May-09, at 11:28 PM, "Caleb O'Connell" wrote: > I am looking to get info about the cck module in drupal. I've been > trying to write a cck module that will basically do the exact same > as nodereference but with two free entry text fields to go along > with it. Basically, one field to be the noderef lookup and two to > add prices to associate to the referred field. I wasn't sure who I > could get in touch with in the cck development who is familiar with > this so I can ask some questions about where to put the code I want > in place to make the custom module I was looking for. Thanks again > in advance. > > -- > -- Caleb Dylan O'Connell > -- caleb at caleboconnell.com > -- 207.319.4746 > -- http://blog.caleboconnell.com From ernst.pluess at gmail.com Thu May 28 07:30:47 2009 From: ernst.pluess at gmail.com (=?ISO-8859-1?Q?Ernst_Pl=FCss?=) Date: Thu, 28 May 2009 09:30:47 +0200 Subject: [development] preprocess page doesn't take all variables Message-ID: <27c534c90905280030m33e5b653ya2cd5555913fa90f@mail.gmail.com> Hi I'm trying to do a simple thing in D6: Add a variable to the page template. Unfortunately it seams, that it gets lost in theme_render_template. This is my code in the template.php: function ylt_preprocess_page(&$vars) { $vars['rabarber'] = 'rabarber'; } theme_render_template looks like this: function theme_render_template($template_file, $variables) { extract($variables, EXTR_SKIP); // Extract the variables to a local namespace ob_start(); // Start output buffering include "./$template_file"; // Include the template file $contents = ob_get_contents(); // Get the contents of the buffer ob_end_clean(); // End buffering and discard return $contents; // Return the contents } I can see rabarber in $variables, but it never ends up beeing extracted. Actually $variables contains about 47 entries but only about 12 of them get extracted. Is this a bug or am I doing something wrong? Best Regards Ernst -------------- next part -------------- An HTML attachment was scrubbed... URL: From syscrusher at 4th.com Thu May 28 12:53:21 2009 From: syscrusher at 4th.com (Syscrusher) Date: Thu, 28 May 2009 08:53:21 -0400 Subject: [development] Announcing DRUPAL-7-0-UNSTABLE-7 In-Reply-To: <9d2095ce0905271852q114be17dub94d7914216c22ed@mail.gmail.com> (sfid-20090527_215244_917198_25190668) References: <1243428425.7643.54.camel@marcus> <9d2095ce0905271852q114be17dub94d7914216c22ed@mail.gmail.com> (sfid-20090527_215244_917198_25190668) Message-ID: <1243515201.7643.69.camel@marcus> On Wed, 2009-05-27 at 18:52 -0700, Dmitri G wrote: > Yep, either works. It'd be nicer to have it in the vertical tabs, so I > think you should try it first. I intend to, but I'm not sure it will fit, especially into fixed-width themes. Thanks for the info! Scott -- Syscrusher From Peter at attiks.com Thu May 28 13:44:12 2009 From: Peter at attiks.com (Peter Droogmans) Date: Thu, 28 May 2009 15:44:12 +0200 Subject: [development] SPAM --- Re: noderefernace cck In-Reply-To: References: <200905272328.14404.caleb@caleboconnell.com> Message-ID: You can also have a look at the combo field, see http://drupal.org/node/119102 and http://groups.drupal.org/node/14009 I tried the patch last week but you may run into problems if files get removed, see the comments at the end of the thread. Cheers, Peter Droogmans 32 497 44 44 77 -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Andrew Berry Sent: donderdag 28 mei 2009 05:55 To: development at drupal.org; caleb at caleboconnell.com Subject: SPAM --- Re: [development] noderefernace cck Take a look at filefield and imagefield. You should be able to extend nodereference in the same way. On 27-May-09, at 11:28 PM, "Caleb O'Connell" wrote: > I am looking to get info about the cck module in drupal. I've been > trying to write a cck module that will basically do the exact same > as nodereference but with two free entry text fields to go along > with it. Basically, one field to be the noderef lookup and two to > add prices to associate to the referred field. I wasn't sure who I > could get in touch with in the cck development who is familiar with > this so I can ask some questions about where to put the code I want > in place to make the custom module I was looking for. Thanks again > in advance. > > -- > -- Caleb Dylan O'Connell > -- caleb at caleboconnell.com > -- 207.319.4746 > -- http://blog.caleboconnell.com From caleb at caleboconnell.com Thu May 28 15:12:52 2009 From: caleb at caleboconnell.com (Caleb O'Connell) Date: Thu, 28 May 2009 11:12:52 -0400 Subject: [development] noderefernace cck References: <200905272328.14404.caleb@caleboconnell.com> Message-ID: <20090528152002.77F0FA00CA@hemlock.osuosl.org> The following is from the noderefernce widget function which looks to be the best place to put in my code for adding two free entry text fields. I changed the name to beerlist throughout for my module purposes. The other place would be under nodereference_element, but I am not sure which would be best, and if a simple for each would work to create my fields. switch ($field['widget']['type']) { case 'beerlist_select': $element = array( '#type' => 'beerlist_select', '#default_value' => $items, ); break; case 'beerlist_buttons': $element = array( '#type' => 'beerlist_buttons', '#default_value' => $items, ); break; case 'beerlist_autocomplete': $element = array( '#type' => 'beerlist_autocomplete', '#default_value' => isset($items[$delta]) ? $items[$delta] : NULL, '#value_callback' => 'beerlist_autocomplete_value', ); break; } return $element; } Caleb O'Connell wrote: > I am looking to get info about the cck module in drupal. I've been trying > to write a cck module that will basically do the exact same as > nodereference but with two free > entry text fields to go along with it. Basically, one field to be the > noderef lookup > and two to add prices to associate to the referred field. I wasn't sure > who I could get in touch with in the cck development who is familiar with > this so I can ask some questions about where to put the code I want in > place to make the custom module I was > looking for. Thanks again in advance. > -- -- Caleb O'Connell -- Portlandtaps.com From marco.carbone at gmail.com Thu May 28 15:41:26 2009 From: marco.carbone at gmail.com (Marco Carbone) Date: Thu, 28 May 2009 08:41:26 -0700 Subject: [development] noderefernace cck In-Reply-To: <20090528152002.77F0FA00CA@hemlock.osuosl.org> References: <200905272328.14404.caleb@caleboconnell.com> <20090528152002.77F0FA00CA@hemlock.osuosl.org> Message-ID: <93bcb5e50905280841t6bf142bcw16ce8a0a899ac7e2@mail.gmail.com> Try the experimental content_multigroup module that comes with the latest CCK release on Drupal 6. Since it's experimental, you'll have to add a .info file to enable it. I have it working right now with a noderef + checkbox and it is mostly functional. (There are a few annoyances that still need to be worked out, such as the inability to remove empty instances when you allow multiple fields.) More here: http://drupal.org/node/119102 -marco On Thu, May 28, 2009 at 8:12 AM, Caleb O'Connell wrote: > The following is from the noderefernce widget function which looks to be the > best place to put in my code for adding two free entry text fields. ?I > changed the name to beerlist throughout for my module purposes. ?The other > place would be under nodereference_element, but I am not sure which would be > best, and if a simple for each would work to create my fields. > > > ?switch ($field['widget']['type']) { > ? ?case 'beerlist_select': > ? ? ?$element = array( > ? ? ? ?'#type' => 'beerlist_select', > ? ? ? ?'#default_value' => $items, > ? ? ?); > ? ? ?break; > > ? ?case 'beerlist_buttons': > ? ? ?$element = array( > ? ? ? ?'#type' => 'beerlist_buttons', > ? ? ? ?'#default_value' => $items, > ? ? ?); > ? ? ?break; > > ? ?case 'beerlist_autocomplete': > ? ? ?$element = array( > ? ? ? ?'#type' => 'beerlist_autocomplete', > ? ? ? ?'#default_value' => isset($items[$delta]) ? $items[$delta] : NULL, > ? ? ? ?'#value_callback' => 'beerlist_autocomplete_value', > ? ? ?); > ? ? ?break; > ?} > ?return $element; > } > > > Caleb O'Connell wrote: > >> I am looking to get info about the cck module in drupal. ?I've been trying >> to write a cck module that will basically do the exact same as >> nodereference but with two free >> entry text fields to go along with it. ?Basically, one field to be the >> noderef lookup >> and two to add prices to associate to the referred field. ?I wasn't sure >> who I could get in touch with in the cck development who is familiar with >> this so I can ask some questions about where to put the code I want in >> place to make the custom module I was >> looking for. ?Thanks again in advance. >> > > -- > -- Caleb O'Connell > -- Portlandtaps.com > From caleb at caleboconnell.com Thu May 28 15:50:56 2009 From: caleb at caleboconnell.com (Caleb O'Connell) Date: Thu, 28 May 2009 11:50:56 -0400 Subject: [development] noderefernace cck In-Reply-To: <93bcb5e50905280841t6bf142bcw16ce8a0a899ac7e2@mail.gmail.com> References: <200905272328.14404.caleb@caleboconnell.com> <20090528152002.77F0FA00CA@hemlock.osuosl.org> <93bcb5e50905280841t6bf142bcw16ce8a0a899ac7e2@mail.gmail.com> Message-ID: <200905281150.56325.caleb@caleboconnell.com> Using content multigroup, does it allow me to get that data back out of the database? do you have a sample .install file, just so I can see what requirements you're using. I have been doing a lot to work on this and if I can get this to work initially, I'd love to start working more on this. -- -- Caleb Dylan O'Connell -- caleb at caleboconnell.com -- 207.319.4746 -- http://blog.caleboconnell.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From marco.carbone at gmail.com Thu May 28 16:14:10 2009 From: marco.carbone at gmail.com (Marco Carbone) Date: Thu, 28 May 2009 09:14:10 -0700 Subject: [development] noderefernace cck In-Reply-To: <200905281150.56325.caleb@caleboconnell.com> References: <200905272328.14404.caleb@caleboconnell.com> <20090528152002.77F0FA00CA@hemlock.osuosl.org> <93bcb5e50905280841t6bf142bcw16ce8a0a899ac7e2@mail.gmail.com> <200905281150.56325.caleb@caleboconnell.com> Message-ID: <93bcb5e50905280914n641a7b0fw5d77ec9676b1e38b@mail.gmail.com> Just create content_multigroup.info and put it into cck/module/content_multigroup with these contents: name = Content Multigroup description = Combine multiple CCK fields into repeating field collections that work in unison. This module is experimental and not ready for production. dependencies[] = content dependencies[] = fieldgroup package = CCK core = 6.x This is explained in the README.txt that comes with the module. "does it allow me to get that data back out of the database" I'm not sure what you mean here -- yes, the data gets added to the database and can be retrieved as normal. In general, content multigroup just bundles up multiple fields and then it acts like a normal CCK field. On Thu, May 28, 2009 at 8:50 AM, Caleb O'Connell wrote: > Using content multigroup, does it allow me to get that data back out of the > database? do you have a sample .install file, just so I can see what > requirements you're using. I have been doing a lot to work on this and if I > can get this to work initially, I'd love to start working more on this. > -- > -- Caleb Dylan O'Connell > -- caleb at caleboconnell.com > -- 207.319.4746 > -- http://blog.caleboconnell.com From weitzman at tejasa.com Thu May 28 19:28:11 2009 From: weitzman at tejasa.com (Moshe Weitzman) Date: Thu, 28 May 2009 15:28:11 -0400 Subject: [development] preprocess page doesn't take all variables In-Reply-To: <27c534c90905280030m33e5b653ya2cd5555913fa90f@mail.gmail.com> References: <27c534c90905280030m33e5b653ya2cd5555913fa90f@mail.gmail.com> Message-ID: <6117a7500905281228g2ab15194ob86bfb3fec7e1b0a@mail.gmail.com> That sounds like a bug in extract(). Perhaps upgrade to latest release of php? On Thu, May 28, 2009 at 3:30 AM, Ernst Pl?ss wrote: > Hi > > I'm trying to do a simple thing in D6: Add a variable to the page template. > Unfortunately it seams, that it gets lost in theme_render_template. > > This is my code in the template.php: > > function ylt_preprocess_page(&$vars) { > $vars['rabarber'] = 'rabarber'; > } > > theme_render_template looks like this: > > function theme_render_template($template_file, $variables) { > extract($variables, EXTR_SKIP); // Extract the variables to a local > namespace > ob_start(); // Start output buffering > include "./$template_file"; // Include the template file > $contents = ob_get_contents(); // Get the contents of the buffer > ob_end_clean(); // End buffering and discard > return $contents; // Return the contents > } > > I can see rabarber in $variables, but it never ends up beeing extracted. > Actually $variables contains about 47 entries but only about 12 of them get > extracted. > > Is this a bug or am I doing something wrong? > > Best Regards > Ernst > > > From drupal at dave-cohen.com Fri May 29 17:36:20 2009 From: drupal at dave-cohen.com (David Cohen) Date: Fri, 29 May 2009 10:36:20 -0700 Subject: [development] behaviors context Message-ID: <1243618580.22144.1317852215@webmail.messagingengine.com> I'm trying to implement a Drupal.behavior. I realize my behavior function is passed a "context". But it's unclear to me what that context will be. If I understand correctly, when the behavior is first invoked, it is passed document, a variable built into javascript. Later, when some module's javascript adds content to the page, my behavior will be invoked again. This time, context could be anything. The module which added the content can pass whatever. So for example in ahah.js, Drupal.attachBehaviors() is passed a jquery object representing the new content. While in modules/views/js/ajax.js, Drupal.attachBehaviors() is passed a string or id, either of which could be used in a jquery selector. Do I have this right? What I need is the javascript element (not jquery object) that is the added content. Does anyone have a snippet of code which returns this, given a context? Thanks, -Dave From matt at aleph-null.tv Fri May 29 17:46:17 2009 From: matt at aleph-null.tv (Matt) Date: Fri, 29 May 2009 12:46:17 -0500 Subject: [development] behaviors context In-Reply-To: <1243618580.22144.1317852215@webmail.messagingengine.com> References: <1243618580.22144.1317852215@webmail.messagingengine.com> Message-ID: <70fbbb000905291046j7a32be2di89572cfb0509ddf4@mail.gmail.com> As far as the context goes, yes -- you are at the mercy of whatever called Drupal.attachBehaviors(). So it's not all that reliable. Typically, the whole CSS :not() pseudo-class combined with a 'processed-' class is used to help you find segments that have not been processed already. There are ample examples of this inside of Drupal's JS libraries. Matt On Fri, May 29, 2009 at 12:36 PM, David Cohen wrote: > I'm trying to implement a Drupal.behavior. ?I realize my behavior > function is passed a "context". ?But it's unclear to me what that > context will be. > > If I understand correctly, when the behavior is first invoked, it is > passed document, a variable built into javascript. > > Later, when some module's javascript adds content to the page, my > behavior will be invoked again. ?This time, context could be anything. > The module which added the content can pass whatever. ?So for example in > ahah.js, Drupal.attachBehaviors() is passed a jquery object representing > the new content. ?While in modules/views/js/ajax.js, > Drupal.attachBehaviors() is passed a string or id, either of which could > be used in a jquery selector. > > Do I have this right? > > What I need is the javascript element (not jquery object) that is the > added content. ?Does anyone have a snippet of code which returns this, > given a context? > > Thanks, -Dave > > -- http://technosophos.com http://querypath.org From nedjo at islandnet.com Fri May 29 17:54:51 2009 From: nedjo at islandnet.com (Nedjo Rogers) Date: Fri, 29 May 2009 11:54:51 -0600 Subject: [development] behaviors context In-Reply-To: <1243618580.22144.1317852215@webmail.messagingengine.com> References: <1243618580.22144.1317852215@webmail.messagingengine.com> Message-ID: <4A20216B.6080904@islandnet.com> David Cohen wrote: > I'm trying to implement a Drupal.behavior. I realize my behavior > function is passed a "context". But it's unclear to me what that > context will be. The context is supposed to be the element to be processed--not a jQuery object but the page element. See the 5 - 6 upgrade notes: http://drupal.org/node/114774#javascript-behaviors However, this fact may have been lost along the way. From news at unleashedmind.com Fri May 29 17:59:01 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Fri, 29 May 2009 19:59:01 +0200 Subject: [development] behaviors context In-Reply-To: <1243618580.22144.1317852215@webmail.messagingengine.com> Message-ID: <16a801c9e087$2604def0$0200a8c0@structworks.com> > What I need is the javascript element (not jquery object) > that is the added content. Does anyone have a snippet of > code which returns this, given a context? If I'm not mistaken: var new_content = $(context).get(0); sun From news at unleashedmind.com Fri May 29 18:04:51 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Fri, 29 May 2009 20:04:51 +0200 Subject: [development] behaviors context In-Reply-To: <4A20216B.6080904@islandnet.com> Message-ID: <16b801c9e087$f69f6da0$0200a8c0@structworks.com> > The context is supposed to be the element to be > processed--not a jQuery object but the page element. See the > 5 - 6 upgrade notes: > http://drupal.org/node/114774#javascript-behaviors > > However, this fact may have been lost along the way. Note that even misc/ahah.js passes an jQuery object: if (new_content.parents('html').length > 0) { Drupal.attachBehaviors(new_content); } However, passing a string as context sounds a bit wrong. Behaviors usually expect a DOM element. sun From matt at aleph-null.tv Fri May 29 18:14:21 2009 From: matt at aleph-null.tv (Matt) Date: Fri, 29 May 2009 13:14:21 -0500 Subject: [development] behaviors context In-Reply-To: <16b801c9e087$f69f6da0$0200a8c0@structworks.com> References: <4A20216B.6080904@islandnet.com> <16b801c9e087$f69f6da0$0200a8c0@structworks.com> Message-ID: <70fbbb000905291114i6bc9fce8y67d02402a9284172@mail.gmail.com> Thus my original claim: You are at the mercy of whatever calls Drupal.attachBehaviors(). Unless you are absolutely positive you can account for all use cases (and thus all callings of Drupal.attach()), you're better off ignoring context. Matt On Fri, May 29, 2009 at 1:04 PM, Daniel F. Kudwien wrote: >> The context is supposed to be the element to be >> processed--not a jQuery object but the page element. See the >> 5 - 6 upgrade notes: >> http://drupal.org/node/114774#javascript-behaviors >> >> However, this fact may have been lost along the way. > > Note that even misc/ahah.js passes an jQuery object: > > ?if (new_content.parents('html').length > 0) { > ? ?Drupal.attachBehaviors(new_content); > ?} > > > However, passing a string as context sounds a bit wrong. ?Behaviors usually > expect a DOM element. > > sun > > -- http://technosophos.com http://querypath.org From merlin at logrus.com Fri May 29 18:44:23 2009 From: merlin at logrus.com (Earl Miles) Date: Fri, 29 May 2009 11:44:23 -0700 Subject: [development] behaviors context In-Reply-To: <70fbbb000905291114i6bc9fce8y67d02402a9284172@mail.gmail.com> References: <4A20216B.6080904@islandnet.com> <16b801c9e087$f69f6da0$0200a8c0@structworks.com> <70fbbb000905291114i6bc9fce8y67d02402a9284172@mail.gmail.com> Message-ID: <4A202D07.5070002@logrus.com> Matt wrote: > Thus my original claim: You are at the mercy of whatever calls > Drupal.attachBehaviors(). Unless you are absolutely positive you can > account for all use cases (and thus all callings of Drupal.attach()), > you're better off ignoring context. I totally disagree. It's either a jquery object or something you can easily make into a jquery object. Using $(context) should always work and you can get a DOM element using $(context).get(0). Ignoring context will lead to poor performance. From drupal at dave-cohen.com Fri May 29 19:03:37 2009 From: drupal at dave-cohen.com (David Cohen) Date: Fri, 29 May 2009 12:03:37 -0700 Subject: [development] behaviors context In-Reply-To: <4A202D07.5070002@logrus.com> References: <4A20216B.6080904@islandnet.com> <16b801c9e087$f69f6da0$0200a8c0@structworks.com><70fbbb000905291114i6bc9fce8y67d02402a9284172@mail.gmail.com> <4A202D07.5070002@logrus.com> Message-ID: <1243623817.7047.1317866581@webmail.messagingengine.com> So just to clarify, will the context always refer to a single element? In other words should my code be: $elem = $(context).get(0); do_my_behavior($elem); or, more like: $(context).each(function () { $elem = $(this).get(0); do_my_behavior($elem); }); And in the first invocation, when context == document, will $(document).get(0) return the document? Thanks everyone for helping me understand. -Dave On Fri, 29 May 2009 11:44 -0700, "Earl Miles" wrote: > I totally disagree. It's either a jquery object or something you can > easily make into a jquery object. Using $(context) should always work > and you can get a DOM element using $(context).get(0). Ignoring context > will lead to poor performance. From matt at aleph-null.tv Fri May 29 19:34:19 2009 From: matt at aleph-null.tv (Matt) Date: Fri, 29 May 2009 14:34:19 -0500 Subject: [development] behaviors context In-Reply-To: <4A202D07.5070002@logrus.com> References: <4A20216B.6080904@islandnet.com> <16b801c9e087$f69f6da0$0200a8c0@structworks.com> <70fbbb000905291114i6bc9fce8y67d02402a9284172@mail.gmail.com> <4A202D07.5070002@logrus.com> Message-ID: <70fbbb000905291234s4de92a1cu3df6413034051d6b@mail.gmail.com> The other issue with using context is that it is unreliable for a second reason: behaviors may actually misbehave when focusing on only a small portion of the DOM. Example: context contains several rows of a table, and you are adding odd/even classes to a table in a behavior. If a behavior is fed just the modified rows, this may lead to unexpected behavior (Reason: there may be other rows not fed into the context, thus throwing off odd/even counts). That's a basic example. In the JS book I wrote, I provided a more elaborate examples of contexts causing problems. And there are still others -- like cases where AHAH content has its own JS which may modify your DOM further. But the basic principle is the same: Assuming that the attachBehaviors call is passing you what you need is not a good assumption. And since attachBehaviors can be called from anywhere (not just in AHAH/AJAX callbacks) and for any reason, it's dangerous to presume you know what you're getting. re: performance... in most cases you are talking a negligible difference. DOM optimization in mainstream browsers is good enough that a search through an entire document is almost always "fast enough". Shaving 10 msecs off of that time isn't going to make much of a difference (assuming you could actually shave that much from the search time). There are two patterns in Drupal JS to "prevent" the same behavior from processing the same data twice. One is the :not(processed-X) pattern, which seems to be pretty reliable, and is pretty much entirely in the hands of the author of the behavior (barring a misanthrope who decides to remove your processed classes). The other is the context, which requires that both the caller of attachBehavior() and the behavior have the same set of assumptions about what is being passed in and what needs operating on. This is not always the case, and there are easy-to-reproduce gotchas (like zebra striping, AHAH'd JavaScript that alters the DOM, and so on). Matt On Fri, May 29, 2009 at 1:44 PM, Earl Miles wrote: > Matt wrote: >> >> Thus my original claim: You are at the mercy of whatever calls >> Drupal.attachBehaviors(). Unless you are absolutely positive you can >> account for all use cases (and thus all callings of Drupal.attach()), >> you're better off ignoring context. > > I totally disagree. It's either a jquery object or something you can easily > make into a jquery object. Using $(context) should always work and you can > get a DOM element using $(context).get(0). Ignoring context will lead to > poor performance. > -- http://technosophos.com http://querypath.org From matt at aleph-null.tv Fri May 29 19:36:28 2009 From: matt at aleph-null.tv (Matt) Date: Fri, 29 May 2009 14:36:28 -0500 Subject: [development] behaviors context In-Reply-To: <1243623817.7047.1317866581@webmail.messagingengine.com> References: <4A20216B.6080904@islandnet.com> <16b801c9e087$f69f6da0$0200a8c0@structworks.com> <70fbbb000905291114i6bc9fce8y67d02402a9284172@mail.gmail.com> <4A202D07.5070002@logrus.com> <1243623817.7047.1317866581@webmail.messagingengine.com> Message-ID: <70fbbb000905291236q24066246m6a9dcb5e2fd71d95@mail.gmail.com> No -- the context will refer to whatever is passed into Drupal.attachBehaviors(). In Drupal core, that will be a DOM Element or a jQuery object. I know of no guarantee that the jQuery will always point to one DOM element (though I know of no place in Drupal core where more than one is passed in). For contributed modules... I suppose you are at the liberty of the contrib developers. Matt On Fri, May 29, 2009 at 2:03 PM, David Cohen wrote: > So just to clarify, will the context always refer to a single element? > In other words should my code be: > > $elem = $(context).get(0); > do_my_behavior($elem); > > or, more like: > > $(context).each(function () { > ?$elem = $(this).get(0); > ?do_my_behavior($elem); > }); > > > And in the first invocation, when context == document, will > $(document).get(0) return the document? > > Thanks everyone for helping me understand. > > -Dave > > > On Fri, 29 May 2009 11:44 -0700, "Earl Miles" wrote: >> I totally disagree. It's either a jquery object or something you can >> easily make into a jquery object. Using $(context) should always work >> and you can get a DOM element using $(context).get(0). Ignoring context >> will lead to poor performance. > -- http://technosophos.com http://querypath.org From drupal at dave-cohen.com Fri May 29 19:52:56 2009 From: drupal at dave-cohen.com (David Cohen) Date: Fri, 29 May 2009 12:52:56 -0700 Subject: [development] Fwd: Re: behaviors context Message-ID: <1243626776.17100.1317873929@webmail.messagingengine.com> I think I get what you're writing about. It makes sense when you're behavior affects, say, all elements of a certain class. And you can update the class after the behavior acts. But in my case, I need to operate over all elements. So to do what you're talking about I'd need to add classes all over the place. Specifically, I'm working with Facebook Connect. And I need to tell facebook's javascript to parse any markup added to a page. They provide methods to do this, http://wiki.developers.facebook.com/index.php/JS_API_T_FB.XFBML.Host. One method parses the whole dom tree, another limits the parse to specific elements. For performance reasons I prefer to use the more limited method, but I'll resort to the other if I really have to. -Dave On Fri, 29 May 2009 14:34 -0500, "Matt" wrote: > There are two patterns in Drupal JS to "prevent" the same behavior > from processing the same data twice. One is the :not(processed-X) > pattern, which seems to be pretty reliable, and is pretty much > entirely in the hands of the author of the behavior (barring a > misanthrope who decides to remove your processed classes). > > From news at unleashedmind.com Fri May 29 19:59:29 2009 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Fri, 29 May 2009 21:59:29 +0200 Subject: [development] behaviors context In-Reply-To: <70fbbb000905291234s4de92a1cu3df6413034051d6b@mail.gmail.com> Message-ID: <16d801c9e097$fa5de1f0$0200a8c0@structworks.com> > re: performance... in most cases you are talking a negligible > difference. DOM optimization in mainstream browsers is good > enough that a search through an entire document is almost > always "fast enough". Shaving 10 msecs off of that time isn't > going to make much of a difference (assuming you could > actually shave that much from the search time). Now, you do the math: 10 ms * ~20+ behaviors = 200+ ms With each module/behavior you add, the performance gets worse. > There are two patterns in Drupal JS to "prevent" the same > behavior from processing the same data twice. One is the > :not(processed-X) pattern, which seems to be pretty reliable, > and is pretty much entirely in the hands of the author of the > behavior (barring a misanthrope who decides to remove your > processed classes). ...which equally cannot solve your trivial zebra-striping table row example. Once your table :is(.processed), your behavior can't (shouldn't) process it again. sun From recidive at gmail.com Fri May 29 20:13:39 2009 From: recidive at gmail.com (Henrique Recidive) Date: Fri, 29 May 2009 17:13:39 -0300 Subject: [development] behaviors context In-Reply-To: <1243623817.7047.1317866581@webmail.messagingengine.com> References: <4A20216B.6080904@islandnet.com> <16b801c9e087$f69f6da0$0200a8c0@structworks.com> <70fbbb000905291114i6bc9fce8y67d02402a9284172@mail.gmail.com> <4A202D07.5070002@logrus.com> <1243623817.7047.1317866581@webmail.messagingengine.com> Message-ID: <841684fe0905291313t2773a29akd9e9b0451b3d0dda@mail.gmail.com> 2009/5/29 David Cohen : > So just to clarify, will the context always refer to a single element? > In other words should my code be: > > $elem = $(context).get(0); > do_my_behavior($elem); > > or, more like: > > $(context).each(function () { > ?$elem = $(this).get(0); > ?do_my_behavior($elem); > }); It should be more like this: Drupal.behaviors.myBehavior = function(context) { $(context).each(function () { // 'this' is a DOM Element. do_my_behavior(this); }); }; or you can include your selector and use context as it is supposed to be used: Drupal.behaviors.myBehavior = function(context) { $('.my-behavior-class:not(.my-behavior-processed)', context).each(function () { // 'this' is a DOM Element. do_my_behavior(this); $(this).addClass('my-behavior-processed'); }); }; Henrique > > > And in the first invocation, when context == document, will > $(document).get(0) return the document? > > Thanks everyone for helping me understand. > > -Dave > > > On Fri, 29 May 2009 11:44 -0700, "Earl Miles" wrote: >> I totally disagree. It's either a jquery object or something you can >> easily make into a jquery object. Using $(context) should always work >> and you can get a DOM element using $(context).get(0). Ignoring context >> will lead to poor performance. > From matt at aleph-null.tv Fri May 29 20:30:29 2009 From: matt at aleph-null.tv (Matt) Date: Fri, 29 May 2009 15:30:29 -0500 Subject: [development] behaviors context In-Reply-To: <16d801c9e097$fa5de1f0$0200a8c0@structworks.com> References: <70fbbb000905291234s4de92a1cu3df6413034051d6b@mail.gmail.com> <16d801c9e097$fa5de1f0$0200a8c0@structworks.com> Message-ID: <70fbbb000905291330j5115615am8a913b579510acf@mail.gmail.com> On Fri, May 29, 2009 at 2:59 PM, Daniel F. Kudwien wrote: > Now, you do the math: > > 10 ms * ~20+ behaviors = 200+ ms Actually, I was figuring 10ms for LOTS of behaviors. Not PER behavior. A selector should clearly take well under 10ms. Any additional overhead for a behavior is going to be the same regardless of whether you use context or selectors. >> There are two patterns in Drupal JS to "prevent" the same >> behavior from processing the same data twice. One is the >> :not(processed-X) pattern, which seems to be pretty reliable, >> and is pretty much entirely in the hands of the author of the >> behavior (barring a misanthrope who decides to remove your >> processed classes). > > ...which equally cannot solve your trivial zebra-striping table row example. > Once your table :is(.processed), your behavior can't (shouldn't) process it > again. Oh, come on... you wouldn't drop a zebra stripe processed class on the table, would you? You'd drop it on the row. And if you found rows in a table without striping, you'd re-process the entire table. The problem occurs only when you assume the context is passing sufficient information for your behavior. The context may in fact be providing less information than you need, and you are at the liberty of whatever called attachBehavior() in the first place (which may not be something in core -- there's no way to tell). Consequently, it's better to rely on the document itself, not just the context. Matt -- http://technosophos.com http://querypath.org