From jm at poure.com Tue Jul 1 06:49:05 2008 From: jm at poure.com (Jean-Michel =?ISO-8859-1?Q?Pour=E9?=) Date: Tue, 01 Jul 2008 08:49:05 +0200 Subject: [development] Drupal could be 10x times faster with correct indexing (no flame war) In-Reply-To: <1486801252.191851214858121639.JavaMail.root@mail-2.01.com> References: <1486801252.191851214858121639.JavaMail.root@mail-2.01.com> Message-ID: <1214894945.5073.11.camel@debian> Le lundi 30 juin 2008 ? 15:35 -0500, David Timothy Strauss a ?crit : > My reply may have been overly blunt, but it's insulting to have > someone post to our development list promising a 10x performance boost > from methods we've clearly considered and implemented. Development > work and discussion surrounding database indexes is easy to find with > a quick search of Drupal.org. I don't want to start a flame war. First, I have to apoligize because it seems that some indexes are missing in my PostgreSQL schema, whereas indexes are set in the MySQL schema. There are some missing indexes, but very few. As proposed, I will try to submit patches. This will not change the overall performance by 10x. Secondly, my Apache installation lacked a maximum PostgreSQL pconnect number of connections. My fault, because I migrated recently and forgot to set a maximum number of pconnect. When using Drupal without cache, attackers were able to create a large number of database sockets, because Drupal runs multiple SQL commands. After 10 minutes my dedicated 3Gb RAM server was down and I was a little bit surprised. It seems that Drupal should always be installed with normal cache option. Otherwize, too many SQL commands are sent. Sometimes, I could notice that Drupal would send 5 times the same SELECT on user command. Third, I looked at the shouts module and discovered there was no indexing at all. The attackers only needed to call this module repetedly. A lot of modules use a SELECT to query a table and then explore each subsequent node sending a SELECT on each node. This is a clear overhead and can be used to attack a Drupal site. Looking at the Feeded, it seems to work this way too, except that it is correctly indexed. But this is the Drupal way to explore nodes I believe. I don't know if theses SELECTs can be replaced with LEFT JOINS. Fourth, sorry I didn't mean to attack Drupal developers. Drupal is far too important for me to annoy you. I will do my best to submit patches about the few SQL commands that need indexing. Forgot this silly 10x times faster title. Drupal could be much faster if using LEF JOINs and indexes when appropriate, but this would not be 10 times. Kind regards, Jean-Michel From kb at 2bits.com Tue Jul 1 07:11:03 2008 From: kb at 2bits.com (Khalid Baheyeldin) Date: Tue, 1 Jul 2008 03:11:03 -0400 Subject: [development] Drupal could be 10x times faster with correct indexing (no flame war) In-Reply-To: <1214894945.5073.11.camel@debian> References: <1486801252.191851214858121639.JavaMail.root@mail-2.01.com> <1214894945.5073.11.camel@debian> Message-ID: <4a9fdc630807010011q79cc6e47l170914fcbcf438c6@mail.gmail.com> On Tue, Jul 1, 2008 at 2:49 AM, Jean-Michel Pour? wrote: > Le lundi 30 juin 2008 ? 15:35 -0500, David Timothy Strauss a ?crit : > > My reply may have been overly blunt, but it's insulting to have > > someone post to our development list promising a 10x performance boost > > from methods we've clearly considered and implemented. Development > > work and discussion surrounding database indexes is easy to find with > > a quick search of Drupal.org. > > I don't want to start a flame war. > > First, I have to apoligize because it seems that some indexes are > missing in my PostgreSQL schema, whereas indexes are set in the MySQL > schema. There are some missing indexes, but very few. As proposed, I > will try to submit patches. Jean Michel PostgreSQL has a chronic problem in Drupal: lack of testers and maintainers who use it. We occasionally get someone who is willing to maintain the PostgreSQL for core and does so for a while, then disappears then the cycle starts again. In contrib modules, very few provide PostgreSQL support, for many reasons. So, if you want proper PostgreSQL support, then start testing and submitting patches, AND continue to do so in the long term, not just for a month or two. -- Khalid M. Baheyeldin 2bits.com, Inc. http://2bits.com Drupal optimization, development, customization and consulting. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080701/df3a8dce/attachment-0001.htm From jazepstein at gmail.com Tue Jul 1 07:31:12 2008 From: jazepstein at gmail.com (Jeremy Epstein) Date: Tue, 1 Jul 2008 17:31:12 +1000 Subject: [development] Drupal could be 10x times faster with correct indexing (no flame war) In-Reply-To: <1214894945.5073.11.camel@debian> References: <1486801252.191851214858121639.JavaMail.root@mail-2.01.com> <1214894945.5073.11.camel@debian> Message-ID: On Tue, Jul 1, 2008 at 4:49 PM, Jean-Michel Pour? wrote: > Third, I looked at the shouts module and discovered there was no > indexing at all. The attackers only needed to call this module > repetedly. A lot of modules use a SELECT to query a table and then > explore each subsequent node sending a SELECT on each node. This is a > clear overhead and can be used to attack a Drupal site. Looking at the > Feeded, it seems to work this way too, except that it is correctly > indexed. But this is the Drupal way to explore nodes I believe. I don't > know if theses SELECTs can be replaced with LEFT JOINS. Are you referring to the 'shout' module? The quality of code in contributed modules can vary. As a general rule, the code in contrib modules is of a significantly lower standard than the code in Drupal core. Before deploying a contrib module, or before using contrib code as the foundation for your own custom code, you should review the module's issue queue, its CVS commit history, and its release status. The 'shout' module isn't even on drupal.org, and it appears that it hasn't been maintained for over 18 months. You are using such module at your own risk. You have absolutely no reason to expect to find well-constructed SQL statements in such a module. This is not the place to complain about crusty, unmaintained, random old modules. 'Feeded'? Can't find it. Perhaps you mean ? If so, this doesn't seem to be actively maintained, either. Modules like this are hardly ideal candidates to use when whinging about Drupal. Please whinge about core, or not at all. Cheers, Jaza. From jm at poure.com Tue Jul 1 09:07:41 2008 From: jm at poure.com (Jean-Michel =?ISO-8859-1?Q?Pour=E9?=) Date: Tue, 01 Jul 2008 11:07:41 +0200 Subject: [development] Drupal could be 10x times faster with correct indexing (no flame war) In-Reply-To: <4a9fdc630807010011q79cc6e47l170914fcbcf438c6@mail.gmail.com> References: <1486801252.191851214858121639.JavaMail.root@mail-2.01.com> <1214894945.5073.11.camel@debian> <4a9fdc630807010011q79cc6e47l170914fcbcf438c6@mail.gmail.com> Message-ID: <1214903261.7683.5.camel@debian> Le mardi 01 juillet 2008 ? 03:11 -0400, Khalid Baheyeldin a ?crit : > So, if you want proper PostgreSQL support, then start testing and > submitting > patches, AND continue to do so in the long term, not just for a month > or two. I will try, as Drupal is a crutial issue for our community. Kind regards, JMP From catch56 at googlemail.com Tue Jul 1 09:16:04 2008 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Tue, 1 Jul 2008 10:16:04 +0100 Subject: [development] Drupal could be 10x times faster with correct indexing (no flame war) In-Reply-To: <1214903261.7683.5.camel@debian> References: <1486801252.191851214858121639.JavaMail.root@mail-2.01.com> <1214894945.5073.11.camel@debian> <4a9fdc630807010011q79cc6e47l170914fcbcf438c6@mail.gmail.com> <1214903261.7683.5.camel@debian> Message-ID: On Tue, Jul 1, 2008 at 10:07 AM, Jean-Michel Pour? wrote: > Le mardi 01 juillet 2008 ? 03:11 -0400, Khalid Baheyeldin a ?crit : > > So, if you want proper PostgreSQL support, then start testing and > > submitting > > patches, AND continue to do so in the long term, not just for a month > > or two. > > I will try, as Drupal is a crutial issue for our community. > Kind regards, JMP > > If you're looking for somewhere to get stuck in, we maintain a list of issues needing review on PostgreSQL here: http://groups.drupal.org/node/6980 It's by no means complete, but a good place to start. Nat -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080701/65b656af/attachment.htm From matt at cabinetuk.com Tue Jul 1 09:41:46 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Tue, 1 Jul 2008 10:41:46 +0100 Subject: [development] upload module or maybe url() bug In-Reply-To: <1562326950.220141214865684830.JavaMail.root@mail-2.01.com> References: <1562326950.220141214865684830.JavaMail.root@mail-2.01.com> Message-ID: <9A7D78CE-5BEE-436C-88CC-FE6ECE3B446F@cabinetuk.com> David - thanks for bringing this back to my attention. It seems that my fix of including a urlencode() call in file_create_url() from '/includes/files.inc' only works when clean urls is ON. the original code works correctly when clean_urls is OFF. I can see now that the offending code is in the function "drupal_urlencode()". When clean urls is ON certain items need to be double escaped, and the "+" was not one of them when it should have been. I can see two solutions: 1: return str_replace(array('%2F', '%26', '%23', '//', '%2B'), array('/', '%2526', '%2523', '/%252F', '%252B'), rawurlencode($text)); 2: return str_replace(array('%2F', '%', '//'), array('/', '%25', '/%252F'), rawurlencode($text)); Both work for my test files, but (2) seems a bit more generic in that anything with a '%' will be double escaped, except for %2F which is replaced out first as '/'. I vote for #2. anyone else have a preference? -Matt On 30/06/2008, at 11:41 PM, David Timothy Strauss wrote: > We should already be escaping the plus signs: > > http://drupal.org/node/191116#comment-627128 > > ----- "David Timothy Strauss" wrote: > >> I'd try an extra step to encode "+" characters in your URLs. I would >> support adding such a feature to Drupal's url() if it makes the >> encoding less ambiguous. >> >> ----- "Matt Connolly" wrote: >> >>> The + in the file name is being translated into a space and the file >>> >>> download does not work because the file is not found. >>> >>> When I change the code, as I have, by including a url_encode >> function >>> >>> on the filename, it all works perfectly. >>> >>> My question really is: should this be specifically for the file >>> download - like how I have patched my drupal installation, or is it >>> better served in the url() function if this would also solve other >>> urls in the site (page names, etc) >>> >>> -Matt >>> >>> On 30/06/2008, at 9:16 PM, David Timothy Strauss wrote: >>> >>>> See this issue: >>>> http://drupal.org/node/191116 >>>> >>>> Translating spaces to "+" is not RFC-compliant. For maximum >>>> compatibility, you should encode both spaces and plus signs using >> % >>> >>>> notation. >>>> >>>> ----- "Matt Connolly" wrote: >>>> >>>>> I have a question about url encoding >>>>> >>>>> Spaces in URLS are normally translated to "%20" and spaces in >>> queries >>>>> >>>>> are normally translated into "+", although the "%20" is correctly >>>>> decoded. >>>>> >>>>> I'm discovering that private file uploads are not working when >>> there >>>>> >>>>> is a "+" in the file name. This is being translated into a " >>>>> " (space) >>>>> >>>>> which is quite normal for queries. >>>>> >>>>> With public downloads, (ie accessibly directly via >>>>> http://mydrupalsite/sites/files/fred+wilma.jpg >>>>> " the file works. So apache doesn't translate the + in the file's >>> >>>>> path >>>>> >>>>> name into a space, and the file is downloaded. >>>>> >>>>> With private downloads, the file name is placed into a query, >>> thanks >>>>> >>>>> to mod_rewrite (or, becomes >>>>> http://mydrupalsite/q?=system/files/fred+wilma.jpg >>>>> " . You can see where the problem is. >>>>> >>>>> >>>>> I can easily fix this by altering the "file_create_url" function >> in >>> >>>>> "/ >>>>> >>>>> includes/file.inc". I know I've been warned to not change >> drupal's >>>>> core modules and code, but ..... I think I need to. >>>>> >>>>> However, I wonder if the problem would be better handled in the >>>>> "url()" function? >>>>> >>>>> I notice that if you create page url's "bananas+pears" and >> "apples >>> >>>>> and >>>>> >>>>> oranges" the urls are all encoded with %20. So it seems you can't >>> use >>>>> >>>>> the "+" in a custom URL. Butt least here what you type and what >>> you >>>>> get are consistent. >>>>> >>>>> >>>>> Any thoughts? >>>>> -Matt From larry at garfieldtech.com Tue Jul 1 14:57:32 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Tue, 1 Jul 2008 9:57:32 -0500 Subject: [development] Drupal could be 10x times faster with correctindexing (no flame war) In-Reply-To: References: Message-ID: On Tue, 1 Jul 2008 10:16:04 +0100, "Nathaniel Catchpole" wrote: > On Tue, Jul 1, 2008 at 10:07 AM, Jean-Michel Pour? wrote: > >> Le mardi 01 juillet 2008 ? 03:11 -0400, Khalid Baheyeldin a ?crit : >> > So, if you want proper PostgreSQL support, then start testing and >> > submitting >> > patches, AND continue to do so in the long term, not just for a month >> > or two. >> >> I will try, as Drupal is a crutial issue for our community. >> Kind regards, JMP >> >> If you're looking for somewhere to get stuck in, we maintain a list of > issues needing review on PostgreSQL here: > http://groups.drupal.org/node/6980 > > It's by no means complete, but a good place to start. > > Nat And please note the very first item on that list. The new Database API layer is designed to make supporting multiple databases easier, but right now it's stalled on lack of people who can help test the Postgres driver. If you know Postgres and PDO, we need your help to carry this thing home! --Larry Garfield From danithaca at gmail.com Wed Jul 2 02:36:58 2008 From: danithaca at gmail.com (Daniel Xiaodan Zhou) Date: Tue, 1 Jul 2008 22:36:58 -0400 Subject: [development] code review for the "pivots" project In-Reply-To: References: Message-ID: We use module title together with the word "module" to find related discussions on a module page. Take the "image" module for example, all forum posts that have the text string "image module" would be considered as a match. But it has another problem. People sometimes refer to a module using an alias (eg.cck) rather than the exact module title plus the word "module" (eg. content construction kit module). To fix that problem, we manually add links between modules and their commonly used aliases so that the algorithm can spot the right match. So, for those modules that we should have (but didn't have) added an alias, the "related discussions" doesn't display as many links as it should. The problem is fixed (we hope) when we add the aliases, In short, every recommendation algorithm has its own pros and cons. We hope to launch this project as one of the approaches to make module recommendations to DO users. And we'll continue to improve the algorithm based on feedbacks. Thanks. Daniel On Sat, Jun 28, 2008 at 12:11 AM, Nancy Wichmann wrote: > Daniel Xiaodan Zhou wrote: > > > We are working on the "pivots" project as an attempt to give module > recommendations. The idea is to > > > display on a module page the related forum conversations and related > modules that are referenced in > > > the same conversations. > > > > I looked at a couple of my modules. The "recent discussions" didn't even > reference my modules. It is unlikely the "referenced modules" really have > any significance either. This could be damaging in the eyes of those who > fail to research, which seems to be the vast majority of DO users. > > > > Please do NOT open it up to the general public in the condition it's in > now. > > > No virus found in this outgoing message. > Checked by AVG. > Version: 8.0.100 / Virus Database: 270.4.1/1519 - Release Date: 6/25/2008 > 4:13 PM > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080701/6f44111a/attachment-0001.htm From david at fourkitchens.com Wed Jul 2 03:14:02 2008 From: david at fourkitchens.com (David Timothy Strauss) Date: Tue, 1 Jul 2008 22:14:02 -0500 (CDT) Subject: [development] Drupal could be 10x times faster with correct indexing (no flame war) In-Reply-To: <1214903261.7683.5.camel@debian> Message-ID: <201616542.56221214968442035.JavaMail.root@mail-2.01.com> ----- "Jean-Michel Pour?" wrote: > Le mardi 01 juillet 2008 ? 03:11 -0400, Khalid Baheyeldin a ?crit : > > So, if you want proper PostgreSQL support, then start testing and > > submitting > > patches, AND continue to do so in the long term, not just for a > month > > or two. > > I will try, as Drupal is a crutial issue for our community. > Kind regards, JMP I'm glad to hear that you're interested in improving PostgreSQL support in Drupal. Help from people like you is necessary to keep PostgreSQL support healthy. From drupal.beginner at wechange.org Wed Jul 2 09:16:00 2008 From: drupal.beginner at wechange.org (augustin (beginner)) Date: Wed, 2 Jul 2008 17:16:00 +0800 Subject: [development] breadcrumb override problem In-Reply-To: <48676079.4060204@webchick.net> References: <200806291628.46946.drupal.beginner@wechange.org> <48676079.4060204@webchick.net> Message-ID: <200807021716.01122.drupal.beginner@wechange.org> On Sunday 29 June 2008 18:14:17 Angela Byron wrote: > Augustin (Beginner) wrote: > > 1) how should I solve my particular problem (the timing of > > drupal_set_breadcrumb() in my module to override/enhance taxonomy's > > breadcrumbs). > > Maybe override the $breadcrumb variable from your module using a > preprocess hook? See http://drupal.org/node/173880 for more info. > > If the new theme system in D6 doesn't provide enough flexibility, > possibly. It's pretty awesome, though. Using the theming system can be a temporary solution. I'll try that for a while. But using theming to override content is contrary to the guidelines, so we still need a long term solution. I follow up more on the issue. http://drupal.org/node/150854 A. From drupal.beginner at wechange.org Wed Jul 2 10:18:55 2008 From: drupal.beginner at wechange.org (augustin (beginner)) Date: Wed, 2 Jul 2008 18:18:55 +0800 Subject: [development] no date / time types in schema API Message-ID: <200807021818.56356.drupal.beginner@wechange.org> Hi, http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types All (but one) SQL dialects have a date type. However, Drupal's Schema API does not seem to have a type for date only: http://drupal.org/node/159605 It causes schema.module to complain: no type for Schema type date:normal. I am concerned that with the new Schema API, my modules may not install properly anymore. (how can it install a table where a column has an unsupported type?) Is this a purposeful omission? I just found this issue: http://drupal.org/node/200953 so others noticed, too :) How are you all coping with the lack of time/date data type? What workarounds do you use? I could use the data type datetime, but then I have to worry about truncating the time part which I do not need. I use substr() to truncate the part I don't want, but coder.module complains about it (says I should use drupal_substr() while substr() is quicker and safe in this case). There is probably a better way to truncate the time part (please say), but it feels a shame to have to deal with the extraneous time part when Schema API could easily handle date types. Blessings, Augustin. From gerhard at killesreiter.de Wed Jul 2 10:47:48 2008 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Wed, 02 Jul 2008 12:47:48 +0200 Subject: [development] no date / time types in schema API In-Reply-To: <200807021818.56356.drupal.beginner@wechange.org> References: <200807021818.56356.drupal.beginner@wechange.org> Message-ID: <486B5CD4.60307@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 augustin (beginner) schrieb: > http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types > All (but one) SQL dialects have a date type. > However, Drupal's Schema API does not seem to have a type for date > only: http://drupal.org/node/159605 > > It causes schema.module to complain: no type for Schema type > date:normal. I am concerned that with the new Schema API, my > modules may not install properly anymore. (how can it install a > table where a column has an unsupported type?) Just do a normal db_query. I've had to do that for event.module since it needs a time type. > Is this a purposeful omission? IIRC it was decided that "nobody needs it" or "it is too complicated because of pgsql". IMO it's a bug. > How are you all coping with the lack of time/date data type? What > workarounds do you use? See event.install. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIa1zUfg6TFvELooQRAhiGAKDD+LFNzxsHswjASEioEMahb6NElgCfX8yM qaPIvws5zCsr64hPl7sz/tE= =vmeQ -----END PGP SIGNATURE----- From damz at prealable.org Wed Jul 2 10:36:15 2008 From: damz at prealable.org (Damien) Date: Wed, 2 Jul 2008 12:36:15 +0200 Subject: [development] no date / time types in schema API In-Reply-To: <200807021818.56356.drupal.beginner@wechange.org> References: <200807021818.56356.drupal.beginner@wechange.org> Message-ID: On Wed, Jul 2, 2008 at 12:18 PM, augustin (beginner) < drupal.beginner at wechange.org> wrote: > > Hi, > > > http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types > All (but one) SQL dialects have a date type. > However, Drupal's Schema API does not seem to have a type for date only: > http://drupal.org/node/159605 > As I said in #252916 [1], I think DATE / TIME and DATETIME types are really things of the past. I understand how they could have been useful in the 80s and 90s, especially on text-based terminals (they are fixed-length!), but nowadays they are more a nuisance than anything. Database engines have their own implementation specificities: for example, the Oracle implementation expects the order of arguments to be locale dependant! A solution based on timestamps is much more elegant: timestamps need no (database-specific) parsing whatsoever (both on reading and writing to the database), they play nice with arithmetic (and thus do not need any helper functions), and are consistent with the implementation of most application, including Drupal. So let's drop the support for them completely in the Schema API. Core don't use them, please don't encourage contribution modules to. Damien Tournoud [1] http://drupal.org/node/252916 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080702/6c67e617/attachment.htm From drupal.beginner at wechange.org Wed Jul 2 10:59:15 2008 From: drupal.beginner at wechange.org (augustin (beginner)) Date: Wed, 2 Jul 2008 18:59:15 +0800 Subject: [development] no date / time types in schema API In-Reply-To: References: <200807021818.56356.drupal.beginner@wechange.org> Message-ID: <200807021859.15382.drupal.beginner@wechange.org> On Wednesday 02 July 2008 18:36:15 Damien wrote: > A solution based on timestamps is much more elegant: timestamps need no > (database-specific) parsing whatsoever (both on reading and writing to the > database), they play nice with arithmetic (and thus do not need any helper > functions), and are consistent with the implementation of most application, > including Drupal. How do you use a timestamp when you need the date 18 Aug 1908 on a date field??? Augustin. From mistknight at gmail.com Wed Jul 2 11:04:46 2008 From: mistknight at gmail.com (Ashraf Amayreh) Date: Wed, 2 Jul 2008 14:04:46 +0300 Subject: [development] no date / time types in schema API In-Reply-To: <200807021859.15382.drupal.beginner@wechange.org> References: <200807021818.56356.drupal.beginner@wechange.org> <200807021859.15382.drupal.beginner@wechange.org> Message-ID: Maybe what you want is strtotime? http://www.php.net/manual/en/function.strtotime.php On Wed, Jul 2, 2008 at 1:59 PM, augustin (beginner) < drupal.beginner at wechange.org> wrote: > On Wednesday 02 July 2008 18:36:15 Damien wrote: > > A solution based on timestamps is much more elegant: timestamps need no > > (database-specific) parsing whatsoever (both on reading and writing to > the > > database), they play nice with arithmetic (and thus do not need any > helper > > functions), and are consistent with the implementation of most > application, > > including Drupal. > > How do you use a timestamp when you need the date 18 Aug 1908 on a date > field??? > > Augustin. > > > -- Ashraf Amayreh http://blogs.aamayreh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080702/229381c5/attachment.htm From gerhard at killesreiter.de Wed Jul 2 11:15:40 2008 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Wed, 02 Jul 2008 13:15:40 +0200 Subject: [development] no date / time types in schema API In-Reply-To: References: <200807021818.56356.drupal.beginner@wechange.org> Message-ID: <486B635C.7020508@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Damien schrieb: > On Wed, Jul 2, 2008 at 12:18 PM, augustin (beginner) < > drupal.beginner at wechange.org> wrote: > >> Hi, >> >> >> http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types >> All (but one) SQL dialects have a date type. >> However, Drupal's Schema API does not seem to have a type for date only: >> http://drupal.org/node/159605 >> > > As I said in #252916 [1], I think DATE / TIME and DATETIME types are > really things of the past. I understand how they could have been > useful in the 80s and 90s, especially on text-based terminals (they > are fixed-length!), but nowadays they are more a nuisance than > anything. Database engines have their own implementation > specificities: for example, the Oracle implementation expects the > order of arguments to be locale dependant! > > A solution based on timestamps is much more elegant: timestamps need > no (database-specific) parsing whatsoever (both on reading and > writing to the database), they play nice with arithmetic (and thus You obviously have never dealt with timestamps for dates... They are a most royal PITA, especially when dealing with timezones and DST. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIa2Ncfg6TFvELooQRAvauAJ9Wgb09MJsXkeatskNmhVw3996yNgCgp1Ws 635A/W2d3MssqbWMyfxRiEA= =jxJz -----END PGP SIGNATURE----- From drupal.beginner at wechange.org Wed Jul 2 11:19:56 2008 From: drupal.beginner at wechange.org (augustin (beginner)) Date: Wed, 2 Jul 2008 19:19:56 +0800 Subject: [development] no date / time types in schema API In-Reply-To: References: <200807021818.56356.drupal.beginner@wechange.org> <200807021859.15382.drupal.beginner@wechange.org> Message-ID: <200807021919.56548.drupal.beginner@wechange.org> On Wednesday 02 July 2008 19:04:46 Ashraf Amayreh wrote: > Maybe what you want is strtotime? Errr, no, it doesn't work. Read again the date I provided. But thanks. I didn't know this function and it might prove useful one day. Thanks to Gerhard for his reply. I just upgraded a big module to schema API, but I will have to revert about half back and use db_query() instead, as he recommends. I have absolutely no clue how the database layer, the next generation (http://drupal.org/node/225450 ) will affect this issue. Meanwhile, a database is supposed to store data. It's a bug to limit the kind of data that a database can store, and use php to manipulate that data every which way. To say that nobody needs it is a bit presumptuous. The role of Drupal core is to empower module maintainer to use their creativity to code module for every possible need. You cannot use a timestamp to store dates before or after the UNIX period. You cannot use datetime to store a duration, or the time of a recurring meeting. The 'date' or the 'time' data type are perfectly suited for certain special applications but this bug forces us to dance around the imposed limitation and use php to manipulate the data when the proper data could be directly stored instead. In short, I do agree it's a bug. Augustin. From karen at elderweb.com Wed Jul 2 12:47:50 2008 From: karen at elderweb.com (Karen Stevenson) Date: Wed, 2 Jul 2008 05:47:50 -0700 (PDT) Subject: [development] no date / time types in schema API Message-ID: <268948.4759.qm@web65614.mail.ac4.yahoo.com> >> A solution based on timestamps is much more elegant: timestamps need >> no (database-specific) parsing whatsoever (both on reading and >> writing to the database), they play nice with arithmetic (and thus > >You obviously have never dealt with timestamps for dates... > >They are a most royal PITA, especially when dealing with timezones and >DST. Couldn't have said it better myself. The two people on this list who have probably spent more time than anyone else in Drupal trying to do things like proper timezone conversions on timestamps are in complete agreement that timestamps are a PITA. They also don't work at all well for historical dates, nor for incomplete dates -- years and months with unspecified days or dates without times. They imply a level of precision to the second when that may not be at all true. They have no knowledge of timezones nor any way of dealing with timezones. When you store a date in a database's native datetime format, the database can do timezone adjustments on the value, format the date values, and extract things like a month or year out of the date. If you store the date in a timestamp and need to do any of those things, you first have to come back and cast the timestamp as a datetime field, which is neither simple nor elegant, and works differently (and sometimes badly) in different databases. Dates are complicated beasts. Treating them as timestamps doesn't solve the problems, it just creates different ones. I'm looking forward to getting them out of Drupal core. Karen From mail at webthatworks.it Wed Jul 2 12:52:28 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 2 Jul 2008 14:52:28 +0200 Subject: [development] no date / time types in schema API In-Reply-To: References: <200807021818.56356.drupal.beginner@wechange.org> Message-ID: <20080702145228.28256387@dawn.webthatworks.it> On Wed, 2 Jul 2008 12:36:15 +0200 Damien wrote: > On Wed, Jul 2, 2008 at 12:18 PM, augustin (beginner) < > drupal.beginner at wechange.org> wrote: > > http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types > > All (but one) SQL dialects have a date type. > > However, Drupal's Schema API does not seem to have a type for > > date only: http://drupal.org/node/159605 > As I said in #252916 [1], I think DATE / TIME and DATETIME types > are really things of the past. I understand how they could have > been useful in the 80s and 90s, especially on text-based terminals > (they are fixed-length!), but nowadays they are more a nuisance > than anything. Database engines have their own implementation Most decent DB let you modify the default format or pass specific parameters to adjust the input/output format and php handles formats pretty well too. If altering the default date format is not an option, it shouldn't be since none of the DB I know force you to set it on an instance basis, conversion can be made at substitution time in db_query or inside a new wrapper that will support prepared statements. PHP 5 has a DateTime object that seems to support timezones pretty well. > specificities: for example, the Oracle implementation expects the > order of arguments to be locale dependant! locale is a pretty complicated subject. It would be nice if it was thread-safe in php: http://it.php.net/setlocale The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server api like IIS or Apache on Windows you may experience sudden changes of locale settings while a script is running although the script itself never called setlocale() itself. This happens due to other scripts running in different threads of the same process at the same time changing the processwide locale using setlocale(). Having a thread-safe locale would solve a lot of problems for i18n since implementing a reasonably complete and flexible data localisation is complicated and resource hungry in php. But that doesn't look as an Oracle DB problem since you can alter the default date/time format at many levels (DB instance, connection, statement). PostgreSQL can do the same with "set datestyle" or DB wide with postmaster -e. I forgot how to achieve this with MS SQL, but it can be done. I bet someone more versed than me with MySQL know the cetacean equivalent. > A solution based on timestamps is much more elegant: timestamps > need no (database-specific) parsing whatsoever (both on reading > and writing to the database), they play nice with arithmetic (and > thus do not need any helper functions), and are consistent with > the implementation of most application, including Drupal. timestamps don't have even a rough idea about what a calendar or a timezone are. Most reasonable DB have it and this knowledge can be exploited to large extents without the need to re-implement it in php or force php to work as if it was sql and/or moving unnecessarily data around. eg. filter all events happening on Sunday between 11:00am and 1:00pm GMT or local time. Considering timestamps and dates interchangeable is risky at least. augustin, I hope this can help even if it just move the problem elsewhere: most DB also support a form of extract (that "surprisingly" is part of SQL standard). http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html http://www.postgresql.org/docs/8.1/static/functions-datetime.html -- Ivan Sergio Borgonovo http://www.webthatworks.it From pwolanin at gmail.com Wed Jul 2 13:12:35 2008 From: pwolanin at gmail.com (Peter Wolanin) Date: Wed, 2 Jul 2008 09:12:35 -0400 Subject: [development] breadcrumb override problem In-Reply-To: <200807021716.01122.drupal.beginner@wechange.org> References: <200806291628.46946.drupal.beginner@wechange.org> <48676079.4060204@webchick.net> <200807021716.01122.drupal.beginner@wechange.org> Message-ID: <2247a8a70807020612n18f2429bn511724df50da3f62@mail.gmail.com> Anyone who is interested, and wants to weigh-in on a patch whether this needs a bug fix: http://drupal.org/node/73834 -Peter On Wed, Jul 2, 2008 at 5:16 AM, augustin (beginner) wrote: > On Sunday 29 June 2008 18:14:17 Angela Byron wrote: >> Augustin (Beginner) wrote: >> > 1) how should I solve my particular problem (the timing of >> > drupal_set_breadcrumb() in my module to override/enhance taxonomy's >> > breadcrumbs). >> >> Maybe override the $breadcrumb variable from your module using a >> preprocess hook? See http://drupal.org/node/173880 for more info. >> >> If the new theme system in D6 doesn't provide enough flexibility, >> possibly. It's pretty awesome, though. > > > Using the theming system can be a temporary solution. I'll try that for a > while. > But using theming to override content is contrary to the guidelines, so we > still need a long term solution. > > > I follow up more on the issue. > http://drupal.org/node/150854 > > A. > From david at fourkitchens.com Wed Jul 2 14:07:27 2008 From: david at fourkitchens.com (David Strauss) Date: Wed, 2 Jul 2008 14:07:27 +0000 Subject: [development] no date / time types in schema API In-Reply-To: <20080702145228.28256387@dawn.webthatworks.it> References: <200807021818.56356.drupal.beginner@wechange.org><20080702145228.28256387@dawn.webthatworks.it> Message-ID: <970088000-1215007651-cardhu_decombobulator_blackberry.rim.net-58287325-@bxe027.bisx.prod.on.blackberry> A timezone should not be stored within the same field as a time. It should be stored separately and used to calculate local times, as necessary. The entire idea of storing a timestamp as a local time alongside its timezone is bad on so many levels. Oh, and good luck dealing with your DB server sometimes having a different timezone than your web server. -----Original Message----- From: Ivan Sergio Borgonovo Date: Wed, 2 Jul 2008 14:52:28 To: Subject: Re: [development] no date / time types in schema API On Wed, 2 Jul 2008 12:36:15 +0200 Damien wrote: > On Wed, Jul 2, 2008 at 12:18 PM, augustin (beginner) < > drupal.beginner at wechange.org> wrote: > > http://en.wikibooks.org/wiki/SQL_dialects_reference/Data_structure_definition/Data_types/Date_and_time_types > > All (but one) SQL dialects have a date type. > > However, Drupal's Schema API does not seem to have a type for > > date only: http://drupal.org/node/159605 > As I said in #252916 [1], I think DATE / TIME and DATETIME types > are really things of the past. I understand how they could have > been useful in the 80s and 90s, especially on text-based terminals > (they are fixed-length!), but nowadays they are more a nuisance > than anything. Database engines have their own implementation Most decent DB let you modify the default format or pass specific parameters to adjust the input/output format and php handles formats pretty well too. If altering the default date format is not an option, it shouldn't be since none of the DB I know force you to set it on an instance basis, conversion can be made at substitution time in db_query or inside a new wrapper that will support prepared statements. PHP 5 has a DateTime object that seems to support timezones pretty well. > specificities: for example, the Oracle implementation expects the > order of arguments to be locale dependant! locale is a pretty complicated subject. It would be nice if it was thread-safe in php: http://it.php.net/setlocale The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server api like IIS or Apache on Windows you may experience sudden changes of locale settings while a script is running although the script itself never called setlocale() itself. This happens due to other scripts running in different threads of the same process at the same time changing the processwide locale using setlocale(). Having a thread-safe locale would solve a lot of problems for i18n since implementing a reasonably complete and flexible data localisation is complicated and resource hungry in php. But that doesn't look as an Oracle DB problem since you can alter the default date/time format at many levels (DB instance, connection, statement). PostgreSQL can do the same with "set datestyle" or DB wide with postmaster -e. I forgot how to achieve this with MS SQL, but it can be done. I bet someone more versed than me with MySQL know the cetacean equivalent. > A solution based on timestamps is much more elegant: timestamps > need no (database-specific) parsing whatsoever (both on reading > and writing to the database), they play nice with arithmetic (and > thus do not need any helper functions), and are consistent with > the implementation of most application, including Drupal. timestamps don't have even a rough idea about what a calendar or a timezone are. Most reasonable DB have it and this knowledge can be exploited to large extents without the need to re-implement it in php or force php to work as if it was sql and/or moving unnecessarily data around. eg. filter all events happening on Sunday between 11:00am and 1:00pm GMT or local time. Considering timestamps and dates interchangeable is risky at least. augustin, I hope this can help even if it just move the problem elsewhere: most DB also support a form of extract (that "surprisingly" is part of SQL standard). http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html http://www.postgresql.org/docs/8.1/static/functions-datetime.html -- Ivan Sergio Borgonovo http://www.webthatworks.it From jhedstrom at opensourcery.com Wed Jul 2 14:53:31 2008 From: jhedstrom at opensourcery.com (Jonathan Hedstrom) Date: Wed, 02 Jul 2008 07:53:31 -0700 Subject: [development] no date / time types in schema API In-Reply-To: <200807021859.15382.drupal.beginner@wechange.org> References: <200807021818.56356.drupal.beginner@wechange.org> <200807021859.15382.drupal.beginner@wechange.org> Message-ID: <486B966B.7010808@opensourcery.com> augustin (beginner) wrote: > On Wednesday 02 July 2008 18:36:15 Damien wrote: > >> A solution based on timestamps is much more elegant: timestamps need no >> (database-specific) parsing whatsoever (both on reading and writing to the >> database), they play nice with arithmetic (and thus do not need any helper >> functions), and are consistent with the implementation of most application, >> including Drupal. >> > > How do you use a timestamp when you need the date 18 Aug 1908 on a date > field??? > > Augustin. > > Just to clarify, there is a significant difference between most DB implementations of a timestamp [1,2] and a unix timestamp [3]. 1. http://dev.mysql.com/doc/refman/5.0/en/timestamp.html 2. http://www.postgresql.org/docs/8.3/static/datatype-datetime.html 3. http://us3.php.net/manual/en/function.time.php -- Jonathan Hedstrom OpenSourcery http://opensourcery.com Technology for Good -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: OpenPGP digital signature Url : http://lists.drupal.org/pipermail/development/attachments/20080702/555981b9/attachment-0001.pgp From larry at garfieldtech.com Wed Jul 2 15:03:14 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Wed, 2 Jul 2008 10:03:14 -0500 Subject: [development] no date / time types in schema API In-Reply-To: <200807021919.56548.drupal.beginner@wechange.org> References: <200807021919.56548.drupal.beginner@wechange.org> Message-ID: <501ae504cc4870945efa8ff40e223384@localhost> On Wed, 2 Jul 2008 19:19:56 +0800, "augustin (beginner)" wrote: > On Wednesday 02 July 2008 19:04:46 Ashraf Amayreh wrote: >> Maybe what you want is strtotime? > > > Errr, no, it doesn't work. Read again the date I provided. > But thanks. I didn't know this function and it might prove useful one day. > > Thanks to Gerhard for his reply. I just upgraded a big module to schema > API, > but I will have to revert about half back and use db_query() instead, as > he > recommends. > > I have absolutely no clue how the database layer, the next generation > (http://drupal.org/node/225450 ) will affect this issue. In the short term, it won't. That patch does not do anything to Schema API at this point beyond move it into a class structure on the back-end for consistency. There are a lot of things that could and should happen to Schema API that are not going to until that patch lands because it's big enough already. :-) Right now the only remaining issues are chasing HEAD (every time the testing framework has an upgrade it breaks half my tests and I have to go in and refactor them) and Postgres recently starting to segfault on install. I simply don't have the Postgres knowledge to know how to fix that. If you do, *please* contact me. There's a dozen or more tasks that are blocked on us getting Postgres to work completely in the new codebase, and even with the code freeze pushed back time is short. If your skill set includes Postgres and PDO, you have just found your calling. :-) Early on I toyed with the idea of doing driver-specific field overrides. The concept was that you could pass, say, a PHP DateTime object in as a "value" and it would get formatted down to the proper format expected for a given database. That wouldn't help on read, though. I've tabled that for the time being as it requires a lot more thought and I refuse to put more thought into it until the current patch lands. Timestamps suck. "Native" date/time fields suck. Time/date handling in general just sucks. It's just a question of which form of suckage you want to have to deal with. --Larry Garfield From mail at webthatworks.it Wed Jul 2 15:09:04 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 2 Jul 2008 17:09:04 +0200 Subject: [development] no date / time types in schema API In-Reply-To: <970088000-1215007651-cardhu_decombobulator_blackberry.rim.net-58287325-@bxe027.bisx.prod.on.blackberry> References: <200807021818.56356.drupal.beginner@wechange.org> <20080702145228.28256387@dawn.webthatworks.it> <970088000-1215007651-cardhu_decombobulator_blackberry.rim.net-58287325-@bxe027.bisx.prod.on.blackberry> Message-ID: <20080702170904.3af12384@dawn.webthatworks.it> On Wed, 2 Jul 2008 14:07:27 +0000 "David Strauss" wrote: > A timezone should not be stored within the same field as a time. > It should be stored separately and used to calculate local times, > as necessary. > The entire idea of storing a timestamp as a local time alongside > its timezone is bad on so many levels. You're not forced to store dates with tz but having a data type that understand tz and support tz operations inside the DB is pretty helpful. Again... suppose you store datetime in GMT and you want to know who had a beer before 1:00am local time maybe during a DTS change [evil grin]? a tz is not an integer. You can't compute the interval on the PHP side and you don't want to return all the times and filter on the PHP side either. Anyway tz support across different DB looks much harder to handle than different date format since the "interface" is much more heterogeneous. > Oh, and good luck dealing with your DB server sometimes having a > different timezone than your web server. That's life. Anyway MySQL as well as PostgreSQL provide nifty settings to cope with the problem. -- Ivan Sergio Borgonovo http://www.webthatworks.it From david at fourkitchens.com Wed Jul 2 15:21:29 2008 From: david at fourkitchens.com (David Timothy Strauss) Date: Wed, 2 Jul 2008 10:21:29 -0500 (CDT) Subject: [development] no date / time types in schema API In-Reply-To: <20080702170904.3af12384@dawn.webthatworks.it> Message-ID: <1878997695.107461215012089679.JavaMail.root@mail-2.01.com> ----- "Ivan Sergio Borgonovo" wrote: > You're not forced to store dates with tz but having a data type that > understand tz and support tz operations inside the DB is pretty > helpful. > > Again... suppose you store datetime in GMT and you want to know who > had a beer before 1:00am local time maybe during a DTS change [evil > grin]? > a tz is not an integer. You can't compute the interval on the PHP > side and you don't want to return all the times and filter on the PHP > side either. I have never written an application that needed to answer a time question based on the local time for all rows. Your proposal of using date/time columns in the database doesn't fix it, either. You can't query based on "local time" even if MySQL knows all the timezone data. > Anyway tz support across different DB looks much harder to handle > than different date format since the "interface" is much more > heterogeneous. That is also a problem. > > Oh, and good luck dealing with your DB server sometimes having a > > different timezone than your web server. > > That's life. Anyway MySQL as well as PostgreSQL provide nifty > settings to cope with the problem. Why cope when you can avoid the problem entirely? From david at fourkitchens.com Wed Jul 2 15:26:35 2008 From: david at fourkitchens.com (David Timothy Strauss) Date: Wed, 2 Jul 2008 10:26:35 -0500 (CDT) Subject: [development] no date / time types in schema API In-Reply-To: <268948.4759.qm@web65614.mail.ac4.yahoo.com> Message-ID: <1328600003.108671215012395863.JavaMail.root@mail-2.01.com> ----- "Karen Stevenson" wrote: > >> A solution based on timestamps is much more elegant: timestamps > need > >> no (database-specific) parsing whatsoever (both on reading and > >> writing to the database), they play nice with arithmetic (and thus > > > >You obviously have never dealt with timestamps for dates... > > > >They are a most royal PITA, especially when dealing with timezones > and > >DST. > > Couldn't have said it better myself. The two people on this list who > have probably spent more time than anyone else in Drupal trying to do > things like proper timezone conversions on timestamps are in complete > agreement that timestamps are a PITA. Add me to that list. Dealing with global fundraising data for Wikimedia and global subscription systems for Stratfor has taught me that knowing with 100% confidence that values in the DB are UNIX timestamps makes applications work. Most timezone operations belong in the view/theme layer and maybe on forms. From david at fourkitchens.com Wed Jul 2 15:27:40 2008 From: david at fourkitchens.com (David Timothy Strauss) Date: Wed, 2 Jul 2008 10:27:40 -0500 (CDT) Subject: [development] no date / time types in schema API In-Reply-To: <200807021859.15382.drupal.beginner@wechange.org> Message-ID: <488373178.108861215012460404.JavaMail.root@mail-2.01.com> ----- "augustin (beginner)" wrote: > On Wednesday 02 July 2008 18:36:15 Damien wrote: > > A solution based on timestamps is much more elegant: timestamps need > no > > (database-specific) parsing whatsoever (both on reading and writing > to the > > database), they play nice with arithmetic (and thus do not need any > helper > > functions), and are consistent with the implementation of most > application, > > including Drupal. > > How do you use a timestamp when you need the date 18 Aug 1908 on a > date > field??? You use the UNIX timestamp at 00:00 UTC that day. From david at fourkitchens.com Wed Jul 2 15:29:06 2008 From: david at fourkitchens.com (David Timothy Strauss) Date: Wed, 2 Jul 2008 10:29:06 -0500 (CDT) Subject: [development] no date / time types in schema API In-Reply-To: Message-ID: <757243920.109271215012546784.JavaMail.root@mail-2.01.com> No, gmmktime() is a better choice. ----- "Ashraf Amayreh" wrote: > Maybe what you want is strtotime? > > http://www.php.net/manual/en/function.strtotime.php > > On Wed, Jul 2, 2008 at 1:59 PM, augustin (beginner) < drupal.beginner at wechange.org > wrote: > On Wednesday 02 July 2008 18:36:15 Damien wrote: > > A solution based on timestamps is much more elegant: timestamps need no > > (database-specific) parsing whatsoever (both on reading and writing to the > > database), they play nice with arithmetic (and thus do not need any helper > > functions), and are consistent with the implementation of most application, > > including Drupal. > > How do you use a timestamp when you need the date 18 Aug 1908 on a date > field??? > > Augustin. > > > > > -- > Ashraf Amayreh > http://blogs.aamayreh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080702/fe6af445/attachment.htm From darrel.opry at gmail.com Wed Jul 2 16:08:31 2008 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Wed, 2 Jul 2008 12:08:31 -0400 Subject: [development] no date / time types in schema API In-Reply-To: <268948.4759.qm@web65614.mail.ac4.yahoo.com> References: <268948.4759.qm@web65614.mail.ac4.yahoo.com> Message-ID: On Wed, Jul 2, 2008 at 8:47 AM, Karen Stevenson wrote: > > >> A solution based on timestamps is much more elegant: timestamps need > >> no (database-specific) parsing whatsoever (both on reading and > >> writing to the database), they play nice with arithmetic (and thus > > > >You obviously have never dealt with timestamps for dates... > > > >They are a most royal PITA, especially when dealing with timezones and > >DST. > > Couldn't have said it better myself. The two people on this list who have probably spent more time than anyone else in Drupal trying to do things like proper timezone conversions on timestamps are in complete agreement that timestamps are a PITA. > > They also don't work at all well for historical dates, nor for incomplete dates -- years and months with unspecified days or dates without times. They imply a level of precision to the second when that may not be at all true. They have no knowledge of timezones nor any way of dealing with timezones. > > When you store a date in a database's native datetime format, the database can do timezone adjustments on the value, format the date values, and extract things like a month or year out of the date. If you store the date in a timestamp and need to do any of those things, you first have to come back and cast the timestamp as a datetime field, which is neither simple nor elegant, and works differently (and sometimes badly) in different databases. > > Dates are complicated beasts. Treating them as timestamps doesn't solve the problems, it just creates different ones. Timestamp - a date representation of some form... two possible representations are unix style integer timestamp or date-time formatted string representation. Integer timestamps really only limited in range of dates they can express. The currently signed 32bit unix timestamps will wrap on Jan 19 2038 and find themselves at some massively negative number of seconds before Jan 1 1970. We should be up to 64 bit computing by then.. which should buy the venerable unix timestamp about 292,471,208,609 more years... (warning not offseting for the slowing rotation of the early and the increasing frequency of leap seconds) since someone decided to use a signed representation historic dates can also be represented as negative values, but generally are not. I thinking covering 292 billion years forward and backward should be sufficient for most cases.... Timestamps in DateTime string notation can express any time from 0000AD to 9999AD and per RFC 3339. So it has a wider range than a 32 bit unix timestamp, and defines how to represent pre unix epoch dates. The timezone issue is still a problem for both representations of time. The simple way I've found for keeping the timezone straight is storing all time in UTC, and any time representation in database queries should be converted in UTC. The second timezone to keep track of, is the timezone of the user/server. With drupal core you can assuming a cascase of potential timezones in order of priority: user entered timezone, user profile timezone, drupal site timezone. You can use the timezone offset specified in each to convert to UTC... or convert for presentation. The important rule... keep every time representation in SQL in the same timezone... preferably UTC. For the specific case of handling dates in PHP5 the new datetime object makes it really easy to find offset by timezone and handling DST pretty simple, although the mechanics of converting to an integer timestamp are somewhat annoying becuase you do have to convert it to a date-time string representation to create the datetime object I believe. > I'm looking forward to getting them out of Drupal core. The string representations also have their drawbacks, and at some point they all have to be converted to numeric values to process them... admittedly it is kind of easier to parse the day out of the date-time strings and add 2, rather than converting complex dates to integer representations... Then there is always the spectre of non-gregorian dates.... I don't think there is really a great need to remove basic timezone handling from Drupal Core. I think there is a great need to specify how timestamps and time representations should be handled for consistency. I think there is a proper place for both integer timestamps and string representations of time depending on performance or time period requirements, and PHP now provides tools for handling timezone and DST conversion fairly simply for both datetime timestamps and unix timestamps. From cxjohnson at gmail.com Wed Jul 2 19:23:36 2008 From: cxjohnson at gmail.com (Chris Johnson) Date: Wed, 2 Jul 2008 14:23:36 -0500 Subject: [development] no date / time types in schema API In-Reply-To: References: <268948.4759.qm@web65614.mail.ac4.yahoo.com> Message-ID: <9ea8d6030807021223q16073a34kc71f22a80275fa9a@mail.gmail.com> Note that Drupal 6 uses 32-bit signed integers in the database (MySQL) for UNIX timestamps, and thus has a range of -2147483648 to 2147483647 seconds, or Fri, 13 Dec 1901 to Tue, 19 Jan 2038. And that's only if you use PHP to do the Unix time to date conversion. MySQL stupidly does not handle the full range, and will return NULL for values near the end points (how near, I don't know -- I didn't test more than a few values). So, 64-bit timestamps might allow us to represent all useful dates ever, but we are not using 64-bit timestamps and it's unlikely we will require such within the next year. From mail at webthatworks.it Wed Jul 2 20:21:05 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 2 Jul 2008 22:21:05 +0200 Subject: [development] no date / time types in schema API In-Reply-To: <1878997695.107461215012089679.JavaMail.root@mail-2.01.com> References: <20080702170904.3af12384@dawn.webthatworks.it> <1878997695.107461215012089679.JavaMail.root@mail-2.01.com> Message-ID: <20080702222105.783653b5@dawn.webthatworks.it> On Wed, 2 Jul 2008 10:21:29 -0500 (CDT) David Timothy Strauss wrote: > ----- "Ivan Sergio Borgonovo" wrote: > > You're not forced to store dates with tz but having a data type > > that understand tz and support tz operations inside the DB is > > pretty helpful. > > Again... suppose you store datetime in GMT and you want to know > > who had a beer before 1:00am local time maybe during a DTS > > change [evil grin]? > > a tz is not an integer. You can't compute the interval on the PHP > > side and you don't want to return all the times and filter on > > the PHP side either. > I have never written an application that needed to answer a time > question based on the local time for all rows. Lucky you. > Your proposal of using date/time columns in the database doesn't > fix it, either. You can't query based on "local time" even if > MySQL knows all the timezone data. You can at least in postgresql if you use the right functions and define a suitable schema. I think it would even be easier on MySQL that store tz data in tables... or well maybe I don't know well enough internals of pg in this area, but I know it would be possible without moving around data. I didn't say it is common or trivial but missing the functions that support tz in the DB is going to make the task much harder once you've to answer a time question based on local time. If you want to organise a meeting and you want to collect stats about what are the most busy hours among your managers you've to deal with GMT as well as local times. Storing data in a proper data type will make dealing with tz inside the DB efficient even if not directly from the Drupal DB API. tz aren't integers either so properly dealing with tz is not going to be easy... I think every solution to the tz problem in Drupal is going to be a hack for the near future, timestamps aren't going to help providing a solid solution. > > > Oh, and good luck dealing with your DB server sometimes having > > > a different timezone than your web server. > > That's life. Anyway MySQL as well as PostgreSQL provide nifty > > settings to cope with the problem. > Why cope when you can avoid the problem entirely? Because sometimes you've to cope and you can't avoid the problem. Having support for tz in the DB doesn't seem bad... but it is an area of larger jeopardization than datetime support across DB and it looks as it is going to be solved later than just datetime support in D7. Anyway having support for proper dates in the DB opens the possibility of much more complex queries that otherwise would require a lot of data moving around. Simple things like returning all the submitted posts on Sunday aren't possible other than moving a lot of data around if you store dates in timestamps... oh yes you can... once you build up a query that convert the timestamp to a native data type and... but well that's not going to make your query faster and still you'll have to deal with conversion somewhere... So better that DB know the nature of the data it is storing: it helps building up where clauses and it helps maintaining consistency and quality of stored data. Otherwise we would be storing everything in a BLOB or use the filesystem and grep. -- Ivan Sergio Borgonovo http://www.webthatworks.it From jm at poure.com Thu Jul 3 19:58:33 2008 From: jm at poure.com (Jean-Michel =?ISO-8859-1?Q?Pour=E9?=) Date: Thu, 03 Jul 2008 21:58:33 +0200 Subject: [development] Drupal could be 10x times faster with correctindexing (no flame war) In-Reply-To: References: Message-ID: <1215115113.6213.7.camel@debian> Le mardi 01 juillet 2008 ? 09:57 -0500, Larry Garfield a ?crit : > And please note the very first item on that list. The new Database > API layer is designed to make supporting multiple databases easier, > but right now it's stalled on lack of people who can help test the > Postgres driver. If you know Postgres and PDO, we need your help to > carry this thing home! PDO are good news. I will have some time this summer and can monitor/review queries in logs, then submit patches. If you are moving to PDO, which is good news, there may be some interest to use PostgreSQL, as it writes fairly compliant SQL 92 code. I will get back shortly. Kind regards, JM From drupal at mamasam.net Fri Jul 4 17:17:40 2008 From: drupal at mamasam.net (Bertrand Mansion) Date: Fri, 4 Jul 2008 19:17:40 +0200 Subject: [development] Filter taxonomy Message-ID: Hi, In my configuration, I have users who belong to organic groups who can create "projects" nodes. Upon creation, these "projects" node automatically create taxonomy terms using the NAT module. Now, I would like to propose to the user only the "projects" terms he created (acctually, the ones created by people of his group as well, but if I can do one, I can do the other). Is there a module, a hook or a way to filter out some terms when a node is edited/added by a user that is not allowed to use these terms? At the moment, I have patched taxonomy.module but it would be nice to have something maybe like hook_taxonomy() with a "load" operation? -- Golgote Blog : http://golgote.freeflux.net From ojacquet at jax.be Fri Jul 4 19:30:30 2008 From: ojacquet at jax.be (Olivier Jacquet) Date: Fri, 04 Jul 2008 21:30:30 +0200 Subject: [development] no date / time types in schema API In-Reply-To: <488373178.108861215012460404.JavaMail.root@mail-2.01.com> References: <488373178.108861215012460404.JavaMail.root@mail-2.01.com> Message-ID: <486E7A56.2050608@jax.be> David, Read up on "Unix Epoch". The unix timestamp 0 corresponds to January 1, 1970. So it's rather difficult to represent a date before that year. Also, implementations do or do not take timezones into account wich makes it even more difficult. Regards, Olivier David Timothy Strauss wrote: > ----- "augustin (beginner)" wrote: > >> On Wednesday 02 July 2008 18:36:15 Damien wrote: >>> A solution based on timestamps is much more elegant: timestamps need >> no >>> (database-specific) parsing whatsoever (both on reading and writing >> to the >>> database), they play nice with arithmetic (and thus do not need any >> helper >>> functions), and are consistent with the implementation of most >> application, >>> including Drupal. >> How do you use a timestamp when you need the date 18 Aug 1908 on a >> date >> field??? > > You use the UNIX timestamp at 00:00 UTC that day. > From david at fourkitchens.com Fri Jul 4 23:20:03 2008 From: david at fourkitchens.com (David Strauss) Date: Fri, 4 Jul 2008 23:20:03 +0000 Subject: [development] no date / time types in schema API In-Reply-To: <486E7A56.2050608@jax.be> References: <488373178.108861215012460404.JavaMail.root@mail-2.01.com><486E7A56.2050608@jax.be> Message-ID: <413591218-1215213626-cardhu_decombobulator_blackberry.rim.net-1745222465-@bxe027.bisx.prod.on.blackberry> You forget: * Negative numbers * That we've even discussed such negative numbers in this thread -----Original Message----- From: Olivier Jacquet Date: Fri, 04 Jul 2008 21:30:30 To: Subject: Re: [development] no date / time types in schema API David, Read up on "Unix Epoch". The unix timestamp 0 corresponds to January 1, 1970. So it's rather difficult to represent a date before that year. Also, implementations do or do not take timezones into account wich makes it even more difficult. Regards, Olivier David Timothy Strauss wrote: > ----- "augustin (beginner)" wrote: > >> On Wednesday 02 July 2008 18:36:15 Damien wrote: >>> A solution based on timestamps is much more elegant: timestamps need >> no >>> (database-specific) parsing whatsoever (both on reading and writing >> to the >>> database), they play nice with arithmetic (and thus do not need any >> helper >>> functions), and are consistent with the implementation of most >> application, >>> including Drupal. >> How do you use a timestamp when you need the date 18 Aug 1908 on a >> date >> field??? > > You use the UNIX timestamp at 00:00 UTC that day. > From david at fourkitchens.com Fri Jul 4 23:26:54 2008 From: david at fourkitchens.com (David Strauss) Date: Fri, 4 Jul 2008 23:26:54 +0000 Subject: [development] no date / time types in schema API In-Reply-To: <486E7A56.2050608@jax.be> References: <488373178.108861215012460404.JavaMail.root@mail-2.01.com><486E7A56.2050608@jax.be> Message-ID: <1981564734-1215214052-cardhu_decombobulator_blackberry.rim.net-1466376846-@bxe027.bisx.prod.on.blackberry> And no, the UNIX epoch is always relative to Jan 1, 1970 00:00 UTC. -----Original Message----- From: Olivier Jacquet Date: Fri, 04 Jul 2008 21:30:30 To: Subject: Re: [development] no date / time types in schema API David, Read up on "Unix Epoch". The unix timestamp 0 corresponds to January 1, 1970. So it's rather difficult to represent a date before that year. Also, implementations do or do not take timezones into account wich makes it even more difficult. Regards, Olivier David Timothy Strauss wrote: > ----- "augustin (beginner)" wrote: > >> On Wednesday 02 July 2008 18:36:15 Damien wrote: >>> A solution based on timestamps is much more elegant: timestamps need >> no >>> (database-specific) parsing whatsoever (both on reading and writing >> to the >>> database), they play nice with arithmetic (and thus do not need any >> helper >>> functions), and are consistent with the implementation of most >> application, >>> including Drupal. >> How do you use a timestamp when you need the date 18 Aug 1908 on a >> date >> field??? > > You use the UNIX timestamp at 00:00 UTC that day. > From bharanikumariyerphp at gmail.com Sat Jul 5 10:01:29 2008 From: bharanikumariyerphp at gmail.com (bharani kumar) Date: Sat, 5 Jul 2008 15:31:29 +0530 Subject: [development] paging module need to work out Message-ID: <2240033d0807050301i5291cccif8d765f227091b53@mail.gmail.com> Dear Am using paging for article content, in my table body field contains the all html tags my content looking like this manner
Figure 1. These examples show the application of die design guidelines.
Editor?s note: Chris Rauwendaal is a designer, consultant, and seminar instructor who has written extensively on process engineering and extrusion topics.

Die design for extrusion can be rather complicated, since the size and shape of the extruded product varies from that of the die flow channel. Multiple mechanisms affect the size and shape changes in the extruded product, and these can be controlled by die design.

the above is my content, what happen u see, when the page break is inserted inside table tag, then the table content divided into two pages, Tell me solution for this????????? i want like this manner
Figure 1. These examples show the application of die design guidelines.
<--break--> Editor?s note: Chris Rauwendaal is a designer, consultant, and seminar instructor who has written extensively on process engineering and extrusion topics. <--break-->

Die design for extrusion can be rather complicated, since the size and shape of the extruded product varies from that of the die flow channel. Multiple mechanisms affect the size and shape changes in the extruded product, and these can be controlled by die design.

anu support for this........ Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080705/991bee8c/attachment-0001.htm From karoly at negyesi.net Tue Jul 8 04:56:01 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Tue, 08 Jul 2008 06:56:01 +0200 (CEST) Subject: [development] Drupal could be 10x times faster with correctindexing (no flame war) In-Reply-To: <1215115113.6213.7.camel@debian> References: <1215115113.6213.7.camel@debian> Message-ID: > logs, then submit patches. If you are moving to PDO, which is good news, > there may be some interest to use PostgreSQL, as it writes fairly > compliant SQL 92 code. there may be some confusion here. PDO writes no queries. It's a relatively simple driver nothing else. From david at fourkitchens.com Tue Jul 8 05:02:04 2008 From: david at fourkitchens.com (David Timothy Strauss) Date: Tue, 8 Jul 2008 00:02:04 -0500 (CDT) Subject: [development] Drupal could be 10x times faster with correctindexing (no flame war) In-Reply-To: Message-ID: <1010581530.450201215493324746.JavaMail.root@mail-2.01.com> ----- "Karoly Negyesi" wrote: > > logs, then submit patches. If you are moving to PDO, which is good > news, > > there may be some interest to use PostgreSQL, as it writes fairly > > compliant SQL 92 code. > > there may be some confusion here. PDO writes no queries. It's a > relatively simple driver nothing else. I think he means "PostgreSQL is fairly compliant with SQL 92." From mhaggerty-lists at trellon.com Wed Jul 9 01:28:08 2008 From: mhaggerty-lists at trellon.com (Michael Haggerty) Date: Tue, 8 Jul 2008 21:28:08 -0400 Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <1214834752.8415.10.camel@debian> References: <1214834752.8415.10.camel@debian> Message-ID: <97171690-C491-4139-A637-77E6B02613AC@trellon.com> On Jun 30, 2008, at 10:05 AM, Jean-Michel Pour? wrote: > In the above issue, I could speed-up a simple query by 10 times. You > may > not notice this issue when using small Drupal sites (because the whole > database executes in shared memory) or when using Drupal with caching. > But ... on large installations like mine, you cannot cache everything > without a huge amount of memory. And the result is SLOW. I have implemented a large scale Drupal site that uses PostGres for the backend. We benchmarked it at around 4 million page views an hour with memcache installed and using a cache injection strategy. We had to perform extensive modifications to the database schema to get the core database performing well by adding indexes and primary keys to every table (which is extremely important when working in a clustered / replicated / federated environment, and which large scale sites also need to address). Other people in this thread have commented on the lack of testing around PostGres, and the original poster pointed out the lack of proper indexing on contributed modules. I think these comments get to the heart of the matter, that the problems with PostGres support in Drupal is systemic and arises from an lack of resources within the community. On the other hand, proper PostGres tuning is far more important than anything else you can do in terms of overall performance. There are a number of kernel level tuning steps specific to PostGres servers which should be taken in order to ensure maximum database throughput. PostGres is just different enough from MySQL to throw people for a serious loop if they do not know what they are getting into. We worked with a PostGres consulting firm called Command Prompt and they were truly excellent in helping us improve database performance, tweak the servers, and identify which tables were getting hit the hardest so we knew where to start with our enhancements to core. We did do an EXPLAIN ANALYZE on every query in our installation (by exposing each one with devel) and this included a large number of contributed modules. The most problematic queries were the ones coming from user_points and views, which should come as no surprise, and there were a number of minor modifications we needed to make to other modules to get the most out of them. At no point did we see anything near a 10x improvement in query performance across the board, although we did manage to get some queries running that were locking up our servers under load. This was a brute force tactic to improving system performance needed to get the project done, and a better approach to resolving PostGres issues within Drupal might be to use PostGres' query logger to get snapshots of database behavior under load and address the biggest outliers in terms of performance. While log files can quickly become huge, taking 60 second snapshots and sorting them for query performance time can be very instructive. Also, anyone dealing with issues of load needs to be aware of the actual number of queries running on each page, which is quite a lot even with most caching enabled. Either Jeremy Andrews or Gerhard wrote a nice patch to eliminate all queries from core for anonymous users, although I am not sure how useful this is for users in general (the point is it can be done). The most significant problem we faced, outside of straight up bad queries, was repetitive queries. The userpoints module was challenging to work with and we did need to rewrite most of the data access there to make it suitable for a production environment. There are other modules we changed, but this one required the most effort. We had some pages that were hitting the points tables over 100 times per page load, even for anonymous users with memcache installed. That said, for now, use MySQL if you can. : ) It is the swiss army knife to PostGres' blazing scimitar, there are a lot more clustering options available, it can perform most simple queries much faster than PostGres (read ahead memory adds a lot of overhead to queries with less than 3 joins compared to MySQL), the FOSS db admin tools available for it are more sophisticated, and Drupal certainly likes it more. What's ironic about this discussion is the PostGres developer base is growing at a faster rate than MySQL and adoption is increasing for a number of other FOSS projects. At some point, I think demand for PostGres implementations is going to grow to the point where the systemic issues are going to have to go away for Drupal. These kinds of problems are not solved quickly or easily, but hopefully it helps knowing other people have faced the same challenges and been successful at achieving performance goals. M From kb at 2bits.com Wed Jul 9 12:36:43 2008 From: kb at 2bits.com (Khalid Baheyeldin) Date: Wed, 9 Jul 2008 08:36:43 -0400 Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <97171690-C491-4139-A637-77E6B02613AC@trellon.com> References: <1214834752.8415.10.camel@debian> <97171690-C491-4139-A637-77E6B02613AC@trellon.com> Message-ID: <4a9fdc630807090536i68b4fb4dtff14156b1baf4959@mail.gmail.com> > We did do an EXPLAIN ANALYZE on every query in our installation (by > exposing each one with devel) and this included a large number of > contributed modules. The most problematic queries were the ones coming from > user_points and views, which should come as no surprise, A patch by a large site was commited. It adds a few indexes that increase the performance for the txn table. The most significant problem we faced, outside of straight up bad queries, > was repetitive queries. The userpoints module was challenging to work with > and we did need to rewrite most of the data access there to make it suitable > for a production environment. There are other modules we changed, but this > one required the most effort. We had some pages that were hitting the points > tables over 100 times per page load, even for anonymous users with memcache > installed. > If this is a list of users with points for each listed beside their names, then yes, it has to query the table several times on the page. Just like user_load or node_load for different users/nodes. If you have implemented some sort of smart caching, then we are looking forward to your patches in the issue queue. > What's ironic about this discussion is the PostGres developer base is > growing at a faster rate than MySQL and adoption is increasing for a number > of other FOSS projects. What I have seen is that Sun's purchase of MySQL, and MySQL's management revoking the open source aspect of some features, then reversing that decision, all this has not gone well with some. Moreover, the departure from MySQL/Sun of Jim Starkey, architect of the new transactional Falcon engine, and Oracle's ownership of InnoBase has left the question of the future of a transactional engine (Maria is not transactional, just a replacement for MyISAM). PostgreSQL has been transactional from the start though. -- Khalid M. Baheyeldin 2bits.com, Inc. http://2bits.com Drupal optimization, development, customization and consulting. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080709/439e13d0/attachment.htm From earnie at users.sourceforge.net Wed Jul 9 13:05:27 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 09 Jul 2008 09:05:27 -0400 Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <97171690-C491-4139-A637-77E6B02613AC@trellon.com> References: <1214834752.8415.10.camel@debian> <97171690-C491-4139-A637-77E6B02613AC@trellon.com> Message-ID: <20080709090527.6hal5so6qy5cc008@mail.progw.org> Quoting Michael Haggerty : > > What's ironic about this discussion is the PostGres developer base is > growing at a faster rate than MySQL and adoption is increasing for a > number of other FOSS projects. At some point, I think demand for > PostGres implementations is going to grow to the point where the > systemic issues are going to have to go away for Drupal. These kinds > of problems are not solved quickly or easily, but hopefully it helps > knowing other people have faced the same challenges and been > successful at achieving performance goals. > I've kept quiet about this but IMO the index issue plagues MySql implementations just as badly. Especially for the InnoDB engine. I've had to remove and add indexes on various tables to help improve the performance. I've just not had the time to put together those changes toward a patch. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From jeremy at kerneltrap.org Wed Jul 9 13:17:32 2008 From: jeremy at kerneltrap.org (Jeremy Andrews) Date: Wed, 09 Jul 2008 09:17:32 -0400 Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <4a9fdc630807090536i68b4fb4dtff14156b1baf4959@mail.gmail.com> References: <1214834752.8415.10.camel@debian> <97171690-C491-4139-A637-77E6B02613AC@trellon.com> <4a9fdc630807090536i68b4fb4dtff14156b1baf4959@mail.gmail.com> Message-ID: <1215609452.7777.270.camel@wanderer> On Wed, 2008-07-09 at 08:36 -0400, Khalid Baheyeldin wrote: > (Maria is not transactional, just a replacement for MyISAM). While it is true that the first preview releases (1.0 and 1.5) of Maria are not going to be transactional (they will be crash safe, but will not yet include ROLLBACK support) this is a temporary condition for Monty's new storage engine. He explains that among his goals for Maria in MySQL 6, it will be a fully transactional storage engine that can replace MyISAM. The 2.0 release of Maria is intended to be fully transactional (crash safe, supporting ROLLBACK, etc), while continuing to support the ability for completely disabling this transactional functionality if desired: http://monty-says.blogspot.com/2008/01/maria-engine-is-released.html Cheers, -Jeremy From david at fourkitchens.com Wed Jul 9 23:17:30 2008 From: david at fourkitchens.com (David Timothy Strauss) Date: Wed, 9 Jul 2008 18:17:30 -0500 (CDT) Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <20080709090527.6hal5so6qy5cc008@mail.progw.org> Message-ID: <580588680.831021215645450205.JavaMail.root@mail-2.01.com> ----- "Earnie Boyd" wrote: > Especially for the InnoDB engine. How would index issues particularly affect the InnoDB engine? From syscrusher at 4th.com Wed Jul 9 23:32:34 2008 From: syscrusher at 4th.com (Syscrusher) Date: Wed, 09 Jul 2008 19:32:34 -0400 Subject: [development] Question on #theme attribute in D6 FAPI Message-ID: <1215646354.10899.47.camel@marcus> Good evening! I have a form that works fine in Drupal 5 and uses the #theme attribute to invoke a user-defined function. I'm trying to update the module to Drupal 6, and am getting no errors, but the #theme function is no longer being invoked (I placed trace statements there, and am using devel.module for diagnostic printing using dprint_r()). I checked the upgrade-your-module documentation (which is excellent, btw), but there's no mention of a change to how #theme works. Have I overlooked a change that's documented elsewhere? Here are the code snippets. In the code that generates the $form array, I have this: $form['links_related']['#theme'] = 'links_related_form'; and the theme function is defined thusly: function theme_links_related_form($form) I have a trace print() statement right inside that function as the first line, so I know the function isn't being called. By the way, the form itself generates and executes correctly, with all fields working. The only problem is that the theming isn't being called, so I'm getting plain vanilla output rather than the table that is supposed to neatly align the columns (my theme function calls Drupal's core theme('table', ....) function to do this). Again, this worked in D5, so I'm looking for what needs to change for D6. Thanks for any suggestions. Scott -- Syscrusher From darrel.opry at gmail.com Wed Jul 9 23:48:46 2008 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Wed, 9 Jul 2008 19:48:46 -0400 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: <1215646354.10899.47.camel@marcus> References: <1215646354.10899.47.camel@marcus> Message-ID: Did you add the #theme function to hook_theme? #theme should work the same. I don't believe there were any changes to how it is handled in drupal_render. .darrel. On Wed, Jul 9, 2008 at 7:32 PM, Syscrusher wrote: > Good evening! > > I have a form that works fine in Drupal 5 and uses the #theme attribute > to invoke a user-defined function. I'm trying to update the module to > Drupal 6, and am getting no errors, but the #theme function is no longer > being invoked (I placed trace statements there, and am using > devel.module for diagnostic printing using dprint_r()). > > I checked the upgrade-your-module documentation (which is excellent, > btw), but there's no mention of a change to how #theme works. Have I > overlooked a change that's documented elsewhere? > > Here are the code snippets. In the code that generates the $form array, > I have this: > > $form['links_related']['#theme'] = 'links_related_form'; > > and the theme function is defined thusly: > > function theme_links_related_form($form) > > I have a trace print() statement right inside that function as the first > line, so I know the function isn't being called. > > By the way, the form itself generates and executes correctly, with all > fields working. The only problem is that the theming isn't being called, > so I'm getting plain vanilla output rather than the table that is > supposed to neatly align the columns (my theme function calls Drupal's > core theme('table', ....) function to do this). > > Again, this worked in D5, so I'm looking for what needs to change for > D6. > > Thanks for any suggestions. > > Scott > -- > Syscrusher > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080709/3f17c716/attachment.htm From syscrusher at 4th.com Thu Jul 10 01:22:54 2008 From: syscrusher at 4th.com (Syscrusher) Date: Wed, 09 Jul 2008 21:22:54 -0400 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: References: <1215646354.10899.47.camel@marcus> Message-ID: <1215652974.10899.52.camel@marcus> On Wed, 2008-07-09 at 19:48 -0400, Darrel O'Pry wrote: > Did you add the #theme function to hook_theme? #theme should work the > same. I don't believe there were any changes to how it is handled in > drupal_render. Thanks for the quick reply, but now I'm confused. With regard to registering my theme function, no, I didn't realize I needed to do that. Is this necessary for the FAPI to call a theme function that is referenced in the $form array? IOW, just declaring the function in the $form array doesn't imply that it should be called? I went to the hook_theme documentation, but I'm unclear on how those registration parameters apply to FAPI clients; the documentation seems to speak from the viewpoint of the theme writer. I'm not writing a theme, just needing to wrap form elements into a table from the drupal_render() call. I embed class and ID attributes in the table which the theme can modify for aesthetics -- IOW, my module only applies the document structure elements without regard to their cosmetics at display time. Am I taking the wrong approach to this? Scott -- Syscrusher From merlin at logrus.com Thu Jul 10 01:25:06 2008 From: merlin at logrus.com (Earl Miles) Date: Wed, 09 Jul 2008 18:25:06 -0700 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: <1215652974.10899.52.camel@marcus> References: <1215646354.10899.47.camel@marcus> <1215652974.10899.52.camel@marcus> Message-ID: <487564F2.1010002@logrus.com> Syscrusher wrote: > On Wed, 2008-07-09 at 19:48 -0400, Darrel O'Pry wrote: >> Did you add the #theme function to hook_theme? #theme should work the >> same. I don't believe there were any changes to how it is handled in >> drupal_render. > > Thanks for the quick reply, but now I'm confused. With regard to > registering my theme function, no, I didn't realize I needed to do that. > Is this necessary for the FAPI to call a theme function that is > referenced in the $form array? IOW, just declaring the function in the > $form array doesn't imply that it should be called? > > I went to the hook_theme documentation, but I'm unclear on how those > registration parameters apply to FAPI clients; the documentation seems > to speak from the viewpoint of the theme writer. I'm not writing a > theme, just needing to wrap form elements into a table from the > drupal_render() call. I embed class and ID attributes in the table which > the theme can modify for aesthetics -- IOW, my module only applies the > document structure elements without regard to their cosmetics at display > time. > > Am I taking the wrong approach to this? FAPI doesn't talk to the theme layer, and because there is no form registration, it can't do that for you. This is something I'd like to see changed in the future, since it is actually not at all difficult to figure out what forms are available if we just add a tiny bit of code. All form themes have exactly one argument, so: 'arguments' => array('element' => NULL), From merlin at logrus.com Thu Jul 10 01:26:15 2008 From: merlin at logrus.com (Earl Miles) Date: Wed, 09 Jul 2008 18:26:15 -0700 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: <1215652974.10899.52.camel@marcus> References: <1215646354.10899.47.camel@marcus> <1215652974.10899.52.camel@marcus> Message-ID: <48756537.8010103@logrus.com> Syscrusher wrote: > I went to the hook_theme documentation, but I'm unclear on how those > registration parameters apply to FAPI clients; the documentation seems > to speak from the viewpoint of the theme writer. I'm not writing a > theme, just needing to wrap form elements into a table from the > drupal_render() call. I embed class and ID attributes in the table which > the theme can modify for aesthetics -- IOW, my module only applies the > document structure elements without regard to their cosmetics at display > time. See: http://drupal.org/node/165706 -- that's in the module developer's guide. And the api docs for hook_theme, of course. From syscrusher at 4th.com Thu Jul 10 03:28:30 2008 From: syscrusher at 4th.com (Syscrusher) Date: Wed, 09 Jul 2008 23:28:30 -0400 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: <48756537.8010103@logrus.com> References: <1215646354.10899.47.camel@marcus> <1215652974.10899.52.camel@marcus> <48756537.8010103@logrus.com> Message-ID: <1215660510.10899.58.camel@marcus> On Wed, 2008-07-09 at 18:26 -0700, Earl Miles wrote: > See: http://drupal.org/node/165706 -- that's in the module developer's > guide. Ah. That helps, some. I need to go look at the code in forum.module to see how they did it, but this is starting to clear the murk in my brain. Thanks! > > And the api docs for hook_theme, of course. Been there, done that, and that's the page that confused me to prompt the question on the list. :-) I think node 165706 plus the forum sample code will probably get me squared away. It's obvious that the step I missed is to register the theme call, now I just need to walk through how that process works in some existing code. I'm one of those people who learns best from examples rather than theoreticals. :-) Thanks for the referrals. I hadn't seen that page in the module dev guide. Scott -- Syscrusher From darrel.opry at gmail.com Thu Jul 10 06:30:07 2008 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Thu, 10 Jul 2008 02:30:07 -0400 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: <1215652974.10899.52.camel@marcus> References: <1215646354.10899.47.camel@marcus> <1215652974.10899.52.camel@marcus> Message-ID: On Wed, Jul 9, 2008 at 9:22 PM, Syscrusher wrote: > On Wed, 2008-07-09 at 19:48 -0400, Darrel O'Pry wrote: > > Did you add the #theme function to hook_theme? #theme should work the > > same. I don't believe there were any changes to how it is handled in > > drupal_render. > > Thanks for the quick reply, but now I'm confused. With regard to > registering my theme function, no, I didn't realize I needed to do that. > Is this necessary for the FAPI to call a theme function that is > referenced in the $form array? IOW, just declaring the function in the > $form array doesn't imply that it should be called? > > I went to the hook_theme documentation, but I'm unclear on how those > registration parameters apply to FAPI clients; the documentation seems > to speak from the viewpoint of the theme writer. I'm not writing a > theme, just needing to wrap form elements into a table from the > drupal_render() call. I embed class and ID attributes in the table which > the theme can modify for aesthetics -- IOW, my module only applies the > document structure elements without regard to their cosmetics at display > time. > > Am I taking the wrong approach to this? > FAPI and the theme layer are not the same... A theme function must be declared in hook_theme() in order for theme() to call it. FAPI simply calls theme() with the $element. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080710/9a8de694/attachment.htm From syscrusher at 4th.com Thu Jul 10 09:32:27 2008 From: syscrusher at 4th.com (Syscrusher) Date: Thu, 10 Jul 2008 05:32:27 -0400 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: References: <1215646354.10899.47.camel@marcus> <1215652974.10899.52.camel@marcus> Message-ID: <1215682347.10899.65.camel@marcus> On Thu, 2008-07-10 at 02:30 -0400, Darrel O'Pry wrote: > FAPI and the theme layer are not the same... A theme function must be > declared in hook_theme() in order for theme() to call it. FAPI simply > calls theme() with the $element. Ahhhhhh....that helps a LOT. I realized they were separate layers, but I was under the impression that if I declared $form[$element]['#theme'] = 'foo' that the FAPI's drupal_render() would directly call $html_fragment = them_foo($form[$element]) I understand now that FAPI is using theme(.....) internally rather than making the direct call. For some reason I just never made the connection that the FAPI was relying on the actual theme layer rather than just looking for the function directly. Are the naming conventions for the functions still the same now? IOW, should my theming function begin with "theme_my_module_...." or just with "my_module_.....", as a D6 convention? And is the naming convention the same for theme functions intended to be called by FAPI as it would be if the same function were actually part of a theme package? I want to be sure that by creating module "foo" I am not conflicting with theme "foo" if someone else were to create that (unlikely, but better to be safe than sorry, and I want to be a good Drupal citizen). Thanks again for all the help on this, from all who have replied. Scott > -- Syscrusher From earnie at users.sourceforge.net Thu Jul 10 11:38:03 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 10 Jul 2008 07:38:03 -0400 Subject: [development] Question on #theme attribute in D6 FAPI In-Reply-To: <1215682347.10899.65.camel@marcus> References: <1215646354.10899.47.camel@marcus> <1215652974.10899.52.camel@marcus> <1215682347.10899.65.camel@marcus> Message-ID: <20080710073803.9xanpvodr00840k8@mail.progw.org> Quoting Syscrusher : > > Are the naming conventions for the functions still the same now? IOW, > should my theming function begin with "theme_my_module_...." or just > with "my_module_.....", as a D6 convention? And is the naming convention > the same for theme functions intended to be called by FAPI as it would > be if the same function were actually part of a theme package? > Maybe you should check the documentation: http://api.drupal.org/api/function/hook_theme/6 Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From earnie at users.sourceforge.net Thu Jul 10 12:18:52 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 10 Jul 2008 08:18:52 -0400 Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <580588680.831021215645450205.JavaMail.root@mail-2.01.com> References: <580588680.831021215645450205.JavaMail.root@mail-2.01.com> Message-ID: <20080710081852.sfj5kczb8ww08w44@mail.progw.org> Quoting David Timothy Strauss : > ----- "Earnie Boyd" wrote: >> Especially for the InnoDB engine. > > How would index issues particularly affect the InnoDB engine? > Performance and the size of the index file. My reference is for Drupal 5 and I do not know what may have changed for Drupal 6 yet but there are a number of duplicated indexes on some of the tables. A column might be used as the first position in combination with another column to create an index and also be declared an index alone. This becomes a duplicate index and isn't needed. Some tables do not have unique or primary key identifiers a big performance hit. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From catch56 at googlemail.com Thu Jul 10 12:27:45 2008 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Thu, 10 Jul 2008 13:27:45 +0100 Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <20080710081852.sfj5kczb8ww08w44@mail.progw.org> References: <580588680.831021215645450205.JavaMail.root@mail-2.01.com> <20080710081852.sfj5kczb8ww08w44@mail.progw.org> Message-ID: There were several patches in Drupal 6 which removed duplicate indexes (and/or added missing ones), so it's likely that pretty much all of these issues are resolved. Nat On Thu, Jul 10, 2008 at 1:18 PM, Earnie Boyd > > > > >> > Performance and the size of the index file. My reference is for Drupal 5 > and I do not know what may have changed for Drupal 6 yet but there are a > number of duplicated indexes on some of the tables. A column might be used > as the first position in combination with another column to create an index > and also be declared an index alone. This becomes a duplicate index and > isn't needed. Some tables do not have unique or primary key identifiers a > big performance hit. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080710/891e06e3/attachment.htm From miriam at mail.snunit.k12.il Thu Jul 10 12:33:08 2008 From: miriam at mail.snunit.k12.il (Miriam Natanzon) Date: Thu, 10 Jul 2008 15:33:08 +0300 Subject: [development] Tmp directory Message-ID: Hi all, I?m working with Drupal for several months, and today I?v noticed that in the ?Tmp? directory (which holds the files till the uploading process complete), There are several ?old? files. As I understand this phenomenon, these files are files that their upload-process wasn?t completed successfully , And from some reason they were forgotten in the temporary library? even cron run didn?t delete them. Is there any built-in way to get rid of that unnecessary files? Many thanks! Miriam -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080710/e87ef29a/attachment.htm From earnie at users.sourceforge.net Thu Jul 10 13:10:06 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 10 Jul 2008 09:10:06 -0400 Subject: [development] Tmp directory In-Reply-To: References: Message-ID: <20080710091006.o3o987amb2qsswoc@mail.progw.org> Quoting Miriam Natanzon : > Hi all, > > I?m working with Drupal for several months, and today I?v noticed that in > the ?Tmp? directory (which holds the files till the uploading process > complete), > There are several ?old? files. > As I understand this phenomenon, these files are files that their > upload-process wasn?t completed successfully , > And from some reason they were forgotten in the temporary library? even cron > run didn?t delete them. > > Is there any built-in way to get rid of that unnecessary files? > This isn't a development request see: http://drupal.org/support. Use a cron script to remove the files in /tmp. Typically this is accomplished using the find command. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From victorkane at gmail.com Thu Jul 10 14:33:34 2008 From: victorkane at gmail.com (Victor Kane) Date: Thu, 10 Jul 2008 11:33:34 -0300 Subject: [development] Tmp directory In-Reply-To: <20080710091006.o3o987amb2qsswoc@mail.progw.org> References: <20080710091006.o3o987amb2qsswoc@mail.progw.org> Message-ID: It is a development request to the extent that this may be a "bug by design"; what is supposed to happen to the tmp files? Are people who may not be system admin gurus supposed to know that these files accumulate, and what to do with them? Victor Kane http://awebfactory.com.ar On Thu, Jul 10, 2008 at 10:10 AM, Earnie Boyd wrote: > Quoting Miriam Natanzon : > > Hi all, >> >> I'm working with Drupal for several months, and today I'v noticed that in >> the "Tmp" directory (which holds the files till the uploading process >> complete), >> There are several "old" files. >> As I understand this phenomenon, these files are files that their >> upload-process wasn't completed successfully , >> And from some reason they were forgotten in the temporary library? even >> cron >> run didn't delete them. >> >> Is there any built-in way to get rid of that unnecessary files? >> >> > This isn't a development request see: http://drupal.org/support. > > Use a cron script to remove the files in /tmp. Typically this is > accomplished using the find command. > > Earnie -- http://for-my-kids.com/ > -- http://give-me-an-offer.com/ > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080710/98e2865b/attachment-0001.htm From darrel.opry at gmail.com Thu Jul 10 15:47:36 2008 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Thu, 10 Jul 2008 11:47:36 -0400 Subject: [development] Tmp directory In-Reply-To: References: Message-ID: Which version of Drupal are you using? Are there human readable prefixes to the tmp files, or are they just random strings? On Thu, Jul 10, 2008 at 8:33 AM, Miriam Natanzon wrote: > Hi all, > > > > I'm working with Drupal for several months, and today I'v noticed that in > the "Tmp" directory (which holds the files till the uploading process > complete), > > There are several "old" files. > > As I understand this phenomenon, these files are files that their > upload-process wasn't completed successfully , > > And from some reason they were forgotten in the temporary library? even > cron run didn't delete them. > > > > Is there any built-in way to get rid of that unnecessary files? > > > > Many thanks! > > Miriam > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080710/a4e01d2c/attachment.htm From saintsjd at gmail.com Thu Jul 10 16:25:08 2008 From: saintsjd at gmail.com (Jon Saints) Date: Thu, 10 Jul 2008 10:25:08 -0600 Subject: [development] update node_example.module to use schema api Message-ID: <8e779d5d0807100925i5d4affc0qb480f1cb2f6aac55@mail.gmail.com> I notice that the file node_example.module on http://api.drupal.org/api/file/developer/examples/node_example.module has not been upgraded to show how to use the schema api. I am interested in updating this page, which has been so helpful to me, to include a hook_schema implementation and some drupal_write_record calls. How and where is this documentation stored? What is the best way for me to make my proposed changes so they can be reviewed by the community and maintainer? Thanks Jon From earnie at users.sourceforge.net Thu Jul 10 16:25:11 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 10 Jul 2008 12:25:11 -0400 Subject: [development] Tmp directory In-Reply-To: References: <20080710091006.o3o987amb2qsswoc@mail.progw.org> Message-ID: <20080710122511.upb8aj0v1334k404@mail.progw.org> Quoting Victor Kane : > It is a development request to the extent that this may be a "bug by > design"; what is supposed to happen to the tmp files? Are people who may not > be system admin gurus supposed to know that these files accumulate, and what > to do with them? > But the OP didn't raise a development topic; it was a topic of support. There is a different list for that. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From morbus at disobey.com Thu Jul 10 16:30:36 2008 From: morbus at disobey.com (Morbus Iff) Date: Thu, 10 Jul 2008 12:30:36 -0400 Subject: [development] Tmp directory In-Reply-To: <20080710122511.upb8aj0v1334k404@mail.progw.org> References: <20080710091006.o3o987amb2qsswoc@mail.progw.org> <20080710122511.upb8aj0v1334k404@mail.progw.org> Message-ID: <4876392C.5020809@disobey.com> >> It is a development request to the extent that this may be a "bug by >> design"; what is supposed to happen to the tmp files? Are people who may not >> be system admin gurus supposed to know that these files accumulate, and what >> to do with them? > > But the OP didn't raise a development topic; it was a topic of support. > There is a different list for that. I'm on the fence. Largely: * if Drupal is leaving tmp files around, something has gone wrong at a high enough level that we probably /can't/ "fix it" by removing the temp files. * most servers have a tmpwatch utility of some kind that automatically purges left over files. This, of course, presumes that Drupal's temp directory remains at the default /tmp. If it's moved elsewhere, then Drupal becomes responsible for cleaning up the files (and we'd probably want to implement some sort of post-cleanup in a cron). -- Morbus Iff ( and think about the bad things that I didn't do ) 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 mfburdett at gmail.com Thu Jul 10 16:44:01 2008 From: mfburdett at gmail.com (mark burdett) Date: Thu, 10 Jul 2008 09:44:01 -0700 Subject: [development] Tmp directory In-Reply-To: <4876392C.5020809@disobey.com> References: <20080710091006.o3o987amb2qsswoc@mail.progw.org> <20080710122511.upb8aj0v1334k404@mail.progw.org> <4876392C.5020809@disobey.com> Message-ID: I'm guessing this issue is re: Drupal 5, but in Drupal 6 there is an over-zealous temp file cleanup, it only allows them to stick around for 24 minutes. http://drupal.org/node/276018 --mark On Thu, Jul 10, 2008 at 9:30 AM, Morbus Iff wrote: >>> It is a development request to the extent that this may be a "bug by >>> design"; what is supposed to happen to the tmp files? Are people who may >>> not >>> be system admin gurus supposed to know that these files accumulate, and >>> what >>> to do with them? >> >> But the OP didn't raise a development topic; it was a topic of support. >> There is a different list for that. > > I'm on the fence. Largely: > > * if Drupal is leaving tmp files around, something has gone wrong > at a high enough level that we probably /can't/ "fix it" by > removing the temp files. > > * most servers have a tmpwatch utility of some kind that automatically > purges left over files. This, of course, presumes that Drupal's temp > directory remains at the default /tmp. If it's moved elsewhere, then > Drupal becomes responsible for cleaning up the files (and we'd > probably want to implement some sort of post-cleanup in a cron). > > -- > Morbus Iff ( and think about the bad things that I didn't do ) > 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 drewish at katherinehouse.com Thu Jul 10 16:48:58 2008 From: drewish at katherinehouse.com (andrew morton) Date: Thu, 10 Jul 2008 09:48:58 -0700 Subject: [development] update node_example.module to use schema api In-Reply-To: <8e779d5d0807100925i5d4affc0qb480f1cb2f6aac55@mail.gmail.com> References: <8e779d5d0807100925i5d4affc0qb480f1cb2f6aac55@mail.gmail.com> Message-ID: On Thu, Jul 10, 2008 at 9:25 AM, Jon Saints wrote: > I notice that the file node_example.module on > http://api.drupal.org/api/file/developer/examples/node_example.module > has not been upgraded to show how to use the schema api. > > I am interested in updating this page, which has been so helpful to > me, to include a hook_schema implementation and some > drupal_write_record calls. I did the initial update just to figure out how the schema stuff works and at that point I don't think drupal_write_record() had been committed. Help with the documentation is always welcome so feel free to dig in. > How and where is this documentation stored? What is the best way for > me to make my proposed changes so they can be reviewed by the > community and maintainer? The documentation is stored in the contrib CVS repository. You can browse it via the web here: http://cvs.drupal.org/viewvc.py/drupal/contributions/docs/developer/ To check it out code you can follow the directions here: http://drupal.org/node/321 If you've got a Drupal CVS account you can make any changes you'd like... but the preferred workflow (that I'm totally guilty of not following) is to create an issue discussing the changes you like to make in the documentation issue queue: http://drupal.org/project/issues/documentation Post a patch of your changes so any interested parties can review it... give it a day or two and if there's no response and you're confident in your changes you can go ahead and commit them. Make note of the issue number in your commit message so that if a few months down the line someone's trying to figure out what your were thinking with your changes they've got a place to go read more and leave comments. Now if only I could figure out where to stick this write in the drupal.org handbooks.... andrew From damz at prealable.org Thu Jul 10 16:49:39 2008 From: damz at prealable.org (Damien) Date: Thu, 10 Jul 2008 18:49:39 +0200 Subject: [development] Tmp directory In-Reply-To: References: <20080710091006.o3o987amb2qsswoc@mail.progw.org> <20080710122511.upb8aj0v1334k404@mail.progw.org> <4876392C.5020809@disobey.com> Message-ID: On Thu, Jul 10, 2008 at 6:44 PM, mark burdett wrote: > I'm guessing this issue is re: Drupal 5, but in Drupal 6 there is an > over-zealous temp file cleanup, it only allows them to stick around > for 24 minutes. http://drupal.org/node/276018 That's only the cleanup of the {files} table. Temporary files coming from uploads are managed by PHP, and should be automatically removed right at the end of the request (if they have not been moved before that), as described in http://php.net/features.file-upload Other temporary files generated by Drupal modules have to be managed by Drupal. I guess some modules fail to cleanup correctly. Damien -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080710/423f9f45/attachment.htm From jimmydami at gmail.com Thu Jul 10 20:10:33 2008 From: jimmydami at gmail.com (Jim Li) Date: Thu, 10 Jul 2008 16:10:33 -0400 Subject: [development] Future 6.x release schedule? Message-ID: <507611440807101310o2ba3d171vfdb95baa5f31db29@mail.gmail.com> Glad 6.3 is out, and I notice there are approximately more than 60 patches get into 6.3 release. Though I don't know how many of these fixed issues are critical, it raises the question to me that do we want to review release schedule for 6.x? I know it's been discussed before, but can we reconsider it, especially given that 7.x release is pushed out to maybe mid 2009? If my understanding is correct, current policy or practice on old rev release is not until a security bug surfaces. It works okay when release cycles are relatively short (I think 5.0 was release 10.5 months after 4.7). But sometimes, I still, guilty as it is, can't wait to see some security bugs are found, not only because drupal is safer but more to the fact that other critical patches get a chance to get into the official release. But even so, without a release schedule, it's sort of hard to plan my time or soliciting help on certain critical 6.x issues. So what do you think if we have some sort of flexible but known schedule for future 6.x release, by either set a tentative target date, like Nov 1th or every 4-6 months or when critical bug fixes have accumulated to a certain number, then 6.4 will be released? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080710/bdb4da1f/attachment-0001.htm From web at ramiro.org Thu Jul 10 20:35:18 2008 From: web at ramiro.org (=?ISO-8859-1?Q?Ramiro_G=F3mez?=) Date: Thu, 10 Jul 2008 22:35:18 +0200 Subject: [development] Future 6.x release schedule? In-Reply-To: <507611440807101310o2ba3d171vfdb95baa5f31db29@mail.gmail.com> References: <507611440807101310o2ba3d171vfdb95baa5f31db29@mail.gmail.com> Message-ID: <48767286.9000102@ramiro.org> In this particular case many people will be happy about the release, because the latest release candidates of views 2 and cck 2 do not work with Drupal 6.2. But I don't think it makes any sense to have a schedule for bug fix releases. This would somehow implicate that you know in advance when critical bugs get detected. > Glad 6.3 is out, and I notice there are approximately more than 60 > patches get into 6.3 release. -- Ramiro G?mez Software-Entwickler und IT-Berater mit den Schwerpunkten Content-Management-Systeme, SEO und Open Source. ------------------------------------------------------------ Software developer with focus on content management systems, SEO, and open source. E-Mail: web at ramiro.org Phone: +49-30-46065288 (Berlin, Germany) Websites: www.ramiro.org www.seo-expert-blog.com www.torlaune.de From mike at mikeyp.net Thu Jul 10 20:58:01 2008 From: mike at mikeyp.net (Michael Prasuhn) Date: Thu, 10 Jul 2008 13:58:01 -0700 Subject: [development] Future 6.x release schedule? In-Reply-To: <507611440807101310o2ba3d171vfdb95baa5f31db29@mail.gmail.com> References: <507611440807101310o2ba3d171vfdb95baa5f31db29@mail.gmail.com> Message-ID: <40F4865A-624F-47D7-9E27-5CD53F305C42@mikeyp.net> On Jul 10, 2008, at 1:10 PM, Jim Li wrote: > But even so, without a release schedule, it's sort of hard to plan > my time or soliciting help on certain critical 6.x issues. I would have to recommend that if you are aware of critical issues in Drupal 6 that the time to fix, or help is always now. An issue won't take more time to fix now or later, and it does help people that follow 6.x-dev. I have always wondered if when a branch is closed out, such as 5 will be when Drupal 7 is released, if a final release will be made made wrapping up any unreleased commits to that branch. For a while I assumed that would be the case, but I realized that I've never found that documented anywhere. -Mike _________________ Michael Prasuhn mike at mikeyp.net http://mikeyp.net From stefan at borchert.cc Thu Jul 10 21:28:34 2008 From: stefan at borchert.cc (Stefan Borchert) Date: Thu, 10 Jul 2008 23:28:34 +0200 Subject: [development] new maintainer wanted for module linktocontent Message-ID: <48767F02.9060109@borchert.cc> Hi. After trying several weeks to find some time to implement all the ideas [1] I've got in mind for the next release of linktocontent [2] (or even start porting the module to 6.x) I must admit: I don't have some. If someone feels strong enough (:-)) to take the module and give it the love and attention it needs, please contact me. I will try to give as many assistance you need to push development of linktocontent. thanks, Stefan [1] http://drupal.org/project/issues?projects=74128&states=1,16,8,13,14,15,2,4&categories=task [2] http://drupal.org/project/linktocontent From mail at webthatworks.it Thu Jul 10 21:49:15 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Thu, 10 Jul 2008 23:49:15 +0200 Subject: [development] Future 6.x release schedule? In-Reply-To: <48767286.9000102@ramiro.org> References: <507611440807101310o2ba3d171vfdb95baa5f31db29@mail.gmail.com> <48767286.9000102@ramiro.org> Message-ID: <20080710234915.0bc0cab0@dawn.webthatworks.it> On Thu, 10 Jul 2008 22:35:18 +0200 Ramiro G?mez wrote: > In this particular case many people will be happy about the > release, because the latest release candidates of views 2 and cck > 2 do not work with Drupal 6.2. > But I don't think it makes any sense to have a schedule for bug > fix releases. This would somehow implicate that you know in > advance when critical bugs get > detected. http://en.wikipedia.org/wiki/Patch_Tuesday#Exploit_Wednesday The "Exploit Wednesday" theory is questionable. If it is true that good sysadmin (shops with more resources) will patch ASAP, it is equally true that good cracker will exploit a vulnerability ASAP. On the other side shop with less resources will find easier to know when a patch will be available (preferably not on Saturday night[1]) On the down side a weakness may stay on the wild longer if you wait the scheduled release of patches. I think avoiding to release patches at Saturday or during important holidays, but still ASAP, should be enough to make every respectable shop happy. After all even if some people may deserve it, no one will really enjoy an army of p0wned Drupal sites... or even if they were not Drupal... an army of cracked sites is not going to make any good to anyone, unless you enjoy spam. [1] somewhere in the world will always be night, but at least you could avoid Saturday. -- Ivan Sergio Borgonovo http://www.webthatworks.it From hdeelstra at gmail.com Thu Jul 10 21:55:24 2008 From: hdeelstra at gmail.com (Heine Deelstra) Date: Thu, 10 Jul 2008 23:55:24 +0200 Subject: [development] Future 6.x release schedule? In-Reply-To: <20080710234915.0bc0cab0@dawn.webthatworks.it> References: <507611440807101310o2ba3d171vfdb95baa5f31db29@mail.gmail.com> <48767286.9000102@ramiro.org> <20080710234915.0bc0cab0@dawn.webthatworks.it> Message-ID: On Thu, 10 Jul 2008 23:49:15 +0200, Ivan Sergio Borgonovo wrote: > On Thu, 10 Jul 2008 22:35:18 +0200 > Ramiro G?mez wrote: > http://en.wikipedia.org/wiki/Patch_Tuesday#Exploit_Wednesday > [snip] > I think avoiding to release patches at Saturday or during important > holidays, but still ASAP, should be enough to make every respectable > shop happy.. > [snip] > [1] somewhere in the world will always be night, but at least you > could avoid Saturday. I'm sure we are going off on a tangent here. However, scheduled security releases are on Wednesdays only. Regards, Heine Deelstra -- http://heine.familiedeelstra.com/about From miriam at mail.snunit.k12.il Fri Jul 11 09:43:00 2008 From: miriam at mail.snunit.k12.il (Miriam Natanzon) Date: Fri, 11 Jul 2008 12:43:00 +0300 Subject: [development] Tmp directory In-Reply-To: Message-ID: Thanks for your all responses! I'm using Drupal 5.7, and understood Drupal core and also Drupal cron didn't take care of that issue of deleting old unused files from Tmp... I think it's the right place because I didn't expect Drupal to fix it in this version and wonder if someone develop a script fix it. I saw there files with "tmp_" prefix (machine names) and also files with human-names. ( Someone guessed there is an module that upload files and didn't care of deleting the temporary files, It's can be the audio module in my site.. ) Miriam. -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org]On Behalf Of mark burdett Sent: Thursday, July 10, 2008 7:44 PM To: development at drupal.org Subject: Re: [development] Tmp directory I'm guessing this issue is re: Drupal 5, but in Drupal 6 there is an over-zealous temp file cleanup, it only allows them to stick around for 24 minutes. http://drupal.org/node/276018 --mark On Thu, Jul 10, 2008 at 9:30 AM, Morbus Iff wrote: >>> It is a development request to the extent that this may be a "bug by >>> design"; what is supposed to happen to the tmp files? Are people who may >>> not >>> be system admin gurus supposed to know that these files accumulate, and >>> what >>> to do with them? >> >> But the OP didn't raise a development topic; it was a topic of support. >> There is a different list for that. > > I'm on the fence. Largely: > > * if Drupal is leaving tmp files around, something has gone wrong > at a high enough level that we probably /can't/ "fix it" by > removing the temp files. > > * most servers have a tmpwatch utility of some kind that automatically > purges left over files. This, of course, presumes that Drupal's temp > directory remains at the default /tmp. If it's moved elsewhere, then > Drupal becomes responsible for cleaning up the files (and we'd > probably want to implement some sort of post-cleanup in a cron). > > -- > Morbus Iff ( and think about the bad things that I didn't do ) > 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 davidgoode at gmail.com Fri Jul 11 13:40:05 2008 From: davidgoode at gmail.com (David Goode) Date: Fri, 11 Jul 2008 09:40:05 -0400 Subject: [development] Drupal 7 node_load and node_save caching behavior bug Message-ID: <30c386450807110640y1d3621aagd5651e77c15ff43@mail.gmail.com> Hello fellow developers, In fixing an error related to the notifications module in Drupal 5 and 6, I came across an unexpected behavior that merits discussion, and possibly a fix in Drupal 7, as the functionality doesn't appear to have changed. The immediate issue is on pages such as the node edit form when using the notifications module with immediate sending, but applies in many other places. It occurs when these actions occur sequentially, which is quite commonplace: 1: a node_load is performed for [nid] 2: a node_save is performed on the same [nid], updating the database accordingly 3: either during the nodeapi('update') hook or afterwards, a node_load is performed on [nid] When number 3 occurs, it will load the OLD node, prior to the update, because the node will have been CACHED in the static variable of the node_load function. ------------------------------ ----------------------------------------------- I believe this generally hasn't been found to be a problem because the new $node is passed around through all the update hooks, so node_loads aren't generally required. However, I came across the problem in fixing an issue for the notifications module (http://drupal.org/node/278530). What happens is notifications_content_nodeapi adds an event to the queue, but the $node object is not passed around. If notifications is set to send immediately, it will call the sending stack, which does a node_load on the node and creates the message. However, it was sending the old message when an update event occurred (because it had been cached), causing a user to report the issue. For notifications I have fixed this issue by simply node_loading and telling it to clear the cache in notifications_content_nodeapi. However, I wonder whether a better default behavior would be to have node_save clear the cache itself? I don't know of modules that depend on either 1) showing the old node throughout the page after a node_save or 2) showing the same version of the node in two places, between which a node_save is performed. However, if there are any they might be affected by this change. Either way, I believe it merits discussion. Also, if it is to be performed, it is a very simple fix: node_load(0, NULL, TRUE); but I am not very familiar with the rationale behind the node_save, node_save_revision, drupal_write_record etc functions in drupal 7, so perhaps there is a better place to put it than just in the node_save function somewhere. It could even be in an optional module that is called on nodeapi('update') with a very low weight. David Goode davidgoode at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080711/869eaf4e/attachment.htm From rob at robshouse.net Fri Jul 11 13:52:49 2008 From: rob at robshouse.net (Robert Douglass) Date: Fri, 11 Jul 2008 15:52:49 +0200 Subject: [development] Drupal 7 node_load and node_save caching behavior bug In-Reply-To: <30c386450807110640y1d3621aagd5651e77c15ff43@mail.gmail.com> References: <30c386450807110640y1d3621aagd5651e77c15ff43@mail.gmail.com> Message-ID: At first blush I think it is correct that node_save should flush the node_load cache. I was bitten by this behavior recently as well. > However, I wonder whether a better default behavior would be to have > node_save clear the cache itself? From damz at prealable.org Fri Jul 11 14:24:24 2008 From: damz at prealable.org (Damien) Date: Fri, 11 Jul 2008 16:24:24 +0200 Subject: [development] Drupal 7 node_load and node_save caching behavior bug In-Reply-To: References: <30c386450807110640y1d3621aagd5651e77c15ff43@mail.gmail.com> Message-ID: >> However, I wonder whether a better default behavior would be to have node_save clear the cache itself? This issue has been around for a long time, and is linked to the way Drupal use static variables for caching: http://drupal.org/node/221081 for Drupal 5 http://drupal.org/node/111127 a proposal to cache node_load() The best answer so far is the 'static cache facility': http://drupal.org/node/254491 the static cache facility Damien Tournoud http://drupal.org/user/22211 From mistknight at gmail.com Fri Jul 11 15:54:52 2008 From: mistknight at gmail.com (Ashraf Amayreh) Date: Fri, 11 Jul 2008 18:54:52 +0300 Subject: [development] programmatic creation of node In-Reply-To: <6117a7500803080842r2ed2a565t7ece726c41fe18f7@mail.gmail.com> References: <200803081653.51308.aron@novaak.net> <6117a7500803080842r2ed2a565t7ece726c41fe18f7@mail.gmail.com> Message-ID: Quoting Moshe Weitzman > In drupal5, you should call hook_node_submit() and > hook_nodeapi('submit') before node_save(). that will assure that any > group info gets saved (for example). > > In d6 this is not needed since those submit hooks became > hook_nodeapi(pre_save) and that happens from within node_save(). > > drupal_execute is also a valid way. the node_load() is a little > expensive but this is a very clean way to proceed. if it is working > for you, i would proceed like this. The documentation to convert hook_submit to drupal 6 says to add $form['#submit'], not to create a nodeapi(presave). I'm a bit confused here. Should I convert my hook_submits to nodeapi(presave) or should I simple add $form['#submit'] to the form? I believe if I change it to nodeapi(presave) then I won't need to call hook_node_submit() before calling node_save() as this would be taken care by the presave call in node_save(). But it seems that even in drupal 6, if I use $form['#submit'] I'll still have to do a call to the hook_node_submit() before calling node_save(). Am I missing something here? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080711/c205b644/attachment.htm From drupal-devel at webchick.net Fri Jul 11 18:48:18 2008 From: drupal-devel at webchick.net (Angela Byron) Date: Fri, 11 Jul 2008 14:48:18 -0400 Subject: [development] HELP: Need a new mentor for the Document API SoC project Message-ID: <4877AAF2.5030505@webchick.net> Ken Rickard needs to step down for a bit and take care of some personal stuff that came up suddenly. Dan DeGeest is on as backup mentor, but we really need someone to step in and take over as primary mentor while Ken takes care of some stuff. The project is Document Import API - http://drupal.org/project/docapi. The idea is to be able to import files from a variety of office programs such as OOo, Word, and Excel. The student is Christopher Bradford, who was a SoC student last year, so knows Drupal, but needs help with hammering out the various interactions. Some design documentation has already been created at http://groups.drupal.org/files/DocImport_Process2.png to give you an idea. We basically need someone fluent in file handling, XML formats, and that sort of thing. Any takers? -Angie From darrel.opry at gmail.com Fri Jul 11 23:28:21 2008 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Fri, 11 Jul 2008 19:28:21 -0400 Subject: [development] Tmp directory In-Reply-To: References: Message-ID: Just a note for developers who write modules that create temporary files... I've found that a register_shutdown_function('file_delete', realpath($path_to_file)) is pretty dependable for cleaning up... note the use of realpath, it's necessary for shutdown functions and file_delete has the file_exists check in it to prevent errors in the shutdown phase.. .darrel. On Fri, Jul 11, 2008 at 5:43 AM, Miriam Natanzon wrote: > Thanks for your all responses! > > I'm using Drupal 5.7, and understood Drupal core and also Drupal cron > didn't > take care of that issue of deleting old unused files from Tmp... > I think it's the right place because I didn't expect Drupal to fix it in > this version and wonder if someone develop a script fix it. > I saw there files with "tmp_" prefix (machine names) and also files with > human-names. > ( Someone guessed there is an module that upload files and didn't care of > deleting the temporary files, It's can be the audio module in my site.. ) > > > > Miriam. > > > -----Original Message----- > From: development-bounces at drupal.org > [mailto:development-bounces at drupal.org]On Behalf Of mark burdett > Sent: Thursday, July 10, 2008 7:44 PM > To: development at drupal.org > Subject: Re: [development] Tmp directory > > I'm guessing this issue is re: Drupal 5, but in Drupal 6 there is an > over-zealous temp file cleanup, it only allows them to stick around > for 24 minutes. http://drupal.org/node/276018 > > --mark > > On Thu, Jul 10, 2008 at 9:30 AM, Morbus Iff wrote: > >>> It is a development request to the extent that this may be a "bug by > >>> design"; what is supposed to happen to the tmp files? Are people who > may > >>> not > >>> be system admin gurus supposed to know that these files accumulate, and > >>> what > >>> to do with them? > >> > >> But the OP didn't raise a development topic; it was a topic of support. > >> There is a different list for that. > > > > I'm on the fence. Largely: > > > > * if Drupal is leaving tmp files around, something has gone wrong > > at a high enough level that we probably /can't/ "fix it" by > > removing the temp files. > > > > * most servers have a tmpwatch utility of some kind that automatically > > purges left over files. This, of course, presumes that Drupal's temp > > directory remains at the default /tmp. If it's moved elsewhere, then > > Drupal becomes responsible for cleaning up the files (and we'd > > probably want to implement some sort of post-cleanup in a cron). > > > > -- > > Morbus Iff ( and think about the bad things that I didn't do ) > > 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 > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080711/4aec0d3a/attachment.htm From kyle at codeincarnate.com Sun Jul 13 05:22:17 2008 From: kyle at codeincarnate.com (Kyle Cunningham) Date: Sun, 13 Jul 2008 00:22:17 -0500 Subject: [development] HELP: Need a new mentor for the Document API SoC project In-Reply-To: <4877AAF2.5030505@webchick.net> References: <4877AAF2.5030505@webchick.net> Message-ID: <48799109.4070208@codeincarnate.com> Hey Angie, I don't think that I'm qualified to be a primary mentor, but I'd certainly be happy to help offer advice and find solutions to problems at least for a little while. I am pretty fluent in file handling, and reasonable with at least the PHP side of XML. If that sounds OK with you please let me know. Best, Kyle Cunningham Angela Byron wrote: > Ken Rickard needs to step down for a bit and take care of some > personal stuff that came up suddenly. > > Dan DeGeest is on as backup mentor, but we really need someone to step > in and take over as primary mentor while Ken takes care of some stuff. > > The project is Document Import API - http://drupal.org/project/docapi. > The idea is to be able to import files from a variety of office > programs such as OOo, Word, and Excel. > > The student is Christopher Bradford, who was a SoC student last year, > so knows Drupal, but needs help with hammering out the various > interactions. > > Some design documentation has already been created at > http://groups.drupal.org/files/DocImport_Process2.png to give you an > idea. > > We basically need someone fluent in file handling, XML formats, and > that sort of thing. > > Any takers? > > -Angie From karoly at negyesi.net Sun Jul 13 07:46:39 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Sun, 13 Jul 2008 09:46:39 +0200 (CEST) Subject: [development] HELP: Need a new mentor for the Document API SoC project In-Reply-To: <4877AAF2.5030505@webchick.net> References: <4877AAF2.5030505@webchick.net> Message-ID: I often help SoCers in IRC, regardless he is my student or not. And every SoCer is welcome to ask. Christopher even has my Skype address as I mentored him last year. While I can't take on another full mentorship but as a general fallback, I am here.My SimpleXML-fu is not that strong but I know a gotcha or two there, too. From kika at trip.ee Sun Jul 13 08:41:16 2008 From: kika at trip.ee (Kristjan Jansen) Date: Sun, 13 Jul 2008 11:41:16 +0300 Subject: [development] 'usability' component in issue queue Message-ID: <37a603d00807130141s43af512dhbee01c95bbc73e04@mail.gmail.com> Re: catch comment on: http://groups.drupal.org/node/12972#comment-41948 -- how to get more spotlight to 'usability' component http://drupal.org/project/issues?projects=3060&components=usability&states=1,16,8,13,14,15,2,4 ? So how to make sure that 1) issue submitters know when mark items as 'usability' (there are always be edge cases -- is evey UI-affecting patch is a usability patch or not? Is copywriting a better usabiliity?) 2) kludgy polluting of issue namespace with "Usability: " finally ends 3) old usability issues will be correctly marked? Ideas? PS. Infrastructure list is possibly better place for this so sorry for a spam. Kristjan Jansen / Kika kika.trip.ee From earnie at users.sourceforge.net Sun Jul 13 14:27:09 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Sun, 13 Jul 2008 10:27:09 -0400 Subject: [development] 'usability' component in issue queue In-Reply-To: <37a603d00807130141s43af512dhbee01c95bbc73e04@mail.gmail.com> References: <37a603d00807130141s43af512dhbee01c95bbc73e04@mail.gmail.com> Message-ID: <20080713102709.4pcqcfzrtsg8sgsc@mail.progw.org> Quoting Kristjan Jansen : > > 3) old usability issues will be correctly marked? > > Ideas? > Perhaps reword "Usability" to "Ease of Use" to make it clearer in what is meant. > PS. Infrastructure list is possibly better place for this so sorry > for a spam. > I think this is the correct list. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From gerhard at killesreiter.de Sun Jul 13 17:21:29 2008 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Sun, 13 Jul 2008 19:21:29 +0200 Subject: [development] 'usability' component in issue queue In-Reply-To: <37a603d00807130141s43af512dhbee01c95bbc73e04@mail.gmail.com> References: <37a603d00807130141s43af512dhbee01c95bbc73e04@mail.gmail.com> Message-ID: <487A3999.4090700@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kristjan Jansen schrieb: > Re: catch comment on: > http://groups.drupal.org/node/12972#comment-41948 -- how to get > more spotlight to 'usability' component > http://drupal.org/project/issues?projects=3060&components=usability&states=1,16,8,13,14,15,2,4 > ? > > So how to make sure that > > 1) issue submitters know when mark items as 'usability' > (there are always be edge cases -- is evey UI-affecting patch is a > usability patch or not? Is copywriting a better usabiliity?) > > 2) kludgy polluting of issue namespace with "Usability: " finally ends > > 3) old usability issues will be correctly marked? > > Ideas? > > PS. Infrastructure list is possibly better place for this so sorry for a spam. Please file an issue: http://drupal.org/node/add/project_issue/infrastructure Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIejmZfg6TFvELooQRAtZ2AKC7OkA3nchtwxrHJmogbg7ejf2tEgCfUG/d XSDm9XuT4IGnYtUU4TDkZOI= =fvQ8 -----END PGP SIGNATURE----- From mistknight at gmail.com Sun Jul 13 21:41:07 2008 From: mistknight at gmail.com (Ashraf Amayreh) Date: Mon, 14 Jul 2008 00:41:07 +0300 Subject: [development] HELP: Need a new mentor for the Document API SoC project In-Reply-To: References: <4877AAF2.5030505@webchick.net> Message-ID: I too can't take on full mentorship but I've worked on simpleXML intensively and would try to be of any help I can. Here's my skype username aamayreh On Sun, Jul 13, 2008 at 10:46 AM, Karoly Negyesi wrote: > I often help SoCers in IRC, regardless he is my student or not. And every > SoCer is welcome to ask. Christopher even has my Skype address as I mentored > him last year. While I can't take on another full mentorship but as a > general fallback, I am here.My SimpleXML-fu is not that strong but I know a > gotcha or two there, too. > -- Ashraf Amayreh http://blogs.aamayreh.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080714/e59f3ec2/attachment.htm From drupal at samboyer.org Mon Jul 14 06:31:08 2008 From: drupal at samboyer.org (Sam Boyer) Date: Mon, 14 Jul 2008 01:31:08 -0500 Subject: [development] Panels nearly at RC/ready for port, BUT Message-ID: <1216017068.10394.59.camel@thereishope> Hi fellow devs - If you've ever wanted to help with Panels - now's the time! As of tonight, I've crossed off (very nearly) all the items on our list of todos before releasing Panels2 RC1. However, we want to leave -dev basically as-is for the next week, just to be sure, before we officially release RC1. So for all you excellent folks who've said "just let me know how I can help!" over the past few weeks - well, here's how you can help! 1. We need folks to put -dev through some paces in production-like settings - so if you have a heavily panels-based site and could drop the DRUPAL-5--2 branch of Panels onto a test server and poke around with it for an hour or so and let us know of any problems, that'd be VERY helpful. 2. I've got two issues tracking the status of important Panels issues: one is must-have patches for RC1 (http://drupal.org/node/281934) and the other is potentially worthy issues that we don't have time to get to right now (http://drupal.org/node/281829). If anyone feels like hunkering down and working on rolling some patches/testing existing patches in any of those issues, it'd be great. ?The other important thing that Panels2 RC1 means is that Earl and I are now both actively working on the D6 port. Just a heads-up :) Sam From joe.murray at jmaconsulting.biz Mon Jul 14 17:37:17 2008 From: joe.murray at jmaconsulting.biz (Joe Murray) Date: Mon, 14 Jul 2008 13:37:17 -0400 Subject: [development] transferring session info across login event Message-ID: <008a01c8e5d8$436b6ef0$ca424cd0$@murray@jmaconsulting.biz> I have a use case where anonymous users can do a bunch of work, and then at the end request to save it, which requires logging in (and possibly also creating an account). The login event regenerates the session, and so far as I know 5.x does not provide a hook that can be used to copy info from the old session into the new so that it can be saved in a way that is associated with the correct uid. I suppose such a hook so would open up lots of security issues. Still, this is the second time I've confronted this sort of an issue, and I don't know the correct design pattern to handle it in Drupal. Comments and suggestions welcome. Cheers, Joe Murray, PhD President, JMA Consulting @ The Centre for Social Innovation 215 Spadina Ave, Suite 400, Toronto, Ontario, Canada M5T 2C7 416.466.1281, (416) 644-0116 (f) joe.murray at jmaconsulting.biz Skype: josephpmurray -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080714/be9b9012/attachment.htm From drupal at dave-cohen.com Mon Jul 14 23:48:42 2008 From: drupal at dave-cohen.com (Dave Cohen) Date: Mon, 14 Jul 2008 16:48:42 -0700 Subject: [development] drupal_rebuild_form on node preview Message-ID: <200807141648.42980.drupal@dave-cohen.com> I'm running into a problem having to do with drupal_rebuild_form. I hope someone can explain to me what is going on. The symptom, briefly is this: I have a custom form element, with its own #process function. The function relies on $element['#post'] to do some of its magic. In Drupal 5, it works fine. However in Drupal 6, when my form element is in a node form and I hit Preview, things break. On Preview, my process function is called normally, then my process function is called with #post unset (as if the submit button had not been pressed). And the form rendered to the screen is a result of this second invocation. So in trying to debug this I learned about drupal_rebuild_form. I've read the comments, but its still unclear why this function exists. Its also unclear why its being invoked on node preview. Is it because node module is setting $form_state['rebuild']? Most important, can anyone suggest a workaround? Do I have to implement a process function that can somehow detect whether its been called before? Do I have to keep my own copy of #post around? Is FAPI really supposed to process my element twice? Thanks for any help, -Dave From jpetso at gmx.at Tue Jul 15 10:41:44 2008 From: jpetso at gmx.at (Jakob Petsovits) Date: Tue, 15 Jul 2008 12:41:44 +0200 Subject: [development] Wanted: Version Control API maintainer Message-ID: <200807151241.44707.jpetso@gmx.at> Hey list, for the near future, I won't be able to do module maintainership anymore - on Saturday I'm leaving for a month-long trip abroad, and after that I'll be working pretty much exclusively on my diploma thesis. So if I (hopefully) manage to concentrate on the important stuff, you won't be noticing lots of Drupal related activity from my side until next year or so. Filefield is taken care of by dopry, and my other modules are both small and nonessential for the community, I'll trust those to fago and my employer. That leaves Version Control API, which has been my largest undertaking but didn't yet take off as the 5.x-1.x branch had some conceptual issues yet and I wasn't able to finish the 5.x-2.x branch that fixes those with a simplification of concepts and database structure. The Summer of Code project for revamping Version Control API and extending it for usage on drupal.org unfortunately failed as my student disappeared without notice (I heard he's healthy, but on the coding side he's gone for good). So essentially the situation looks like this: If you don't help out then Version Control API is likely to die, drupal.org will keep running on CVS, and all the work will have been for naught. This is a call for help - if Drupal-based support for SVN, Git, Mercurial or Bazaar is of importance to you, then please take care of Version Control API, finish the 2.x release and port it to Drupal 6. It's a considerable amount of code, and for some extension modules it would probably make sense to split them out into separate projects. The only thing that's really crucial at this point is the core API module and the Commit Log. Everything else can be reinstated once these are in good shape again. And of course, major rewards are awaiting you if you take this on. Like, having the own code running on drupal.org once it's ready to run there. If you want to contribute, drop me a note before Saturday, or otherwise get in contact with dww, hunmonk or aclight. Thanks, Jakob P.S.: Bye community, I hope to come back next year! Oh, and see you at the Drupalcon, despite the above :P From jm at poure.com Tue Jul 15 14:17:09 2008 From: jm at poure.com (Jean-Michel =?ISO-8859-1?Q?Pour=E9?=) Date: Tue, 15 Jul 2008 16:17:09 +0200 Subject: [development] Drupal could be 10x times faster with correct indexing In-Reply-To: <4a9fdc630807090536i68b4fb4dtff14156b1baf4959@mail.gmail.com> References: <1214834752.8415.10.camel@debian> <97171690-C491-4139-A637-77E6B02613AC@trellon.com> <4a9fdc630807090536i68b4fb4dtff14156b1baf4959@mail.gmail.com> Message-ID: <1216131429.3496.9.camel@localhost.localdomain> Le mercredi 09 juillet 2008 ? 08:36 -0400, Khalid Baheyeldin a ?crit : > If this is a list of users with points for each listed beside their > names, then yes, it has to query the table several times on the page. > Just like user_load or node_load for different users/nodes. > > If you have implemented some sort of smart caching, then we are > looking forward to your patches in the issue queue. This is probably the biggest problem. In logs, I can see 20 times the same query. Kind regards, Jean-Michel From syscrusher at 4th.com Tue Jul 15 22:30:13 2008 From: syscrusher at 4th.com (Syscrusher) Date: Tue, 15 Jul 2008 18:30:13 -0400 Subject: [development] [SOLVED] Question on #theme attribute in D6 FAPI In-Reply-To: <1215682347.10899.65.camel@marcus> References: <1215646354.10899.47.camel@marcus> <1215652974.10899.52.camel@marcus> <1215682347.10899.65.camel@marcus> Message-ID: <1216161013.9883.67.camel@marcus> On Thu, 2008-07-10 at 05:32 -0400, Syscrusher wrote: > On Thu, 2008-07-10 at 02:30 -0400, Darrel O'Pry wrote: > > FAPI and the theme layer are not the same... A theme function must > be > > declared in hook_theme() in order for theme() to call it. FAPI > simply > > calls theme() with the $element. > > Ahhhhhh....that helps a LOT. And indeed it did. I have the function call working perfectly now. For the benefit of others new to D6 and facing the form-theming issue, my code footprint looks like this: In the form generation: $form['my_module']['#theme'] = 'my_module_form'; Implementing hook_theme(): function my_module_theme() { return array( 'my_module_form' => array( 'arguments' => array('element' => NULL), ), ); } Finally, the actual theme function signature: function theme_my_module_form($form) What I was missing was the hook_theme() registration and the fact that the string passed as the #theme value does *not* begin with 'theme_', rather, that is added by the core as it invokes the theme hook. Thanks to all who replied. Scott -- Syscrusher From drupal.beginner at wechange.org Wed Jul 16 03:46:20 2008 From: drupal.beginner at wechange.org (augustin (beginner)) Date: Wed, 16 Jul 2008 11:46:20 +0800 Subject: [development] gotcha: menu wildcards, foreach() and MENU_SUGGESTED_ITEM Message-ID: <200807161146.20332.drupal.beginner@wechange.org> Hello, I just noticed a bug in directory.module, and I see the exact same bug in tagadelic.module. This bug involves the new menu system. In D5, we used to be able to dynamically create a series of menu items with a foreach loop within hook_menu(). When upgrading to D6, the tendency has been to remove the foreach loop, and replace the arg(n) with a wildcard loader, but it is the wrong solution. In most cases, you don't want to remove the foreach() loop you had in D5. Within D6, it is perfectly ok to have a loop, recursively declaring several well defined menu items, e.g. one item for each vocabulary. When you have such a loop, do not use the wildcard loader. For a detailed example see this issue: http://drupal.org/node/283198 I have updated the documentation in the handbook. Blessings, Augustin. From drupal.beginner at wechange.org Wed Jul 16 06:15:05 2008 From: drupal.beginner at wechange.org (augustin (beginner)) Date: Wed, 16 Jul 2008 14:15:05 +0800 Subject: [development] gotcha: menu wildcards, foreach() and MENU_SUGGESTED_ITEM In-Reply-To: <200807161146.20332.drupal.beginner@wechange.org> References: <200807161146.20332.drupal.beginner@wechange.org> Message-ID: <200807161415.05608.drupal.beginner@wechange.org> Hi again, On the issue, crell write: " A foreach loop inside a D6 menu handler is 99% of the time the WRONG way to do it." http://drupal.org/node/283198 Have I stumbled upon the 1% of cases where it's the right thing to do? If you agree with crell and if I am wrong, I certainly would like to know it, and I'll revert the documentation changes I made. What is the proper way to have MENU_SUGGESTED_ITEM with wildcards and without a loop? See the issue for code examples. Thanks, Augustin. From matt at cabinetuk.com Wed Jul 16 09:12:33 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Wed, 16 Jul 2008 10:12:33 +0100 Subject: [development] HTML emails Message-ID: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> I haven't looked at drupal 7 yet, so I'm throwing this out there for discussion. The D6 mail api seems like it's pretty much designed for plain text emails, however, a module's implementation of hook_mail can clearly set the headers of the mail to "Content-Type: text/html; charset=utf-8" and send rich text. For example, I'm looking at using "forward" module for the "email this page" link on a node, and the "simplenews" module, which uses "mimemail" to send rich emails, including attachments. Both "forward" and "mimemail" modules create a html header. The problem occurs when a module implements "drupal_mail_wrapper()" to build a html header when hook_mail has already done that - you can easily end up with bodies like: ... ... etc. Because there are two opportunities to create the html "head" for the message: in hook_mail and drupal_mail_wrapper. I'm throwing this out there for discussion, I think that the hook_mail should construct the message in a similar fashion to the Form API, specifying a theme for rendering the body part of the message (ie what goes in the tag) and anything special that needs to go in the head as attributes. That way the message can be constructed only once. Besides, email clients have been HTML friendly for a *long* time, so I don't see why Drupal shouldn't have an interface that understands rich email messages. Thoughts? Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080716/4e50b4d2/attachment.htm From owahab at owahab.com Wed Jul 16 09:22:49 2008 From: owahab at owahab.com (Omar Abdel-Wahab) Date: Wed, 16 Jul 2008 12:22:49 +0300 Subject: [development] HTML emails In-Reply-To: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> Message-ID: <487DBDE9.3030808@owahab.com> +1 I strongly would love to have D7 send HTML e-mails. At least 20 modules will benefit from this step. Omar Matt Connolly wrote: > I haven't looked at drupal 7 yet, so I'm throwing this out there for > discussion. > > The D6 mail api seems like it's pretty much designed for plain text > emails, however, a module's implementation of hook_mail can clearly set > the headers of the mail to "Content-Type: text/html; charset=utf-8" and > send rich text. > > For example, I'm looking at using "forward" module for the "email this > page" link on a node, and the "simplenews" module, which uses "mimemail" > to send rich emails, including attachments. Both "forward" and > "mimemail" modules create a html header. > > The problem occurs when a module implements "drupal_mail_wrapper()" to > build a html header when hook_mail has already done that - you can > easily end up with bodies like: > > > ... > > ... etc. > > > Because there are two opportunities to create the html "head" for the > message: in hook_mail and drupal_mail_wrapper. > > I'm throwing this out there for discussion, I think that the hook_mail > should construct the message in a similar fashion to the Form API, > specifying a theme for rendering the body part of the message (ie what > goes in the tag) and anything special that needs to go in the > head as attributes. > > That way the message can be constructed only once. > > Besides, email clients have been HTML friendly for a *long* time, so I > don't see why Drupal shouldn't have an interface that understands rich > email messages. > > Thoughts? > > > Matt > > From marolijo at yahoo.es Wed Jul 16 09:35:51 2008 From: marolijo at yahoo.es (marolijo - Pol Maresma) Date: Wed, 16 Jul 2008 11:35:51 +0200 Subject: [development] HTML emails In-Reply-To: <487DBDE9.3030808@owahab.com> Message-ID: <911289.32832.bm@omp108.mail.re1.yahoo.com> I tried it but nothing... Where on the database can I delete the module references? Will it work? Thank's -----Mensaje original----- De: development-bounces at drupal.org [mailto:development-bounces at drupal.org] En nombre de Omar Abdel-Wahab Enviado el: dimecres, 16 / juliol / 2008 11:23 Para: development at drupal.org Asunto: Re: [development] HTML emails +1 I strongly would love to have D7 send HTML e-mails. At least 20 modules will benefit from this step. Omar Matt Connolly wrote: > I haven't looked at drupal 7 yet, so I'm throwing this out there for > discussion. > > The D6 mail api seems like it's pretty much designed for plain text > emails, however, a module's implementation of hook_mail can clearly > set the headers of the mail to "Content-Type: text/html; > charset=utf-8" and send rich text. > > For example, I'm looking at using "forward" module for the "email this > page" link on a node, and the "simplenews" module, which uses "mimemail" > to send rich emails, including attachments. Both "forward" and > "mimemail" modules create a html header. > > The problem occurs when a module implements "drupal_mail_wrapper()" to > build a html header when hook_mail has already done that - you can > easily end up with bodies like: > > ... > > ... etc. > > > Because there are two opportunities to create the html "head" for the > message: in hook_mail and drupal_mail_wrapper. > > I'm throwing this out there for discussion, I think that the hook_mail > should construct the message in a similar fashion to the Form API, > specifying a theme for rendering the body part of the message (ie what > goes in the tag) and anything special that needs to go in the > head as attributes. > > That way the message can be constructed only once. > > Besides, email clients have been HTML friendly for a *long* time, so I > don't see why Drupal shouldn't have an interface that understands rich > email messages. > > Thoughts? > > > Matt > > __________ Informaci?n de NOD32, revisi?n 3270 (20080715) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com From marolijo at yahoo.es Wed Jul 16 09:40:17 2008 From: marolijo at yahoo.es (marolijo - Pol Maresma) Date: Wed, 16 Jul 2008 11:40:17 +0200 Subject: [development] HTML emails In-Reply-To: <911289.32832.bm@omp108.mail.re1.yahoo.com> Message-ID: <557458.31377.bm@omp105.mail.re3.yahoo.com> Sorry, I'd replyed incorrect mail... -----Mensaje original----- De: development-bounces at drupal.org [mailto:development-bounces at drupal.org] En nombre de marolijo - Pol Maresma Enviado el: dimecres, 16 / juliol / 2008 11:36 Para: development at drupal.org Asunto: Re: [development] HTML emails I tried it but nothing... Where on the database can I delete the module references? Will it work? Thank's -----Mensaje original----- De: development-bounces at drupal.org [mailto:development-bounces at drupal.org] En nombre de Omar Abdel-Wahab Enviado el: dimecres, 16 / juliol / 2008 11:23 Para: development at drupal.org Asunto: Re: [development] HTML emails +1 I strongly would love to have D7 send HTML e-mails. At least 20 modules will benefit from this step. Omar Matt Connolly wrote: > I haven't looked at drupal 7 yet, so I'm throwing this out there for > discussion. > > The D6 mail api seems like it's pretty much designed for plain text > emails, however, a module's implementation of hook_mail can clearly > set the headers of the mail to "Content-Type: text/html; > charset=utf-8" and send rich text. > > For example, I'm looking at using "forward" module for the "email this > page" link on a node, and the "simplenews" module, which uses "mimemail" > to send rich emails, including attachments. Both "forward" and > "mimemail" modules create a html header. > > The problem occurs when a module implements "drupal_mail_wrapper()" to > build a html header when hook_mail has already done that - you can > easily end up with bodies like: > > ... > > ... etc. > > > Because there are two opportunities to create the html "head" for the > message: in hook_mail and drupal_mail_wrapper. > > I'm throwing this out there for discussion, I think that the hook_mail > should construct the message in a similar fashion to the Form API, > specifying a theme for rendering the body part of the message (ie what > goes in the tag) and anything special that needs to go in the > head as attributes. > > That way the message can be constructed only once. > > Besides, email clients have been HTML friendly for a *long* time, so I > don't see why Drupal shouldn't have an interface that understands rich > email messages. > > Thoughts? > > > Matt > > __________ Informaci?n de NOD32, revisi?n 3270 (20080715) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com __________ Informaci?n de NOD32, revisi?n 3270 (20080715) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com From 4vinoth at gmail.com Wed Jul 16 09:40:58 2008 From: 4vinoth at gmail.com (vin vin) Date: Wed, 16 Jul 2008 15:10:58 +0530 Subject: [development] New Developer - for Tamil from Tamil Nadu-India Message-ID: <6176a14d0807160240vf791442gc2a42056be18411c@mail.gmail.com> Hi Everyone I am Vinoth, New joiner. Please let me know if any one from TamilNadu or for Tamil Development in the Great group. -- vin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080716/062bff94/attachment.htm From catch56 at googlemail.com Wed Jul 16 09:46:37 2008 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Wed, 16 Jul 2008 10:46:37 +0100 Subject: [development] HTML emails In-Reply-To: <487DBDE9.3030808@owahab.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487DBDE9.3030808@owahab.com> Message-ID: There's a patch here that's not had much attention for over a year but would provide better support in core: http://drupal.org/node/28604 You should also look at http://drupal.org/project/mimemail Nat On Wed, Jul 16, 2008 at 10:22 AM, Omar Abdel-Wahab wrote: > +1 > > I strongly would love to have D7 send HTML e-mails. > > At least 20 modules will benefit from this step. > > Omar > > > Matt Connolly wrote: > >> I haven't looked at drupal 7 yet, so I'm throwing this out there for >> discussion. >> >> The D6 mail api seems like it's pretty much designed for plain text >> emails, however, a module's implementation of hook_mail can clearly set the >> headers of the mail to "Content-Type: text/html; charset=utf-8" and send >> rich text. >> >> For example, I'm looking at using "forward" module for the "email this >> page" link on a node, and the "simplenews" module, which uses "mimemail" to >> send rich emails, including attachments. Both "forward" and "mimemail" >> modules create a html header. >> >> The problem occurs when a module implements "drupal_mail_wrapper()" to >> build a html header when hook_mail has already done that - you can easily >> end up with bodies like: >> >> > >> ... >> > > >> ... etc. >> >> >> Because there are two opportunities to create the html "head" for the >> message: in hook_mail and drupal_mail_wrapper. >> >> I'm throwing this out there for discussion, I think that the hook_mail >> should construct the message in a similar fashion to the Form API, >> specifying a theme for rendering the body part of the message (ie what goes >> in the tag) and anything special that needs to go in the head as >> attributes. >> >> That way the message can be constructed only once. >> >> Besides, email clients have been HTML friendly for a *long* time, so I >> don't see why Drupal shouldn't have an interface that understands rich email >> messages. >> >> Thoughts? >> >> >> Matt >> >> >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080716/60c29132/attachment.htm From mail at webthatworks.it Wed Jul 16 10:03:31 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 16 Jul 2008 12:03:31 +0200 Subject: [development] HTML emails In-Reply-To: <487DBDE9.3030808@owahab.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487DBDE9.3030808@owahab.com> Message-ID: <20080716120331.4f03c28e@dawn.webthatworks.it> On Wed, 16 Jul 2008 12:22:49 +0300 Omar Abdel-Wahab wrote: > +1 > > I strongly would love to have D7 send HTML e-mails. > > At least 20 modules will benefit from this step. What would be really lovely would be support both. The only way I've found to turn HTML into "formatted" text was to pipe HTML through w3m. Not a scalable solution. I haven't found any library that could render HTML to text in a decent way. -- Ivan Sergio Borgonovo http://www.webthatworks.it From marolijo at yahoo.es Wed Jul 16 10:29:48 2008 From: marolijo at yahoo.es (marolijo - Pol Maresma) Date: Wed, 16 Jul 2008 12:29:48 +0200 Subject: [development] HTML emails In-Reply-To: <20080716120331.4f03c28e@dawn.webthatworks.it> Message-ID: <718386.67637.bm@omp107.mail.re3.yahoo.com> Thank's! Solved updating to the new beta version and recreating manually the tables. -----Mensaje original----- De: development-bounces at drupal.org [mailto:development-bounces at drupal.org] En nombre de Ivan Sergio Borgonovo Enviado el: dimecres, 16 / juliol / 2008 12:04 Para: development at drupal.org Asunto: Re: [development] HTML emails On Wed, 16 Jul 2008 12:22:49 +0300 Omar Abdel-Wahab wrote: > +1 > > I strongly would love to have D7 send HTML e-mails. > > At least 20 modules will benefit from this step. What would be really lovely would be support both. The only way I've found to turn HTML into "formatted" text was to pipe HTML through w3m. Not a scalable solution. I haven't found any library that could render HTML to text in a decent way. -- Ivan Sergio Borgonovo http://www.webthatworks.it __________ Informacisn de NOD32, revisisn 3270 (20080715) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com From matt at cabinetuk.com Wed Jul 16 10:32:24 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Wed, 16 Jul 2008 11:32:24 +0100 Subject: [development] HTML emails In-Reply-To: References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487DBDE9.3030808@owahab.com> Message-ID: Yes, I am trying to use "mimemail", just ported the code to Drupal 6 yesterday. The problem is that other modules that don't use mimemail duplicate some of its functionality, which makes sense when the module is not present. At the moment, I'm manually re-theming the other modules to not create "" stuff to play nice with mimemail. Ideally, though, you could set html head elements in an array in a similar fashion to for FORM API so that mimemail (or any HTML aware drupal mail module) could interpret and include in the constructed email message in the correct place. ie: returning a structured array instead of a flat string. Although this may be contrary to how theme functions work... It makes sense to me that modules should only create the content that goes in a
tag, just like building a block on the page. However, many modules call drupal_add_css or drupal_add_js which ultimately gets added to the page when it's rendered. I think email generation should have the same ability to include CSS files (which should go in the tag, not a
) I notice that mimemail does in fact get the CSS files from drupal and the current theme (in the absence of a mail.css file) so you can simply call drupal_add_cs() from a theme function that generates email.... just confusing if you're generating an email, and then a resulting page at the same time..... -Matt On 16/07/2008, at 10:46 AM, Nathaniel Catchpole wrote: > There's a patch here that's not had much attention for over a year > but would provide better support in core: http://drupal.org/node/28604 > > You should also look at http://drupal.org/project/mimemail > > Nat > > On Wed, Jul 16, 2008 at 10:22 AM, Omar Abdel-Wahab wrote: > +1 > > I strongly would love to have D7 send HTML e-mails. > > At least 20 modules will benefit from this step. > > Omar > > > Matt Connolly wrote: > I haven't looked at drupal 7 yet, so I'm throwing this out there for > discussion. > > The D6 mail api seems like it's pretty much designed for plain text > emails, however, a module's implementation of hook_mail can clearly > set the headers of the mail to "Content-Type: text/html; > charset=utf-8" and send rich text. > > For example, I'm looking at using "forward" module for the "email > this page" link on a node, and the "simplenews" module, which uses > "mimemail" to send rich emails, including attachments. Both > "forward" and "mimemail" modules create a html header. > > The problem occurs when a module implements "drupal_mail_wrapper()" > to build a html header when hook_mail has already done that - you > can easily end up with bodies like: > > > ... > > ... etc. > > > Because there are two opportunities to create the html "head" for > the message: in hook_mail and drupal_mail_wrapper. > > I'm throwing this out there for discussion, I think that the > hook_mail should construct the message in a similar fashion to the > Form API, specifying a theme for rendering the body part of the > message (ie what goes in the tag) and anything special that > needs to go in the head as attributes. > > That way the message can be constructed only once. > > Besides, email clients have been HTML friendly for a *long* time, so > I don't see why Drupal shouldn't have an interface that understands > rich email messages. > > Thoughts? > > > Matt > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080716/4ae107de/attachment.htm From enboig at gmail.com Wed Jul 16 11:15:19 2008 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Wed, 16 Jul 2008 13:15:19 +0200 Subject: [development] HTML emails In-Reply-To: References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487DBDE9.3030808@owahab.com> Message-ID: <45a29f450807160415o35fa554bh92d3e650d65f7f0c@mail.gmail.com> A problem with HTML mails and CSS is that they don't render the same in all mail clients. I have searched a way to convert CSS page into pure HTML (without CSS) before sending it, but I didn't found any way to do so. Maybe something like http://wiki.tcl.tk/12383 but for PHP would make sent mails look better. On Wed, Jul 16, 2008 at 12:32 PM, Matt Connolly wrote: > Yes, I am trying to use "mimemail", just ported the code to Drupal 6 > yesterday. > The problem is that other modules that don't use mimemail duplicate some of > its functionality, which makes sense when the module is not present. > At the moment, I'm manually re-theming the other modules to not create > "" stuff to play nice with mimemail. > Ideally, though, you could set html head elements in an array in a similar > fashion to for FORM API so that mimemail (or any HTML aware drupal mail > module) could interpret and include in the constructed email message in the > correct place. ie: returning a structured array instead of a flat string. > Although this may be contrary to how theme functions work... > > > It makes sense to me that modules should only create the content that goes > in a
tag, just like building a block on the page. However, many > modules call drupal_add_css or drupal_add_js which ultimately gets added to > the page when it's rendered. I think email generation should have the same > ability to include CSS files (which should go in the tag, not a >
) > I notice that mimemail does in fact get the CSS files from drupal and the > current theme (in the absence of a mail.css file) so you can simply call > drupal_add_cs() from a theme function that generates email.... just > confusing if you're generating an email, and then a resulting page at the > same time..... > > -Matt > > On 16/07/2008, at 10:46 AM, Nathaniel Catchpole wrote: > > There's a patch here that's not had much attention for over a year but would > provide better support in core: http://drupal.org/node/28604 > > You should also look at http://drupal.org/project/mimemail > > Nat > > On Wed, Jul 16, 2008 at 10:22 AM, Omar Abdel-Wahab wrote: >> >> +1 >> >> I strongly would love to have D7 send HTML e-mails. >> >> At least 20 modules will benefit from this step. >> >> Omar >> >> Matt Connolly wrote: >>> >>> I haven't looked at drupal 7 yet, so I'm throwing this out there for >>> discussion. >>> >>> The D6 mail api seems like it's pretty much designed for plain text >>> emails, however, a module's implementation of hook_mail can clearly set the >>> headers of the mail to "Content-Type: text/html; charset=utf-8" and send >>> rich text. >>> >>> For example, I'm looking at using "forward" module for the "email this >>> page" link on a node, and the "simplenews" module, which uses "mimemail" to >>> send rich emails, including attachments. Both "forward" and "mimemail" >>> modules create a html header. >>> >>> The problem occurs when a module implements "drupal_mail_wrapper()" to >>> build a html header when hook_mail has already done that - you can easily >>> end up with bodies like: >>> >>> >> >>> ... >>> >> >> >>> ... etc. >>> >>> >>> Because there are two opportunities to create the html "head" for the >>> message: in hook_mail and drupal_mail_wrapper. >>> >>> I'm throwing this out there for discussion, I think that the hook_mail >>> should construct the message in a similar fashion to the Form API, >>> specifying a theme for rendering the body part of the message (ie what goes >>> in the tag) and anything special that needs to go in the head as >>> attributes. >>> >>> That way the message can be constructed only once. >>> >>> Besides, email clients have been HTML friendly for a *long* time, so I >>> don't see why Drupal shouldn't have an interface that understands rich email >>> messages. >>> >>> Thoughts? >>> >>> >>> Matt >>> >>> > > > -- *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *La felicitat ha de ser compatible, compartible i cooperativa. *Envellim quan els records superen les il?lusions. *Als llocs desconeguts nom?s s'hi arriba per camins desconeguts. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From earnie at users.sourceforge.net Wed Jul 16 11:25:07 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 16 Jul 2008 07:25:07 -0400 Subject: [development] New Developer - for Tamil from Tamil Nadu-India In-Reply-To: <6176a14d0807160240vf791442gc2a42056be18411c@mail.gmail.com> References: <6176a14d0807160240vf791442gc2a42056be18411c@mail.gmail.com> Message-ID: <20080716072507.pc1snnquhny88c4c@mail.progw.org> Quoting vin vin <4vinoth at gmail.com>: > Hi Everyone > > I am Vinoth, New joiner. Please let me know if any one from TamilNadu or for > Tamil Development in the Great group. > Did you look here http://qroups.drupal.org? Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From aron at novaak.net Wed Jul 16 13:19:01 2008 From: aron at novaak.net (=?utf-8?q?Nov=C3=A1k_=C3=81ron?=) Date: Wed, 16 Jul 2008 15:19:01 +0200 Subject: [development] GSoC Aggregator patch Message-ID: <200807161519.01754.aron@novaak.net> I rolled out the patch against HEAD aggregator: http://drupal.org/node/236237#comment-923418 I would like to ask everyone interested in aggregation topic: please review it and tell your opinion. Important to know: It will definitely break your tests because the new tests are still under construction and the old ones are not suitable for the modified module. More verbose explanation and instructions can be found at the linked d.o. ticket. If you'd like to see my plans for testing and more: http://drupal.org/node/282570 Thanks, Aron Novak From larry at garfieldtech.com Wed Jul 16 14:47:25 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Wed, 16 Jul 2008 9:47:25 -0500 Subject: [development] =?utf-8?q?gotcha=3A_menu_wildcards=2Cforeach=28=29_?= =?utf-8?q?and_MENU=5FSUGGESTED=5FITEM?= In-Reply-To: <200807161415.05608.drupal.beginner@wechange.org> References: <200807161415.05608.drupal.beginner@wechange.org> Message-ID: <51640e370de36e2eadea19c52cdca034@localhost> On Wed, 16 Jul 2008 14:15:05 +0800, "augustin (beginner)" wrote: > > Hi again, > > On the issue, crell write: > > " A foreach loop inside a D6 menu handler is 99% of the time the WRONG way > to > do it." > http://drupal.org/node/283198 > > Have I stumbled upon the 1% of cases where it's the right thing to do? > If you agree with crell and if I am wrong, I certainly would like to know > it, > and I'll revert the documentation changes I made. > > What is the proper way to have MENU_SUGGESTED_ITEM with wildcards and > without > a loop? > See the issue for code examples. > > > Thanks, > > Augustin. I will defer to chx and pwolanin on this front. I am by and large quoting chx here, who said something very similar to me back in February. I won't say you have definitely not found that 1%, but the whole point of all the fancy math in the menu system is to not have to loop but to simply declare matchable patterns. Looping should be very strongly discouraged. --Larry Garfield From larry at garfieldtech.com Wed Jul 16 14:59:01 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Wed, 16 Jul 2008 9:59:01 -0500 Subject: [development] HTML emails In-Reply-To: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> Message-ID: <2af50bac682c41897554f33ee5e8324a@localhost> On Wed, 16 Jul 2008 10:12:33 +0100, Matt Connolly wrote: > Besides, email clients have been HTML friendly for a *long* time, so I > don't see why Drupal shouldn't have an interface that understands rich > email messages. > > Thoughts? > > > Matt I am going to take the luddite position. Consider yourself warned. :-) HTML email is not, as far as I am aware, an actual standard. It is a de facto convention for a hack of the SMTP protocol using a tool that was never built for it. It also breaks nearly every convention of email usage (at least as far as replies are involved), and wastes gobs and gobs of bandwidth, especially for the increasing number of people on mobile devices. It serves no purpose except to send spam (both legit and not, I am going to call all marketing emails spam even if they are solicited as a debate tactic), which means it is filtered out by mail servers more frequently. They are also a wonderful attack vector for viruses and trojans. As a result, many many email clients don't render HTML email by default, showing a blob of unrecognizable HTML instead. Some moronic mail senders send out HTML emails that have no plaintext version, which makes them unreadable to many people (who do not, in fact, accept HTML email). As others have mentioned, support for anything pos t-HTML 3.2 in email varies widely, and you can't exactly do client targeting over email. Why should we encourage that? As far as I'm concerned, we shouldn't. That said, there may well be advantages to switching to drupal_render() for email messages. I am in general a big fan of structured data remaining structured for as long as possible. The benefit, however, would not be for HTML mail but for, say, easier email attachments. That such a move would make it easier to send HTML email as well, well, that's a side effect I suppose we can live with. --Larry Garfield From darrel.opry at gmail.com Wed Jul 16 16:06:38 2008 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Wed, 16 Jul 2008 12:06:38 -0400 Subject: [development] HTML emails In-Reply-To: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> Message-ID: On Wed, Jul 16, 2008 at 5:12 AM, Matt Connolly wrote: > > Besides, email clients have been HTML friendly for a *long* time, so I > don't see why Drupal shouldn't have an interface that understands rich email > messages. > > Thoughts? > Have you even tried to make an HTML email look the same in multiple email clients? That stuff is impossible... and forget it if you want colored anchors or css support consistently. Heck they don't even send mime attachments consistently... They all do something close to spec... and lets not even get into the quirks of various webmail clients and the pluthera of different versions of MS Outlook in the wild and still supported by MS. You basically have a minimum of 8 different applications that handle HTML slightly differently. There are also major variations per version... If you thought cross browser support was annoying you haven't seen anything yet... apple: mac mail windows: outlook 8 -> present, including express variations. // each outlook seems to use a different combination renderer and mime library. linux: evolution cross platform: eudora mac, eudora pc, thunderbird web: gmail, windows live/hotmail, yahoo but using drupal_render ++ .darrel. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080716/74dbcb71/attachment.htm From development at robuustdesign.nl Wed Jul 16 16:44:35 2008 From: development at robuustdesign.nl (Stefan Nagtegaal) Date: Wed, 16 Jul 2008 18:44:35 +0200 Subject: [development] HTML emails In-Reply-To: References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> Message-ID: <4622D560-2B29-4A19-AAE6-7810611FFCD1@robuustdesign.nl> Op 16 jul 2008, om 18:06 heeft Darrel O'Pry het volgende geschreven: > On Wed, Jul 16, 2008 at 5:12 AM, Matt Connolly > wrote: > > Besides, email clients have been HTML friendly for a *long* time, so > I don't see why Drupal shouldn't have an interface that understands > rich email messages. > > Thoughts? > > Have you even tried to make an HTML email look the same in multiple > email clients? That stuff is impossible... and forget it if you > want colored anchors or css support consistently. Heck they don't > even send mime attachments consistently... They all do something > close to spec... and lets not even get into the quirks of various > webmail clients and the pluthera of different versions of MS Outlook > in the wild and still supported by MS. It isn't impossible! Just use CSS and make sure you have a wrapper div around your HTML- layout, styled with the CSS. The only thing that breaks your e-mails along the different e-mail clients is when you add styling to the ... of your HTML e- mail. Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080716/477b6614/attachment.htm From mail at webthatworks.it Wed Jul 16 16:54:51 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 16 Jul 2008 18:54:51 +0200 Subject: [development] HTML emails In-Reply-To: <2af50bac682c41897554f33ee5e8324a@localhost> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> Message-ID: <20080716185451.5c419f3a@dawn.webthatworks.it> On Wed, 16 Jul 2008 9:59:01 -0500 Larry Garfield wrote: > That said, there may well be advantages to switching to > drupal_render() for email messages. I am in general a big fan of > structured data remaining structured for as long as possible. The I really really would like to avoid HTML emails and I agree with most of your points and they are enough to hate html emails. Anyway it is a very frequently requested feature. I know consistency of rendering of HTML is a hell... but it is still a very frequent request we have to live with. We have a rendering engine that is specialised to render HTML. Even if mobile devices are getting more and more popular, they are getting more and more able to render html as it is. Template system makes much easier to delegate design tasks to non programmers compared to XLS/XML/whatever and building up a more flexible rendering engine may take a long time... why not just provide a way to build up structured emails (attachment, auto inclusion of CSS etc...) and something that just do html2text? BTW I didn't find html2text up to the task. w3m provided the best results in the tools I've used... but there is no w3m library that I know that can be easily integrated in php. Rewriting a text browser in php doesn't look to be easy. -- Ivan Sergio Borgonovo http://www.webthatworks.it From eric.schaefer at eas-consulting.de Wed Jul 16 17:41:58 2008 From: eric.schaefer at eas-consulting.de (Eric-Alexander Schaefer) Date: Wed, 16 Jul 2008 19:41:58 +0200 Subject: [development] HTML emails In-Reply-To: <2af50bac682c41897554f33ee5e8324a@localhost> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> Message-ID: <487E32E6.9090903@eas-consulting.de> Larry Garfield schrieb: > I am going to take the luddite position. Consider yourself warned. :-) Thanks (for your position, not the warning). Plaintext should be the default and HTML _could_ be an option. If HTML is used, it should contain a plaintext version. Eric From allie at pajunas.com Wed Jul 16 18:24:02 2008 From: allie at pajunas.com (Allie Micka) Date: Wed, 16 Jul 2008 13:24:02 -0500 Subject: [development] HTML emails In-Reply-To: References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487DBDE9.3030808@owahab.com> Message-ID: <0EF24D1A-DA36-49BB-AB32-714318396306@pajunas.com> On Jul 16, 2008, at 5:32 AM, Matt Connolly wrote: > At the moment, I'm manually re-theming the other modules to not > create "" stuff to play nice with mimemail. If there's a generalizeable way to do this, I'd be a huge fan of its implementation. Please see http://drupal.org/node/ 121849#comment-915935 for a description of how messages are themed and how to override them. The goal here was to have something that looks consistent without creating a giant themeing task for admins and users; and without any knowledge or assumptions of how a site is themed. By default, Mime Mail includes copies of your CSS information inside of your message's section. In many cases this looks pretty great, but it can lead to some darn large messages. Also, as indicated here, several mail clients don't read the CSS information in the head section. Mostly, this just means gmail and hotmail - see http://www.campaignmonitor.com/css/ It would be super-awesome if someone could help this module - for everyone - by a) attempting to reduce the overall size of included CSS content and b) attempt to migrate some element and style definitions into the body of the message to combat the "gmail problem" Thanks, Allie Micka Advantage Labs, Inc. From allie at pajunas.com Wed Jul 16 18:31:09 2008 From: allie at pajunas.com (Allie Micka) Date: Wed, 16 Jul 2008 13:31:09 -0500 Subject: [development] HTML emails In-Reply-To: <2af50bac682c41897554f33ee5e8324a@localhost> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> Message-ID: <3701E219-5398-466C-BC39-06B33B6A293A@pajunas.com> > That said, there may well be advantages to switching to > drupal_render() for email messages. +1 Also, I think it's more than appropriate to keep HTML-formatting and Mime machinations out of core. However, Drupal can't go around assuming that messages *won't* be HTML until it's ready to send them out, and then do its html-to-text conversion then. Thanks! Allie Micka Advantage Labs, Inc. From ben.lewis at benl.co.uk Wed Jul 16 21:26:38 2008 From: ben.lewis at benl.co.uk (Benjamin Lewis) Date: Wed, 16 Jul 2008 22:26:38 +0100 Subject: [development] HTML emails In-Reply-To: <487E32E6.9090903@eas-consulting.de> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> <487E32E6.9090903@eas-consulting.de> Message-ID: <487E678E.7050800@benl.co.uk> Eric-Alexander Schaefer wrote: > Larry Garfield schrieb: >> I am going to take the luddite position. Consider yourself warned. :-) > > Thanks (for your position, not the warning). > Plaintext should be the default and HTML _could_ be an option. If HTML > is used, it should contain a plaintext version. It MUST contain a plaintext version (per RFC 2119 [1]) [1] http://tools.ietf.org/html/rfc2119 > > Eric -- Benjamin Lewis Fedora Ambassador ben.lewis at benl.co.uk ----------------------------------------------------------------------- http://benl.co.uk./ PGP Key: 0x647E480C "In cases of major discrepancy, it is always reality that got it wrong" -- RFC 1118 -------------- next part -------------- A non-text attachment was scrubbed... Name: ben_lewis.vcf Type: text/x-vcard Size: 206 bytes Desc: not available Url : http://lists.drupal.org/pipermail/development/attachments/20080716/132782be/attachment.vcf -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 897 bytes Desc: OpenPGP digital signature Url : http://lists.drupal.org/pipermail/development/attachments/20080716/132782be/attachment.pgp From larry at garfieldtech.com Thu Jul 17 01:59:29 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Wed, 16 Jul 2008 20:59:29 -0500 Subject: [development] HTML emails In-Reply-To: <487E678E.7050800@benl.co.uk> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487E32E6.9090903@eas-consulting.de> <487E678E.7050800@benl.co.uk> Message-ID: <200807162059.29306.larry@garfieldtech.com> On Wednesday 16 July 2008 4:26:38 pm Benjamin Lewis wrote: > Eric-Alexander Schaefer wrote: > > Larry Garfield schrieb: > >> I am going to take the luddite position. Consider yourself warned. :-) > > > > Thanks (for your position, not the warning). > > Plaintext should be the default and HTML _could_ be an option. If HTML > > is used, it should contain a plaintext version. > > It MUST contain a plaintext version (per RFC 2119 [1]) > > [1] http://tools.ietf.org/html/rfc2119 You're making the naive assumption that people actually follow that requirement. :-) LOTS of email floating about the Net, both legit and spam/trojans, contains HTML and no body. And sending the message twice (plain and HTML) is a slap in the face to anyone on low bandwidth. drupal_render() for mail does have potential advantages. That it may make it easier for *contribs* to send HTML email is a downside I am willing to accept. -- Larry Garfield larry at garfieldtech.com From owahab at owahab.com Thu Jul 17 02:49:16 2008 From: owahab at owahab.com (Omar Abdel-Wahab) Date: Thu, 17 Jul 2008 05:49:16 +0300 Subject: [development] HTML emails In-Reply-To: <200807162059.29306.larry@garfieldtech.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487E32E6.9090903@eas-consulting.de> <487E678E.7050800@benl.co.uk> <200807162059.29306.larry@garfieldtech.com> Message-ID: <487EB32C.6080307@owahab.com> I'd go for allowing users to choose the e-mail format they prefer to receive in their account screen. Omar Larry Garfield wrote: > On Wednesday 16 July 2008 4:26:38 pm Benjamin Lewis wrote: >> Eric-Alexander Schaefer wrote: >>> Larry Garfield schrieb: >>>> I am going to take the luddite position. Consider yourself warned. :-) >>> Thanks (for your position, not the warning). >>> Plaintext should be the default and HTML _could_ be an option. If HTML >>> is used, it should contain a plaintext version. >> It MUST contain a plaintext version (per RFC 2119 [1]) >> >> [1] http://tools.ietf.org/html/rfc2119 > > You're making the naive assumption that people actually follow that > requirement. :-) LOTS of email floating about the Net, both legit and > spam/trojans, contains HTML and no body. And sending the message twice > (plain and HTML) is a slap in the face to anyone on low bandwidth. > > drupal_render() for mail does have potential advantages. That it may make it > easier for *contribs* to send HTML email is a downside I am willing to > accept. > From karoly at negyesi.net Thu Jul 17 04:02:08 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Thu, 17 Jul 2008 06:02:08 +0200 (CEST) Subject: [development] gotcha: menu wildcards, foreach() and MENU_SUGGESTED_ITEM In-Reply-To: <200807161146.20332.drupal.beginner@wechange.org> References: <200807161146.20332.drupal.beginner@wechange.org> Message-ID: > In most cases, you DO want to remove the foreach() loop you had in D5. there, I fixed for you :) > Within D6, it is ALMOST NEVER NEEDED TO HAVE a loop, recursively declaring several > well defined menu items, e.g. one item for each vocabulary. When you have > such a loop, DO use the wildcard loader. there, I fixed for you :) You forgot about the distinction of router items and menu links. You will want to use a single router item and save several links with menu_link_save as you see fit. Regards Karoly Negyesi From drupal.beginner at wechange.org Thu Jul 17 04:28:41 2008 From: drupal.beginner at wechange.org (augustin (beginner)) Date: Thu, 17 Jul 2008 12:28:41 +0800 Subject: [development] gotcha: menu wildcards, foreach() and MENU_SUGGESTED_ITEM In-Reply-To: References: <200807161146.20332.drupal.beginner@wechange.org> Message-ID: <200807171228.41913.drupal.beginner@wechange.org> On Thursday 17 July 2008 12:02:08 Karoly Negyesi wrote: > You forgot about the distinction of router items and menu links. You will > want to use a single router item and save several links with menu_link_save > as you see fit. Ah, yes! Not knowing too much about the internals, I was looking at it from the perspective of a module developer and what was possible using hook_menu() only. Thank you very much for your feedback. I have updated the issue with a copy of your comment: http://drupal.org/node/283198 And since this problem is not particularly obvious, I have updated my handbook edits to correspond to the sanctioned solution: http://drupal.org/node/103114 http://drupal.org/node/109153 Thanks again to Larry and Karoly for their comments. Blessings, Augustin. P.S. to Larry: I guess I *still* need my beginner handle for a while longer, after all... ;) From pwolanin at gmail.com Thu Jul 17 15:38:12 2008 From: pwolanin at gmail.com (Peter Wolanin) Date: Thu, 17 Jul 2008 11:38:12 -0400 Subject: [development] gotcha: menu wildcards, foreach() and MENU_SUGGESTED_ITEM In-Reply-To: <200807171228.41913.drupal.beginner@wechange.org> References: <200807161146.20332.drupal.beginner@wechange.org> <200807171228.41913.drupal.beginner@wechange.org> Message-ID: <2247a8a70807170838o6d7adf17i6156244c4b2630cf@mail.gmail.com> Menu module is one example in core where several links are created and added to the navigation menu. For some things like node types, we probably could have done the same (rather than using a foreach) but we had also hit the "don't fix it if it works" phase of the core cycle. -Peter On Thu, Jul 17, 2008 at 12:28 AM, augustin (beginner) wrote: > On Thursday 17 July 2008 12:02:08 Karoly Negyesi wrote: >> You forgot about the distinction of router items and menu links. You will >> want to use a single router item and save several links with menu_link_save >> as you see fit. > > Ah, yes! > Not knowing too much about the internals, I was looking at it from the > perspective of a module developer and what was possible using hook_menu() > only. > > Thank you very much for your feedback. > > I have updated the issue with a copy of your comment: > http://drupal.org/node/283198 > > And since this problem is not particularly obvious, I have updated my handbook > edits to correspond to the sanctioned solution: > http://drupal.org/node/103114 > http://drupal.org/node/109153 > > > > Thanks again to Larry and Karoly for their comments. > > > Blessings, > > Augustin. > > P.S. to Larry: I guess I *still* need my beginner handle for a while longer, > after all... ;) > > From barry at jaspan.org Thu Jul 17 15:58:03 2008 From: barry at jaspan.org (Barry Jaspan) Date: 17 Jul 2008 11:58:03 -0400 Subject: [development] no date / time types in schema API In-Reply-To: <200807021818.56356.drupal.beginner@wechange.org> References: <200807021818.56356.drupal.beginner@wechange.org> Message-ID: "augustin (beginner)" writes: > All (but one) SQL dialects have a date type. However, Drupal's > Schema API does not seem to have a type for date only: > http://drupal.org/node/159605 > > Is this a purposeful omission? What workarounds do you use? It is not so much a purposeful omission as a problem I did not put effort into solving because, when I asked, no one told me it mattered. To have a Schema API type for dates and times require that it be able to map meaningfully to a native db type on all dbs we want to support. I thought that date and time types would be inconsistent between various dbs. I did put in one type, datetime, that works on mysql and pgsql, but did not try to find portable types for time and date separately. That said, there is a workaround: You can declare db-specific column types in the Schema API field structure, using mysql_type and pgsql_type, like this: $schema['mytable'] = array( 'fields' => array( 'mycolumn' => array('mysql_type' => 'date', 'pgsql_type' => 'whatever', ....))); > There is probably a better way to truncate the time part (please > say), but it feels a shame to have to deal with the extraneous time > part when Schema API could easily handle date types. If you have a specific suggestion for what the Schema API date and time related types should be and how they should map to mysql and pgsql native types, by all means submit an issue at d.o. Thanks, Barry From eric.schaefer at eas-consulting.de Thu Jul 17 17:21:21 2008 From: eric.schaefer at eas-consulting.de (Eric-Alexander Schaefer) Date: Thu, 17 Jul 2008 19:21:21 +0200 Subject: [development] HTML emails In-Reply-To: <487E678E.7050800@benl.co.uk> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> <487E32E6.9090903@eas-consulting.de> <487E678E.7050800@benl.co.uk> Message-ID: <487F7F91.2010908@eas-consulting.de> Benjamin Lewis schrieb: > It MUST contain a plaintext version (per RFC 2119 [1]) Well, then we should call the RFC-Swat, because 1001 MUAs don't care a bit about it. ;-) Eric From sepeck at gmail.com Thu Jul 17 20:00:30 2008 From: sepeck at gmail.com (Steven Peck) Date: Thu, 17 Jul 2008 13:00:30 -0700 Subject: [development] HTML emails In-Reply-To: <200807162059.29306.larry@garfieldtech.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487E32E6.9090903@eas-consulting.de> <487E678E.7050800@benl.co.uk> <200807162059.29306.larry@garfieldtech.com> Message-ID: On Wed, Jul 16, 2008 at 6:59 PM, Larry Garfield wrote: > On Wednesday 16 July 2008 4:26:38 pm Benjamin Lewis wrote: >> Eric-Alexander Schaefer wrote: >> > Larry Garfield schrieb: >> >> I am going to take the luddite position. Consider yourself warned. :-) >> > >> > Thanks (for your position, not the warning). >> > Plaintext should be the default and HTML _could_ be an option. If HTML >> > is used, it should contain a plaintext version. >> >> It MUST contain a plaintext version (per RFC 2119 [1]) >> >> [1] http://tools.ietf.org/html/rfc2119 > > You're making the naive assumption that people actually follow that > requirement. :-) LOTS of email floating about the Net, both legit and > spam/trojans, contains HTML and no body. And sending the message twice > (plain and HTML) is a slap in the face to anyone on low bandwidth. > > -- > Larry Garfield > larry at garfieldtech.com > Urban legends aside, actually it is not a naive assumption, it's a valid one and the referenced RFC is a good starting point for anyone wanting to develop a valid message format. The vast majority of spam filters will in fact block as spam malformed messages. A message is considered malformed if it only has HTML content and no text component. The percentage in gross terms of malformed messages (particularly deliberate spam) is fairly low to the overall percentage of email. We block approximately 85-90% of the incoming email where I work as spam and of that 85-90% less than 2% is triggered as malformed. It is a mid-sized environment with about 30 million messages in the last month. In the early days of spam (where simple word filters roamed free as the tool of choice), malformed messages were not tested for and as a result spammers used that technique for a while. While sending HTML messages is in fact harder on low bandwidth recipients, HTML messages are a fact of life and there is a portion of a given customer base that does in fact want to use it. From ben.lewis at benl.co.uk Thu Jul 17 21:03:50 2008 From: ben.lewis at benl.co.uk (Benjamin Lewis) Date: Thu, 17 Jul 2008 22:03:50 +0100 Subject: [development] HTML emails In-Reply-To: References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <487E32E6.9090903@eas-consulting.de> <487E678E.7050800@benl.co.uk> <200807162059.29306.larry@garfieldtech.com> Message-ID: <487FB3B6.4040707@benl.co.uk> Steven Peck wrote: > On Wed, Jul 16, 2008 at 6:59 PM, Larry Garfield wrote: >> On Wednesday 16 July 2008 4:26:38 pm Benjamin Lewis wrote: >>> Eric-Alexander Schaefer wrote: >>>> Larry Garfield schrieb: >>>>> I am going to take the luddite position. Consider yourself warned. :-) >>>> Thanks (for your position, not the warning). >>>> Plaintext should be the default and HTML _could_ be an option. If HTML >>>> is used, it should contain a plaintext version. >>> It MUST contain a plaintext version (per RFC 2119 [1]) >>> >>> [1] http://tools.ietf.org/html/rfc2119 >> You're making the naive assumption that people actually follow that >> requirement. :-) LOTS of email floating about the Net, both legit and >> spam/trojans, contains HTML and no body. And sending the message twice >> (plain and HTML) is a slap in the face to anyone on low bandwidth. >> >> -- >> Larry Garfield >> larry at garfieldtech.com >> > > Urban legends aside, actually it is not a naive assumption, it's a > valid one and the referenced RFC is a good starting point for anyone > wanting to develop a valid message format. The vast majority of spam > filters will in fact block as spam malformed messages. A message is > considered malformed if it only has HTML content and no text > component. The percentage in gross terms of malformed messages I also hate it when I receive messages that say something like: "You need to upgrade your mail client to see HTML messages" That is not, imho, a good enough text component and it would be really good if this could _also_ be avoided. > (particularly deliberate spam) is fairly low to the overall percentage > of email. We block approximately 85-90% of the incoming email where I > work as spam and of that 85-90% less than 2% is triggered as > malformed. It is a mid-sized environment with about 30 million > messages in the last month. In the early days of spam (where simple > word filters roamed free as the tool of choice), malformed messages > were not tested for and as a result spammers used that technique for a > while. Exactly, so it is absolutely paramount that we output well-formed messages. > > While sending HTML messages is in fact harder on low bandwidth > recipients, HTML messages are a fact of life and there is a portion of > a given customer base that does in fact want to use it. -- Benjamin Lewis Fedora Ambassador ben.lewis at benl.co.uk ----------------------------------------------------------------------- http://benl.co.uk./ PGP Key: 0x647E480C "In cases of major discrepancy, it is always reality that got it wrong" -- RFC 1118 -------------- next part -------------- A non-text attachment was scrubbed... Name: ben_lewis.vcf Type: text/x-vcard Size: 196 bytes Desc: not available Url : http://lists.drupal.org/pipermail/development/attachments/20080717/61be9590/attachment.vcf -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 897 bytes Desc: OpenPGP digital signature Url : http://lists.drupal.org/pipermail/development/attachments/20080717/61be9590/attachment.pgp From support at corp.scour.com Thu Jul 17 15:43:08 2008 From: support at corp.scour.com (Sambasiva Rao) Date: Thu, 17 Jul 2008 08:43:08 -0700 (PDT) Subject: [development] Scour.com invite from Sambasiva Rao Message-ID: <20080717192838.EC9834736A5@www1.scour.com> Hey, Did you hear about Scour? It is the next gen search engine with Google/Yahoo/MSN results and user comments all on one page. Best of all we get paid for using it by earning points with every search, comment and vote. The points are redeemable for Visa gift cards! It's like earning credit card or airline points just for searching! Hit the link below to join for free and we will both get points! http://scour.com/invite/sanaari/ I know you'll like it! - Sambasiva Rao From info at 33rdprime.com Fri Jul 18 00:39:14 2008 From: info at 33rdprime.com (Patrick Teglia) Date: Thu, 17 Jul 2008 18:39:14 -0600 Subject: [development] Scour.com invite from Sambasiva Rao In-Reply-To: <20080717192838.EC9834736A5@www1.scour.com> References: <20080717192838.EC9834736A5@www1.scour.com> Message-ID: And I am wondering why this is on this list? Patrick Teglia On Thu, Jul 17, 2008 at 9:43 AM, Sambasiva Rao wrote: > Hey, > > Did you hear about Scour? It is the next gen search engine with > Google/Yahoo/MSN results and user comments all on one page. Best of all we > get paid for using it by earning points with every search, comment and vote. > The points are redeemable for Visa gift cards! It's like earning credit card > or airline points just for searching! Hit the link below to join for free > and we will both get points! > > http://scour.com/invite/sanaari/ > > I know you'll like it! > > - Sambasiva Rao > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080717/eb527a9c/attachment.htm From cwgordon7 at cwgordon.com Fri Jul 18 02:18:32 2008 From: cwgordon7 at cwgordon.com (Charlie Gordon) Date: Thu, 17 Jul 2008 22:18:32 -0400 Subject: [development] Scour.com invite from Sambasiva Rao In-Reply-To: References: <20080717192838.EC9834736A5@www1.scour.com> Message-ID: <487FFD78.3050809@cwgordon.com> Because it's spam? Maybe the development list should be minimally moderated, just so this sort of thing doesn't get through (as well as the occasional support request, etc). Patrick Teglia wrote: > And I am wondering why this is on this list? From drupal at oadaeh.net Fri Jul 18 05:49:14 2008 From: drupal at oadaeh.net (Jason Flatt) Date: Thu, 17 Jul 2008 22:49:14 -0700 Subject: [development] Scour.com invite from Sambasiva Rao In-Reply-To: <487FFD78.3050809@cwgordon.com> References: <20080717192838.EC9834736A5@www1.scour.com> <487FFD78.3050809@cwgordon.com> Message-ID: <200807172249.14854.drupal@oadaeh.net> On Thu Jul 17 2008 7:18:32 pm Charlie Gordon wrote: > Because it's spam? > > Maybe the development list should be minimally moderated, just so this > sort of thing doesn't get through (as well as the occasional support > request, etc). > With as little time as people have to do the important tasks, like database, server and search optimization, I think it would be a bad idea to try and moderate this list. I get far more spam from my d.o account than I do from this list. -- Jason Flatt http://www.oadaeh.net/ Father of Six: http://www.flattfamily.com/ (Joseph, 15; Cramer, 13; Travis, 11; Angela; Harry, 8; and William, 2) Linux User: http://www.kubuntu.org/ Drupal Fanatic: http://drupal.org/ From syscrusher at 4th.com Fri Jul 18 12:07:45 2008 From: syscrusher at 4th.com (Syscrusher) Date: Fri, 18 Jul 2008 08:07:45 -0400 Subject: [development] Scour.com invite from Sambasiva Rao In-Reply-To: <200807172249.14854.drupal@oadaeh.net> References: <20080717192838.EC9834736A5@www1.scour.com> <487FFD78.3050809@cwgordon.com> <200807172249.14854.drupal@oadaeh.net> Message-ID: <1216382865.9883.136.camel@marcus> On Thu, 2008-07-17 at 22:49 -0700, Jason Flatt wrote: > With as little time as people have to do the important tasks, like > database, > server and search optimization, I think it would be a bad idea to try > and > moderate this list. I get far more spam from my d.o account than I do > from > this list. How about setting the list so that each new subscriber's first post needs moderation, but subsequent posts don't? That's what I do on public lists I admin, and it works well with minimal moderator attention. If their first post is spam, you drop the subscription and delete it. If not, then you clear the moderation flag and let them run free. Scott -- Syscrusher From michael at favias.org Fri Jul 18 15:51:05 2008 From: michael at favias.org (Michael Favia) Date: Fri, 18 Jul 2008 10:51:05 -0500 Subject: [development] Scour.com invite from Sambasiva Rao In-Reply-To: References: <20080717192838.EC9834736A5@www1.scour.com> Message-ID: <4880BBE9.2030902@favias.org> Patrick Teglia wrote: > And I am wondering why this is on this list? FWIW i doubt he was trying to even send it to this list but instead used one of those contact list importers that social network providers have and we were collateral damage. Lets give him the benefit of the doubt and chalk it up to the equivalent of a cellphone ringing in during a speech. Annoying but not malicious nor requiring draconian action. Then again if he sends another one for Amway products I say we burn him at the stake with all the other witches. -- Michael Favia michael at favias.org tel. 512.585.5650 http://www.favias.org From rob at robshouse.net Fri Jul 18 20:36:50 2008 From: rob at robshouse.net (Robert Douglass) Date: Fri, 18 Jul 2008 22:36:50 +0200 Subject: [development] Memcache critical issues blocking D6 upgrade Message-ID: Anyone interested in the health and future of the memcache module: Please look at the critical issues for memcache DRUPAL-5--1-7: http://tinyurl.com/5flw54 I want to make a DRUPAL-5--1-8 release that fixes these issues before upgrading to Drupal 6. Please lend your support. Robert Douglass rob at robshouse.net The RobsHouse.net Newsletter: http://robshouse.net/newsletter/robshousenet-newsletter From rob at robshouse.net Fri Jul 18 22:10:49 2008 From: rob at robshouse.net (Robert Douglass) Date: Sat, 19 Jul 2008 00:10:49 +0200 Subject: [development] Advcache module needs some love. Message-ID: <5ED12048-62B1-4A14-A9B8-2E91F93868A4@robshouse.net> Hi all, I'd like to do a DRUPAL-5--1-8 release of advcache but there are some bugs. I could use eyeballs on the queue. When we get the queue down I'll look into a DRUPAL-6 version. http://tinyurl.com/5q4537 Robert Douglass rob at robshouse.net The RobsHouse.net Newsletter: http://robshouse.net/newsletter/robshousenet-newsletter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080719/fa677619/attachment.htm From catch56 at googlemail.com Fri Jul 18 22:25:38 2008 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Fri, 18 Jul 2008 23:25:38 +0100 Subject: [development] Memcache critical issues blocking D6 upgrade In-Reply-To: References: Message-ID: How does this fit in with cacherouter? http://drupal.org/project/cacherouter On Fri, Jul 18, 2008 at 9:36 PM, Robert Douglass wrote: > Anyone interested in the health and future of the memcache module: > From rob at robshouse.net Sat Jul 19 04:49:02 2008 From: rob at robshouse.net (Robert Douglass) Date: Sat, 19 Jul 2008 06:49:02 +0200 Subject: [development] Memcache critical issues blocking D6 upgrade In-Reply-To: References: Message-ID: At the moment there isn't much coordination between cacherouter and memcache. If cacherouter were made in a pluggable way that could simply absorb new caching modules and route between them it would be easier to coordinate. I don't know if this is the case. On Jul 19, 2008, at 12:25 AM, Nathaniel Catchpole wrote: > How does this fit in with cacherouter? http://drupal.org/project/cacherouter > > > On Fri, Jul 18, 2008 at 9:36 PM, Robert Douglass wrote: >> Anyone interested in the health and future of the memcache module: >> From pec.sumit at gmail.com Sat Jul 19 23:47:23 2008 From: pec.sumit at gmail.com (sumit kataria) Date: Sun, 20 Jul 2008 05:17:23 +0530 Subject: [development] Scour.com invite from Sambasiva Rao In-Reply-To: <4880BBE9.2030902@favias.org> References: <20080717192838.EC9834736A5@www1.scour.com> <4880BBE9.2030902@favias.org> Message-ID: yeah may be Scour contacts import thing pulled this mail address from his contact list ;) But spam will remain spam sad behavior sanari9 at gmail.com On Fri, Jul 18, 2008 at 9:21 PM, Michael Favia wrote: > Patrick Teglia wrote: > >> And I am wondering why this is on this list? >> > > FWIW i doubt he was trying to even send it to this list but instead used > one of those contact list importers that social network providers have and > we were collateral damage. Lets give him the benefit of the doubt and chalk > it up to the equivalent of a cellphone ringing in during a speech. Annoying > but not malicious nor requiring draconian action. Then again if he sends > another one for Amway products I say we burn him at the stake with all the > other witches. > > -- > Michael Favia michael at favias.org > tel. 512.585.5650 http://www.favias.org > -- Warm Regards sumit kataria cell 91-9888546343 www.sumitk.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080720/7a8549f9/attachment.htm From sean at practicalweb.co.uk Sun Jul 20 19:15:14 2008 From: sean at practicalweb.co.uk (Sean Burlington) Date: Sun, 20 Jul 2008 20:15:14 +0100 Subject: [development] HTML emails In-Reply-To: <2af50bac682c41897554f33ee5e8324a@localhost> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> Message-ID: <48838EC2.2090402@practicalweb.co.uk> Larry Garfield wrote: > On Wed, 16 Jul 2008 10:12:33 +0100, Matt Connolly wrote: > >> Besides, email clients have been HTML friendly for a *long* time, so I >> don't see why Drupal shouldn't have an interface that understands rich >> email messages. >> >> Thoughts? >> >> >> Matt > > I am going to take the luddite position. Consider yourself warned. :-) > > HTML email is not, as far as I am aware, an actual standard. Well there's this http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html and there's the fact that over half of emails sent are html formatted ;-) > Why should we encourage that? As far as I'm concerned, we shouldn't. > > That said, there may well be advantages to switching to drupal_render() for email messages. I am in general a big fan of structured data remaining structured for as long as possible. The benefit, however, would not be for HTML mail but for, say, easier email attachments. That such a move would make it easier to send HTML email as well, well, that's a side effect I suppose we can live with. > I have just been working on an email that I need Drupal to send which include both tabular data and a graph In Drupal 5 the mimemail module worked a treat for this. Yes I had to work at getting the formatting to work consistently - but then what's new - it's just another dimension to cross browser support. It would be really useful to have the ability to more easily send formatted mail - the more ways too cleanly hook into Drupal's email sending process the better. I don't like HTML email - but I don't dictate my preferences to clients. If they want formatted email with company logos and and 3 pages of legal disclaimers - I may try to inform them of alternatives - but if its what they want and they're paying - it's what I'll provide. -- Sean Burlington www.practicalweb.co.uk From pushyamitra at gmail.com Mon Jul 21 09:26:36 2008 From: pushyamitra at gmail.com (Pushyamitra Navare) Date: Mon, 21 Jul 2008 14:56:36 +0530 Subject: [development] Can I Indicate failure from hook_user? Message-ID: Hello there, I'm new to Drupal, just started a couple of weeks ago. I had following queries regarding hooks. It would be great if someone could provide feedback/suggestions on this. 1. I have written a module which implements "hook_user" and handles "update" and "insert" operations. I want to be able to signal failure/ success from this function. For e.g. if I return failure (boolean FALSE) from "hook_user" for "update" operation, then user update should not happen. I want to do this for "insert", "update" and "delete" operations. * Is it possible to indicate failure in this way so that update/ insert/ delete will not take place? * If yes, how can I accomplish this? 2. Also, I quickly glanced through the user.module. At the top there is a function called "user_module_invoke" which takes care of invoking "hook_user" in various modules. But it does not check for return value, nor does it return anything. So probably result of invoking a hook_user is never checked. If Drupal hooks currently don't check for return value, would it be good idea to add such a functionality? A "pre-operation" hook, which will indicate (boolean TRUE/ FALSE) if the operation should continue or not. Such a hook could be used for various validations when Drupal is integrated with some third-party applications. Any takers for this? Do reply. Thanks in anticipation, Pushyamitra -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080721/dbf0aab1/attachment-0001.htm From enboig at gmail.com Mon Jul 21 09:55:48 2008 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Mon, 21 Jul 2008 11:55:48 +0200 Subject: [development] clone a node Message-ID: <45a29f450807210255u7aaebb6bn1cb6deab4594e69f@mail.gmail.com> I have developed a custom module with custom node types and I need to make users able to clone nodes; would this be a good way to do so? $clone=node_load($value); $clone->is_new = true; $clone->uid = $user->uid; unset($clone->nid); unset($clone->vid); node_save($clone); -- *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *La felicitat ha de ser compatible, compartible i cooperativa. *Envellim quan els records superen les il?lusions. *Als llocs desconeguts nom?s s'hi arriba per camins desconeguts. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From catch56 at googlemail.com Mon Jul 21 09:59:03 2008 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Mon, 21 Jul 2008 10:59:03 +0100 Subject: [development] clone a node In-Reply-To: <45a29f450807210255u7aaebb6bn1cb6deab4594e69f@mail.gmail.com> References: <45a29f450807210255u7aaebb6bn1cb6deab4594e69f@mail.gmail.com> Message-ID: You could take a look at the node_clone module if you haven't already: http://drupal.org/project/node_clone On Mon, Jul 21, 2008 at 10:55 AM, Llu?s wrote: > I have developed a custom module with custom node types and I need to > make users able to clone nodes; would this be a good way to do so? > > $clone=node_load($value); > $clone->is_new = true; > $clone->uid = $user->uid; > unset($clone->nid); > unset($clone->vid); > node_save($clone); > > > -- From darthsteven at gmail.com Mon Jul 21 10:23:16 2008 From: darthsteven at gmail.com (Steven Jones) Date: Mon, 21 Jul 2008 11:23:16 +0100 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: Message-ID: Always good to see someone new to Drupal. Lots of hook return values. You'll probably want to do something with the $op == "validate" argument of hook_user. Throw an error if you don't want the update/insert to continue. Regards Steven Jones On Mon, Jul 21, 2008 at 10:26 AM, Pushyamitra Navare wrote: > Hello there, > > I'm new to Drupal, just started a couple of weeks ago. I had following > queries regarding hooks. It would be great if someone could provide > feedback/suggestions on this. > > 1. I have written a module which implements "hook_user" and handles "update" > and "insert" operations. I want to be able to signal failure/ success from > this function. For e.g. if I return failure (boolean FALSE) from "hook_user" > for "update" operation, then user update should not happen. I want to do > this for "insert", "update" and "delete" operations. > > * Is it possible to indicate failure in this way so that update/ insert/ > delete will not take place? > * If yes, how can I accomplish this? > > 2. Also, I quickly glanced through the user.module. At the top there is a > function called "user_module_invoke" which takes care of invoking > "hook_user" in various modules. But it does not check for return value, nor > does it return anything. So probably result of invoking a hook_user is never > checked. > > If Drupal hooks currently don't check for return value, would it be good > idea to add such a functionality? A "pre-operation" hook, which will > indicate (boolean TRUE/ FALSE) if the operation should continue or not. Such > a hook could be used for various validations when Drupal is integrated with > some third-party applications. Any takers for this? > > Do reply. > Thanks in anticipation, > Pushyamitra From matt at cabinetuk.com Mon Jul 21 11:03:57 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Mon, 21 Jul 2008 12:03:57 +0100 Subject: [development] HTML emails In-Reply-To: <48838EC2.2090402@practicalweb.co.uk> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> <48838EC2.2090402@practicalweb.co.uk> Message-ID: <3EBB8F2C-7565-4245-8C68-0652B27AFE51@cabinetuk.com> That's a great spec for constructing multi part messages, but it doesn't really go in to HTML at all. Is there a standard, for example, for using content-inline-disposition links to use an attached image in the html document? Does HTML email conform to HTML3 HTML4 XHTML1.0, etc? Anyway, I agree that the data should remain structured for as long possible. Perhaps drupal can detect if there's a string (or array of strings) then it's an old school email, or if it's a keyed array of attributes, then construct the multipart message, using drupal render to a default theme or theme function (perhaps specified by a '#theme' key). -Matt On 20/07/2008, at 8:15 PM, Sean Burlington wrote: > > Well there's this > > http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html > > and there's the fact that over half of emails sent are html formatted > > ;-) > >> Why should we encourage that? As far as I'm concerned, we >> shouldn't. That said, there may well be advantages to switching to >> drupal_render() for email messages. I am in general a big fan of >> structured data remaining structured for as long as possible. The >> benefit, however, would not be for HTML mail but for, say, easier >> email attachments. That such a move would make it easier to send >> HTML email as well, well, that's a side effect I suppose we can >> live with. > > I have just been working on an email that I need Drupal to send > which include both tabular data and a graph > > In Drupal 5 the mimemail module worked a treat for this. > > Yes I had to work at getting the formatting to work consistently - > but then what's new - it's just another dimension to cross browser > support. > > It would be really useful to have the ability to more easily send > formatted mail - the more ways too cleanly hook into Drupal's email > sending process the better. > > I don't like HTML email - but I don't dictate my preferences to > clients. > > If they want formatted email with company logos and and 3 pages of > legal disclaimers - I may try to inform them of alternatives - but > if its what they want and they're paying - it's what I'll provide. > > > > > -- > > Sean Burlington > > www.practicalweb.co.uk > From enboig at gmail.com Mon Jul 21 11:44:51 2008 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Mon, 21 Jul 2008 13:44:51 +0200 Subject: [development] clone a node In-Reply-To: References: <45a29f450807210255u7aaebb6bn1cb6deab4594e69f@mail.gmail.com> Message-ID: <45a29f450807210444ka642b5au45595c478cc9b7b8@mail.gmail.com> I have developed a simple group system (similar to OG in some ways, very diferent in others) so I need a user beeing able to import nodes from other groups to his own. To do so I have created a form which loads all the nodes from other groups as checkboxes. The checked items will be cloned to his group. I haven't tried node_clone, but I think it is UI oriented; I just need to clone a node knowing its ID (all group permissions, etc... are rewritten using nodeapi of my custom node). On Mon, Jul 21, 2008 at 11:59 AM, Nathaniel Catchpole wrote: > You could take a look at the node_clone module if you haven't already: > http://drupal.org/project/node_clone > > On Mon, Jul 21, 2008 at 10:55 AM, Llu?s wrote: >> I have developed a custom module with custom node types and I need to >> make users able to clone nodes; would this be a good way to do so? >> >> $clone=node_load($value); >> $clone->is_new = true; >> $clone->uid = $user->uid; >> unset($clone->nid); >> unset($clone->vid); >> node_save($clone); >> >> >> -- > -- *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *La felicitat ha de ser compatible, compartible i cooperativa. *Envellim quan els records superen les il?lusions. *Als llocs desconeguts nom?s s'hi arriba per camins desconeguts. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From morbus at disobey.com Mon Jul 21 12:53:41 2008 From: morbus at disobey.com (Morbus Iff) Date: Mon, 21 Jul 2008 08:53:41 -0400 Subject: [development] Drupal Tough Love #2: Signatures for Forums 5.x-2.3 Message-ID: <488486D5.2080208@disobey.com> In case you missed it, a new Drupal Tough Love is up: http://www.drupaltoughlove.com/review/signatures-for-forums It has caused a few changes, and issues, for Coder.module and core. And there's one issue that I still haven't gotten around to making, which Benjamin Melan?on brings up - core's uid should, in fact, be considered unsigned in all tables, but isn't (ex. node.install). -- Morbus Iff ( i've got the creme filling ) 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 bto108 at psu.edu Mon Jul 21 13:46:12 2008 From: bto108 at psu.edu (Bryan Ollendyke) Date: Mon, 21 Jul 2008 09:46:12 -0400 Subject: [development] clone a node In-Reply-To: <45a29f450807210444ka642b5au45595c478cc9b7b8@mail.gmail.com> References: <45a29f450807210255u7aaebb6bn1cb6deab4594e69f@mail.gmail.com> <45a29f450807210444ka642b5au45595c478cc9b7b8@mail.gmail.com> Message-ID: <89c4d4df0807210646w4a34c03lceb364128899d577@mail.gmail.com> There's a switch statement based ajax function in outline_designer ( http://drupal.org/project/outline_designer) called duplicate. The best way to clone a node is to load it with drupal node_load then clear out the nid. Then call node_save and it'll look at the node, see that there isn't a nid and assign it one. The rest of the fields will be saved via the nodeapi hooks. The function you wrote before looks very similar to the one I used. btopro On Mon, Jul 21, 2008 at 7:44 AM, Llu?s wrote: > I have developed a simple group system (similar to OG in some ways, > very diferent in others) so I need a user beeing able to import nodes > from other groups to his own. > To do so I have created a form which loads all the nodes from other > groups as checkboxes. The checked items will be cloned to his group. > > I haven't tried node_clone, but I think it is UI oriented; I just need > to clone a node knowing its ID (all group permissions, etc... are > rewritten using nodeapi of my custom node). > > > On Mon, Jul 21, 2008 at 11:59 AM, Nathaniel Catchpole > wrote: > > You could take a look at the node_clone module if you haven't already: > > http://drupal.org/project/node_clone > > > > On Mon, Jul 21, 2008 at 10:55 AM, Llu?s wrote: > >> I have developed a custom module with custom node types and I need to > >> make users able to clone nodes; would this be a good way to do so? > >> > >> $clone=node_load($value); > >> $clone->is_new = true; > >> $clone->uid = $user->uid; > >> unset($clone->nid); > >> unset($clone->vid); > >> node_save($clone); > >> > >> > >> -- > > > > > > -- > *La vida ?s com una moneda, la pots gastar en el que vulguis per? > nom?s una vegada. > *La felicitat ha de ser compatible, compartible i cooperativa. > *Envellim quan els records superen les il?lusions. > *Als llocs desconeguts nom?s s'hi arriba per camins desconeguts. > *Abans d'imprimir aquest missatge, pensa en el medi ambient. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080721/00906dcc/attachment.htm From sean at practicalweb.co.uk Mon Jul 21 13:57:12 2008 From: sean at practicalweb.co.uk (Sean Burlington) Date: Mon, 21 Jul 2008 14:57:12 +0100 Subject: [development] HTML emails In-Reply-To: <3EBB8F2C-7565-4245-8C68-0652B27AFE51@cabinetuk.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <2af50bac682c41897554f33ee5e8324a@localhost> <48838EC2.2090402@practicalweb.co.uk> <3EBB8F2C-7565-4245-8C68-0652B27AFE51@cabinetuk.com> Message-ID: <488495B8.7010301@practicalweb.co.uk> Matt Connolly wrote: > That's a great spec for constructing multi part messages, but it doesn't > really go in to HTML at all. > see http://www.w3.org/TR/html4/ ;-) > Is there a standard, for example, for using content-inline-disposition > links to use an attached image in the html document? > see 9.3 Example with relative URIs to embedded GIF pictures http://www.faqs.org/rfcs/rfc2557.html But there's a whole swarm of related RFCs on this subject Each tends to be fairly focussed on a particular subtopic - you have to do a lot of cross referencing to get the full picture > Does HTML email conform to HTML3 HTML4 XHTML1.0, etc? > Surely that depends on the doctype - it's up to the author. Mail clients don't provide very good support of the standards - but the standards do exist. > > Anyway, I agree that the data should remain structured for as long > possible. Perhaps drupal can detect if there's a string (or array of > strings) then it's an old school email, or if it's a keyed array of > attributes, then construct the multipart message, using drupal render to > a default theme or theme function (perhaps specified by a '#theme' key). > that sounds good to me. To render the email will require different CSS Mail client rendering is back in the dark ages - tags and tables for layout are far more common in this area (Bad - yuk - I know - but Drupal should not prevent it). To mitigate against the accessibility issues: sending multipart/alternative AND allowing the user the option of plain text only are both important. mailing to a $user could check the receiving preference - and strip out the formatting if required. -- Sean Burlington www.practicalweb.co.uk From dan at drob.org Mon Jul 21 18:29:50 2008 From: dan at drob.org (Dan Robinson) Date: Mon, 21 Jul 2008 11:29:50 -0700 Subject: [development] Issues with selecting radio buttons with JQuery Message-ID: <4884D59E.2070103@drob.org> Folks, Help appreciated - I'm building a node form where the form will reveal/hide portions depending on the users choices. To do this I'm using jQuery to manipulate the DOM. I'm having a lot of issues with the radio buttons. What I want to do is have a message pop up if the user selects a particular radio button (in this case a "no" choice of a "Yes/No" "set"). For this to work I need to attach an "onClick" handle to the "no" radio button and when the user clicks evaluate and display the message. Because of a series of interrelated issues I've tried a number of approaches. The one I'm working on now is: - I'm using the form APIs "radios" - an issue here is that "radios" define the actual radio buttons in an array and it doesn't look like there is a way to assign an id attribute using the forms api (as a matter of fact there is code in form.inc which explicitly strips out an ID at that level). - I assign an onClick handler to the "radios" - #attributes' => array('onClick' => 'CitizenClick()') - On form load I assign an id to the specific radio button I'm interested in - $("[name=CitizenQ][value=no]").attr('id', 'CitizenNoButton'); - In CitizenClick() I check and take action depending - if ( $("#CitizenNoButton").attr('checked') ) { - Please note that although I could do all this without an "id" and by selecting the "name" instead of the "id" - it was very slow Everything works - EXCEPT - I am placing the radio buttons inside of a fieldset thusly - $form['Qualifyers'] = array( '#type' => 'fieldset', '#tree' => TRUE, '#weight' => 1, ); $form['Qualifyers']['CitizenQ'] = array( '#type' => 'radios', '#title' => t('Are you a U.S. Citizen?'), '#default_value' => 1, '#options' => array('yes' => t('Yes'), 'no' => t('No')), '#attributes' => array('onClick' => 'CitizenClick()'), ); If I don't place it within the fieldset I can select the radio with - $("[name=CitizenQ][value=no]") However withing the fieldset I can't get this to work - $("[name=Qualifyers[CitizenQ]][value=no]") I assumed the above wouldn't work because the "[]" are special characters so I tried escaping them - $("[name=Qualifyers\\[CitizenQ\\]][value=no]") Still no joy - I have been beating my head against this for a while and would appreciate some assistance - also if I've approached this in a fundamentally wrong way please let me know. Thanks! Dan From merlin at logrus.com Mon Jul 21 18:56:32 2008 From: merlin at logrus.com (Earl Miles) Date: Mon, 21 Jul 2008 11:56:32 -0700 Subject: [development] Issues with selecting radio buttons with JQuery In-Reply-To: <4884D59E.2070103@drob.org> References: <4884D59E.2070103@drob.org> Message-ID: <4884DBE0.9070508@logrus.com> Dan Robinson wrote: > Folks, > > Help appreciated - > > I'm building a node form where the form will reveal/hide portions > depending on the users choices. To do this I'm using jQuery to > manipulate the DOM. I'm having a lot of issues with the radio buttons. > > What I want to do is have a message pop up if the user selects a > particular radio button (in this case a "no" choice of a "Yes/No" > "set"). For this to work I need to attach an "onClick" handle to the > "no" radio button and when the user clicks evaluate and display the > message. Because of a series of interrelated issues I've tried a number > of approaches. The one I'm working on now is: > > - I'm using the form APIs "radios" - an issue here is that "radios" > define the actual radio buttons in an array and it doesn't look like > there is a way to assign an id attribute using the forms api (as a > matter of fact there is code in form.inc which explicitly strips out an > ID at that level). > - I assign an onClick handler to the "radios" - #attributes' => > array('onClick' => 'CitizenClick()') > - On form load I assign an id to the specific radio button I'm > interested in - $("[name=CitizenQ][value=no]").attr('id', > 'CitizenNoButton'); > - In CitizenClick() I check and take action depending - if ( > $("#CitizenNoButton").attr('checked') ) { > - Please note that although I could do all this without an "id" and by > selecting the "name" instead of the "id" - it was very slow > > Everything works - EXCEPT - > > I am placing the radio buttons inside of a fieldset thusly - > > $form['Qualifyers'] = array( > '#type' => 'fieldset', > '#tree' => TRUE, > '#weight' => 1, > ); > $form['Qualifyers']['CitizenQ'] = array( > '#type' => 'radios', > '#title' => t('Are you a U.S. Citizen?'), > '#default_value' => 1, > '#options' => array('yes' => t('Yes'), 'no' => t('No')), > '#attributes' => array('onClick' => 'CitizenClick()'), > ); > > If I don't place it within the fieldset I can select the radio with - > > $("[name=CitizenQ][value=no]") > > However withing the fieldset I can't get this to work - > > $("[name=Qualifyers[CitizenQ]][value=no]") > > I assumed the above wouldn't work because the "[]" are special > characters so I tried escaping them - > > $("[name=Qualifyers\\[CitizenQ\\]][value=no]") > > Still no joy - I have been beating my head against this for a while and > would appreciate some assistance - also if I've approached this in a > fundamentally wrong way please let me know. I would recommend setting up a #process so that you can use your own version of expand_radios() -- this will let you set things like the #name and #id of each individual radio option individually. That could allow you to much more easily deal with some of this oddness. From weitzman at tejasa.com Mon Jul 21 18:57:42 2008 From: weitzman at tejasa.com (Moshe Weitzman) Date: Mon, 21 Jul 2008 14:57:42 -0400 Subject: [development] Issues with selecting radio buttons with JQuery In-Reply-To: <4884D59E.2070103@drob.org> References: <4884D59E.2070103@drob.org> Message-ID: <6117a7500807211157g3743684cs2b1f8124cb0ae579@mail.gmail.com> please add your review and support to http://drupal.org/node/215301. You might learn something helpful from og_access.js in HEAD which does some radio button trickery. for example, $("input[@name='og_visibility']:nth(1)").removeAttr('disabled'); On Mon, Jul 21, 2008 at 2:29 PM, Dan Robinson wrote: > Folks, > > Help appreciated - > > I'm building a node form where the form will reveal/hide portions > depending on the users choices. To do this I'm using jQuery to > manipulate the DOM. I'm having a lot of issues with the radio buttons. > > What I want to do is have a message pop up if the user selects a > particular radio button (in this case a "no" choice of a "Yes/No" > "set"). For this to work I need to attach an "onClick" handle to the > "no" radio button and when the user clicks evaluate and display the > message. Because of a series of interrelated issues I've tried a number > of approaches. The one I'm working on now is: > > - I'm using the form APIs "radios" - an issue here is that "radios" > define the actual radio buttons in an array and it doesn't look like > there is a way to assign an id attribute using the forms api (as a > matter of fact there is code in form.inc which explicitly strips out an > ID at that level). > - I assign an onClick handler to the "radios" - #attributes' => > array('onClick' => 'CitizenClick()') > - On form load I assign an id to the specific radio button I'm > interested in - $("[name=CitizenQ][value=no]").attr('id', > 'CitizenNoButton'); > - In CitizenClick() I check and take action depending - if ( > $("#CitizenNoButton").attr('checked') ) { > - Please note that although I could do all this without an "id" and by > selecting the "name" instead of the "id" - it was very slow > > Everything works - EXCEPT - > > I am placing the radio buttons inside of a fieldset thusly - > > $form['Qualifyers'] = array( > '#type' => 'fieldset', > '#tree' => TRUE, > '#weight' => 1, > ); > $form['Qualifyers']['CitizenQ'] = array( > '#type' => 'radios', > '#title' => t('Are you a U.S. Citizen?'), > '#default_value' => 1, > '#options' => array('yes' => t('Yes'), 'no' => t('No')), > '#attributes' => array('onClick' => 'CitizenClick()'), > ); > > If I don't place it within the fieldset I can select the radio with - > > $("[name=CitizenQ][value=no]") > > However withing the fieldset I can't get this to work - > > $("[name=Qualifyers[CitizenQ]][value=no]") > > I assumed the above wouldn't work because the "[]" are special > characters so I tried escaping them - > > $("[name=Qualifyers\\[CitizenQ\\]][value=no]") > > Still no joy - I have been beating my head against this for a while and > would appreciate some assistance - also if I've approached this in a > fundamentally wrong way please let me know. > > Thanks! > > > Dan > > > > > From recidive at gmail.com Mon Jul 21 19:04:01 2008 From: recidive at gmail.com (Henrique Recidive) Date: Mon, 21 Jul 2008 16:04:01 -0300 Subject: [development] Issues with selecting radio buttons with JQuery In-Reply-To: <6117a7500807211157g3743684cs2b1f8124cb0ae579@mail.gmail.com> References: <4884D59E.2070103@drob.org> <6117a7500807211157g3743684cs2b1f8124cb0ae579@mail.gmail.com> Message-ID: <841684fe0807211204r611b326q7232c4b6ac7e936e@mail.gmail.com> This should do the trick: $("input[name='Qualifyers[CitizenQ]'][value=no]") henrique 2008/7/21 Moshe Weitzman : > please add your review and support to http://drupal.org/node/215301. > You might learn something helpful from og_access.js in HEAD which does > some radio button trickery. for example, > > $("input[@name='og_visibility']:nth(1)").removeAttr('disabled'); > > On Mon, Jul 21, 2008 at 2:29 PM, Dan Robinson wrote: >> Folks, >> >> Help appreciated - >> >> I'm building a node form where the form will reveal/hide portions >> depending on the users choices. To do this I'm using jQuery to >> manipulate the DOM. I'm having a lot of issues with the radio buttons. >> >> What I want to do is have a message pop up if the user selects a >> particular radio button (in this case a "no" choice of a "Yes/No" >> "set"). For this to work I need to attach an "onClick" handle to the >> "no" radio button and when the user clicks evaluate and display the >> message. Because of a series of interrelated issues I've tried a number >> of approaches. The one I'm working on now is: >> >> - I'm using the form APIs "radios" - an issue here is that "radios" >> define the actual radio buttons in an array and it doesn't look like >> there is a way to assign an id attribute using the forms api (as a >> matter of fact there is code in form.inc which explicitly strips out an >> ID at that level). >> - I assign an onClick handler to the "radios" - #attributes' => >> array('onClick' => 'CitizenClick()') >> - On form load I assign an id to the specific radio button I'm >> interested in - $("[name=CitizenQ][value=no]").attr('id', >> 'CitizenNoButton'); >> - In CitizenClick() I check and take action depending - if ( >> $("#CitizenNoButton").attr('checked') ) { >> - Please note that although I could do all this without an "id" and by >> selecting the "name" instead of the "id" - it was very slow >> >> Everything works - EXCEPT - >> >> I am placing the radio buttons inside of a fieldset thusly - >> >> $form['Qualifyers'] = array( >> '#type' => 'fieldset', >> '#tree' => TRUE, >> '#weight' => 1, >> ); >> $form['Qualifyers']['CitizenQ'] = array( >> '#type' => 'radios', >> '#title' => t('Are you a U.S. Citizen?'), >> '#default_value' => 1, >> '#options' => array('yes' => t('Yes'), 'no' => t('No')), >> '#attributes' => array('onClick' => 'CitizenClick()'), >> ); >> >> If I don't place it within the fieldset I can select the radio with - >> >> $("[name=CitizenQ][value=no]") >> >> However withing the fieldset I can't get this to work - >> >> $("[name=Qualifyers[CitizenQ]][value=no]") >> >> I assumed the above wouldn't work because the "[]" are special >> characters so I tried escaping them - >> >> $("[name=Qualifyers\\[CitizenQ\\]][value=no]") >> >> Still no joy - I have been beating my head against this for a while and >> would appreciate some assistance - also if I've approached this in a >> fundamentally wrong way please let me know. >> >> Thanks! >> >> >> Dan >> >> >> >> >> > From dan at drob.org Mon Jul 21 20:10:41 2008 From: dan at drob.org (Dan Robinson) Date: Mon, 21 Jul 2008 13:10:41 -0700 Subject: [development] Issues with selecting radio buttons with JQuery In-Reply-To: <4884D59E.2070103@drob.org> References: <4884D59E.2070103@drob.org> Message-ID: <4884ED41.9050609@drob.org> Thanks everyone! - answering all in one to save bits. Earl - > I would recommend setting up a #process so that you can use your own > version of expand_radios() -- this will let you set things like the > #name and #id of each individual radio option individually. That could > allow you to much more easily deal with some of this oddness. Interesting - I'm not sure I completely understand how this works - but I will study up. Moshe - > please add your review and support to http://drupal.org/node/215301. > You might learn something helpful from og_access.js in HEAD which does > some radio button trickery. for example, > > $("input[@name='og_visibility']:nth(1)").removeAttr('disabled'); I would like to help here - I actually looked through this yesterday but couldn't get the patch to work on D6 - so headed in another direction. I'm not working on D7 right now so I'm not sure how to review it - if a patch for D6 appears I could jump on that. Henrique - > This should do the trick: > > $("input[name='Qualifyers[CitizenQ]'][value=no]") > > henrique > yeah baby! - that worked - not sure why the escape didn't - but maybe I'll figure that out later - thanks! Dan > Folks, > > Help appreciated - > > I'm building a node form where the form will reveal/hide portions > depending on the users choices. To do this I'm using jQuery to > manipulate the DOM. I'm having a lot of issues with the radio buttons. > > What I want to do is have a message pop up if the user selects a > particular radio button (in this case a "no" choice of a "Yes/No" > "set"). For this to work I need to attach an "onClick" handle to the > "no" radio button and when the user clicks evaluate and display the > message. Because of a series of interrelated issues I've tried a number > of approaches. The one I'm working on now is: From merlin at logrus.com Mon Jul 21 20:37:13 2008 From: merlin at logrus.com (Earl Miles) Date: Mon, 21 Jul 2008 13:37:13 -0700 Subject: [development] Issues with selecting radio buttons with JQuery In-Reply-To: <4884ED41.9050609@drob.org> References: <4884D59E.2070103@drob.org> <4884ED41.9050609@drob.org> Message-ID: <4884F379.8070809@logrus.com> Dan Robinson wrote: > Thanks everyone! - answering all in one to save bits. > > Earl - >> I would recommend setting up a #process so that you can use your own >> version of expand_radios() -- this will let you set things like the >> #name and #id of each individual radio option individually. That could >> allow you to much more easily deal with some of this oddness. > > Interesting - I'm not sure I completely understand how this works - but > I will study up. While it may be moot as your problem was solved by Henrique, the way checkboxes and radios work is that they automatically have a #process function which expands the checkboxes into multiple form widgets. See: http://api.drupal.org/?q=api/function/expand_radios/head You can do this (at least in D6): '#process' => array('mymodule_expand_radios'), This will override the default #process and call your version of the function instead. From syscrusher at 4th.com Mon Jul 21 21:27:07 2008 From: syscrusher at 4th.com (Syscrusher) Date: Mon, 21 Jul 2008 17:27:07 -0400 Subject: [development] Peculiar behavior of collapsible fieldset titles Message-ID: <1216675627.7280.45.camel@marcus> I've got a set of forms in Drupal 5 that are working correctly but have an odd cosmetic error that I've been unable to track down. The code worked in Drupal 4.7. Basically, I am assigning the title of some collapsible fieldsets dynamically -- specifically, it's a project number and name that result from a database query. The title should look like this: Subtasks for Project #1234 (Redesign Office LAN) For some reason, the titles are perfect when the fieldsets are expanded but empty when collapsed (that is, they look like this): Subtasks for # () I think I know *what* is happening -- that is, the function that builds the $form array is being called twice and has the variable unpopulated one of the two times -- but I'm at a loss to figure out how that could be happening. The database query not only populates the title of the fieldset, but also its very presence depends on a row being retrieved. So I would think that if the database query were somehow being skipped, the fieldset would be entirely missing, not just empty! Has anyone seen something like this before? I realize I haven't given enough detail or code to troubleshoot it entirely -- I'm not asking someone to do my debugging for me, just looking for someone out there who has seen something similar and can tell me in general terms what might be happening. Thanks if anyone has suggestions. Kind regards, Scott -- Syscrusher From jk at ozlabs.org Mon Jul 21 23:36:14 2008 From: jk at ozlabs.org (Jeremy Kerr) Date: Tue, 22 Jul 2008 09:36:14 +1000 Subject: [development] [PATCH] drupal/filter: fix broken multi-line HTML tags Message-ID: <1216683374.199267.203058232764.qpush@pingu> Currently, the filter module will mis-handle HTML tags that span more than one line. For example: link Will be filtered to: This is caused by the attempt to match '.>' in filter_xss(). Since the . doesn't (by default) match a newline, the filter will try to escape the closing > on the tag. This results in aggregated feeds with badly-formed HTML. This change removes the . match, so that a newline as the last character in a opening HTML tag is accepted. So that we always require at least one character in a tag, we also change the [^>]* to [^>]+ Signed-off-by: Jeremy Kerr --- modules/filter/filter.module | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: drupal-6.2/modules/filter/filter.module =================================================================== --- drupal-6.2.orig/modules/filter/filter.module 2008-07-01 09:28:22.000000000 +1000 +++ drupal-6.2/modules/filter/filter.module 2008-07-22 09:24:48.000000000 +1000 @@ -983,7 +983,7 @@ function filter_xss($string, $allowed_ta ( <(?=[^a-zA-Z!/]) # a lone < | # or - <[^>]*.(>|$) # a string that starts with a <, up until the > or the end of the string + <[^>]+(>|$) # a string that starts with a <, up until the > or the end of the string | # or > # just a > )%x', '_filter_xss_split', $string); From darrel.opry at gmail.com Tue Jul 22 00:23:35 2008 From: darrel.opry at gmail.com (Darrel O'Pry) Date: Mon, 21 Jul 2008 20:23:35 -0400 Subject: [development] Peculiar behavior of collapsible fieldset titles In-Reply-To: <1216675627.7280.45.camel@marcus> References: <1216675627.7280.45.camel@marcus> Message-ID: I experienced it, and shook my fist at it in rage... my issue I found to be a typo in some custom CSS though... On Mon, Jul 21, 2008 at 5:27 PM, Syscrusher wrote: > I've got a set of forms in Drupal 5 that are working correctly but have > an odd cosmetic error that I've been unable to track down. The code > worked in Drupal 4.7. > > Basically, I am assigning the title of some collapsible fieldsets > dynamically -- specifically, it's a project number and name that result > from a database query. The title should look like this: > > Subtasks for Project #1234 (Redesign Office LAN) > > For some reason, the titles are perfect when the fieldsets are expanded > but empty when collapsed (that is, they look like this): > > Subtasks for # () > > I think I know *what* is happening -- that is, the function that builds > the $form array is being called twice and has the variable unpopulated > one of the two times -- but I'm at a loss to figure out how that could > be happening. The database query not only populates the title of the > fieldset, but also its very presence depends on a row being retrieved. > So I would think that if the database query were somehow being skipped, > the fieldset would be entirely missing, not just empty! > > Has anyone seen something like this before? I realize I haven't given > enough detail or code to troubleshoot it entirely -- I'm not asking > someone to do my debugging for me, just looking for someone out there > who has seen something similar and can tell me in general terms what > might be happening. > > Thanks if anyone has suggestions. > > Kind regards, > > Scott > -- > Syscrusher > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080721/d655e8c0/attachment.htm From merlin at logrus.com Tue Jul 22 00:36:18 2008 From: merlin at logrus.com (Earl Miles) Date: Mon, 21 Jul 2008 17:36:18 -0700 Subject: [development] [PATCH] drupal/filter: fix broken multi-line HTML tags In-Reply-To: <1216683374.199267.203058232764.qpush@pingu> References: <1216683374.199267.203058232764.qpush@pingu> Message-ID: <48852B82.8070301@logrus.com> Jeremy Kerr wrote: > Currently, the filter module will mis-handle HTML tags that span more > than one line. For example: > > > link > > Will be filtered to: > > >link > > This is caused by the attempt to match '.>' in filter_xss(). Since > the . doesn't (by default) match a newline, the filter will try to > escape the closing > on the tag. > > This results in aggregated feeds with badly-formed HTML. > > This change removes the . match, so that a newline as the last > character in a opening HTML tag is accepted. So that we always require > at least one character in a tag, we also change the [^>]* to [^>]+ > > Signed-off-by: Jeremy Kerr > > --- > > modules/filter/filter.module | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: drupal-6.2/modules/filter/filter.module > =================================================================== > --- drupal-6.2.orig/modules/filter/filter.module 2008-07-01 09:28:22.000000000 +1000 > +++ drupal-6.2/modules/filter/filter.module 2008-07-22 09:24:48.000000000 +1000 > @@ -983,7 +983,7 @@ function filter_xss($string, $allowed_ta > ( > <(?=[^a-zA-Z!/]) # a lone < > | # or > - <[^>]*.(>|$) # a string that starts with a <, up until the > or the end of the string > + <[^>]+(>|$) # a string that starts with a <, up until the > or the end of the string > | # or > > # just a > > )%x', '_filter_xss_split', $string); Your work is respected and appreciated; please, though, can you create an issue in the drupal.org queue against the Drupal project (category filter.module) and attach this patch there? Then set it patch (code needs review). From jk at ozlabs.org Tue Jul 22 00:42:59 2008 From: jk at ozlabs.org (Jeremy Kerr) Date: Tue, 22 Jul 2008 10:42:59 +1000 Subject: [development] [PATCH] drupal/filter: fix broken multi-line HTML tags In-Reply-To: <48852B82.8070301@logrus.com> References: <1216683374.199267.203058232764.qpush@pingu> <48852B82.8070301@logrus.com> Message-ID: <200807221042.59970.jk@ozlabs.org> > Your work is respected and appreciated; please, though, can you > create an issue in the drupal.org queue against the Drupal project > (category filter.module) and attach this patch there? Then set it > patch (code needs review). Sure! will do that now. Cheers, Jeremy From syscrusher at 4th.com Tue Jul 22 01:52:19 2008 From: syscrusher at 4th.com (Syscrusher) Date: Mon, 21 Jul 2008 21:52:19 -0400 Subject: [development] Peculiar behavior of collapsible fieldset titles In-Reply-To: References: <1216675627.7280.45.camel@marcus> Message-ID: <1216691539.7280.64.camel@marcus> On Mon, 2008-07-21 at 20:23 -0400, Darrel O'Pry wrote: > I experienced it, and shook my fist at it in rage... my issue I found > to be a typo in some custom CSS though... Hmmmmm... My module uses a lot of custom CSS also. Perhaps I have the same issue. Could you contact me off-list and describe (or perhaps share the code) the issue you found? My module creates a lot of accounting-like tables, using CSS, so it is entirely possible I have such an issue. If nothing else, thanks for sparking an idea that had not occurred to me otherwise. Kind regards, Scott -- Syscrusher From jazepstein at gmail.com Tue Jul 22 03:36:06 2008 From: jazepstein at gmail.com (Jeremy Epstein) Date: Tue, 22 Jul 2008 13:36:06 +1000 Subject: [development] Issues with selecting radio buttons with JQuery In-Reply-To: <4884DBE0.9070508@logrus.com> References: <4884D59E.2070103@drob.org> <4884DBE0.9070508@logrus.com> Message-ID: Hey Dan, On Tue, Jul 22, 2008 at 4:56 AM, Earl Miles wrote: > I would recommend setting up a #process so that you can use your own version > of expand_radios() -- this will let you set things like the #name and #id of > each individual radio option individually. That could allow you to much more > easily deal with some of this oddness. For some examples of a custom #process callback, see the D6 version of the Category module (currently in Alpha). The category_menu sub-module has two custom overrides of expand_checkboxes(), which are there to add some jQuery to each box in a set of checkboxes (not _exactly_ the same as radios, but pretty close). Cheers, Jaza. From pushyamitra at gmail.com Tue Jul 22 04:03:31 2008 From: pushyamitra at gmail.com (Pushyamitra Navare) Date: Tue, 22 Jul 2008 09:33:31 +0530 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: Message-ID: On Mon, Jul 21, 2008 at 3:53 PM, Steven Jones wrote: > You'll probably want to do something with the $op == "validate" > argument of hook_user. Throw an error if you don't want the > update/insert to continue. Ok, thanks Steven! I will try to see how can I use hook_user's validate operation for my purpose. But can you tell me, is "validate" operation invoked for both "insert" and "update"? If yes, then how do I know in hook_user if it is being called for insert or for update? What parameter of hook_user should I check? I quickly went through documentation but did not find anything. Also, i need such a "validate" hook for "user delete" operation as well. Any way to do that? Thanks, Pushyamitra > On Mon, Jul 21, 2008 at 10:26 AM, Pushyamitra Navare >> If Drupal hooks currently don't check for return value, would it be good >> idea to add such a functionality? A "pre-operation" hook, which will >> indicate (boolean TRUE/ FALSE) if the operation should continue or not. Such >> a hook could be used for various validations when Drupal is integrated with >> some third-party applications. From jcfiala at gmail.com Tue Jul 22 04:09:47 2008 From: jcfiala at gmail.com (John Fiala) Date: Mon, 21 Jul 2008 22:09:47 -0600 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: Message-ID: On Mon, Jul 21, 2008 at 10:03 PM, Pushyamitra Navare wrote: > But can you tell me, is "validate" operation invoked for both "insert" > and "update"? If yes, then how do I know in hook_user if it is being > called for insert or for update? What parameter of hook_user should I > check? I quickly went through documentation but did not find anything. Yes, it's called for any modification of the user. It's an insert if the $account parameter doesn't have a uid, and it's an update if the $account parameter does have a uid. > Also, i need such a "validate" hook for "user delete" operation as > well. Any way to do that? I don't think there is any way - looking at user_delete, it doesn't call hook_user until the user is deleted. -- John Fiala From enboig at gmail.com Tue Jul 22 06:51:59 2008 From: enboig at gmail.com (=?ISO-8859-1?Q?Llu=EDs?=) Date: Tue, 22 Jul 2008 08:51:59 +0200 Subject: [development] clone a node In-Reply-To: <89c4d4df0807210646w4a34c03lceb364128899d577@mail.gmail.com> References: <45a29f450807210255u7aaebb6bn1cb6deab4594e69f@mail.gmail.com> <45a29f450807210444ka642b5au45595c478cc9b7b8@mail.gmail.com> <89c4d4df0807210646w4a34c03lceb364128899d577@mail.gmail.com> Message-ID: <45a29f450807212351p4e86b2fbq7aca1c8ec07995f1@mail.gmail.com> ok, I will do the way I wrote then. Thanks On Mon, Jul 21, 2008 at 3:46 PM, Bryan Ollendyke wrote: > There's a switch statement based ajax function in outline_designer > (http://drupal.org/project/outline_designer) called duplicate. The best way > to clone a node is to load it with drupal node_load then clear out the nid. > Then call node_save and it'll look at the node, see that there isn't a nid > and assign it one. The rest of the fields will be saved via the nodeapi > hooks. The function you wrote before looks very similar to the one I used. > > btopro > > On Mon, Jul 21, 2008 at 7:44 AM, Llu?s wrote: >> >> I have developed a simple group system (similar to OG in some ways, >> very diferent in others) so I need a user beeing able to import nodes >> from other groups to his own. >> To do so I have created a form which loads all the nodes from other >> groups as checkboxes. The checked items will be cloned to his group. >> >> I haven't tried node_clone, but I think it is UI oriented; I just need >> to clone a node knowing its ID (all group permissions, etc... are >> rewritten using nodeapi of my custom node). >> >> >> On Mon, Jul 21, 2008 at 11:59 AM, Nathaniel Catchpole >> wrote: >> > You could take a look at the node_clone module if you haven't already: >> > http://drupal.org/project/node_clone >> > >> > On Mon, Jul 21, 2008 at 10:55 AM, Llu?s wrote: >> >> I have developed a custom module with custom node types and I need to >> >> make users able to clone nodes; would this be a good way to do so? >> >> >> >> $clone=node_load($value); >> >> $clone->is_new = true; >> >> $clone->uid = $user->uid; >> >> unset($clone->nid); >> >> unset($clone->vid); >> >> node_save($clone); >> >> >> >> >> >> -- >> > >> >> >> >> -- >> *La vida ?s com una moneda, la pots gastar en el que vulguis per? >> nom?s una vegada. >> *La felicitat ha de ser compatible, compartible i cooperativa. >> *Envellim quan els records superen les il?lusions. >> *Als llocs desconeguts nom?s s'hi arriba per camins desconeguts. >> *Abans d'imprimir aquest missatge, pensa en el medi ambient. > > -- *La vida ?s com una moneda, la pots gastar en el que vulguis per? nom?s una vegada. *La felicitat ha de ser compatible, compartible i cooperativa. *Envellim quan els records superen les il?lusions. *Als llocs desconeguts nom?s s'hi arriba per camins desconeguts. *Abans d'imprimir aquest missatge, pensa en el medi ambient. From pushyamitra at gmail.com Tue Jul 22 09:46:15 2008 From: pushyamitra at gmail.com (Pushyamitra Navare) Date: Tue, 22 Jul 2008 15:16:15 +0530 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: Message-ID: Ok, cool. Thanks John and Steven! - Pushya On Tue, Jul 22, 2008 at 9:39 AM, John Fiala wrote: > On Mon, Jul 21, 2008 at 10:03 PM, Pushyamitra Navare > wrote: >> But can you tell me, is "validate" operation invoked for both "insert" >> and "update"? If yes, then how do I know in hook_user if it is being >> called for insert or for update? What parameter of hook_user should I >> check? I quickly went through documentation but did not find anything. > > Yes, it's called for any modification of the user. It's an insert if > the $account parameter doesn't have a uid, and it's an update if the > $account parameter does have a uid. > >> Also, i need such a "validate" hook for "user delete" operation as >> well. Any way to do that? > > I don't think there is any way - looking at user_delete, it doesn't > call hook_user until the user is deleted. > > -- > John Fiala > From vuthecuong at luvina.net Tue Jul 22 10:04:55 2008 From: vuthecuong at luvina.net (Vu The Cuong) Date: Tue, 22 Jul 2008 17:04:55 +0700 Subject: [development] can I build multi-hierachy node Message-ID: <3DADD35EDAE49145B9BA1AB44844771160885B@lvsrv_dns.luvina.net> In Drupal I can have simple navigation such as Home->Blog But I want to more deep hierarchy like below: Home->Product->ABCproduct list->When click any link on this list->ABC products detail individual displayed. So my questions are: - Is there a way to implement this without coding? - In order to implement this, do I need to create new content type named Product? If yes, Is there a way to create this content-type without coding? Thanks in advanced. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080722/835061bf/attachment.htm From catch56 at googlemail.com Tue Jul 22 10:13:15 2008 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Tue, 22 Jul 2008 11:13:15 +0100 Subject: [development] can I build multi-hierachy node In-Reply-To: <3DADD35EDAE49145B9BA1AB44844771160885B@lvsrv_dns.luvina.net> References: <3DADD35EDAE49145B9BA1AB44844771160885B@lvsrv_dns.luvina.net> Message-ID: > So my questions are: > > - Is there a way to implement this without coding? If you're asking general site building questions and aren't sure if they require code or not please direct them to http://lists.drupal.org/listinfo/support or the support forum on drupal.org -- However, everything you described could be done with http://drupal.org/project/views - or just the taxonomy module in core. > > - In order to implement this, do I need to create new content type > named Product? Probably. >If yes, > > Is there a way to create this content-type without coding? Yes - admin/content/types Nathaniel From maciej.perlinski at gmail.com Tue Jul 22 10:35:38 2008 From: maciej.perlinski at gmail.com (Maciej Perlinski) Date: Tue, 22 Jul 2008 12:35:38 +0200 Subject: [development] Taxonomy term moderation Message-ID: <58a72c9f0807220335h1e1ebb3by99b03726008151d5@mail.gmail.com> Hello there, i went through all taxonomy associated modules descriptions and haven't found this feature, we need to let users suggest taxonomy term for their entries, if they suggest it their node already has association with it but the term is waiting for approval as soon as term got approved than its shown on in the vocabulary tree and in the node published by the user. Any suggestion on implementation ? should we approach it using db_query rewrite and made possibility to have term published /unpublished state or via making 2 vocabularies and than try to sync them(this seems on the beginning easier but taking into account we will get alot of terms and not all of them will be approved that can lead to pretty inconsistent production vocabulary?) Do you have any experience with similar functionality or any advices ? -- - Mac From bharanikumariyerphp at gmail.com Tue Jul 22 11:05:52 2008 From: bharanikumariyerphp at gmail.com (bharani kumar) Date: Tue, 22 Jul 2008 16:35:52 +0530 Subject: [development] can I build multi-hierachy node In-Reply-To: <3DADD35EDAE49145B9BA1AB44844771160885B@lvsrv_dns.luvina.net> References: <3DADD35EDAE49145B9BA1AB44844771160885B@lvsrv_dns.luvina.net> Message-ID: <2240033d0807220405j251204cfr2850e4757a44cd53@mail.gmail.com> then use the there is a module like dhtml_menu http://drupal.org/project/dhtml_menu i thing this link may help On Tue, Jul 22, 2008 at 3:34 PM, Vu The Cuong wrote: > In Drupal I can have simple navigation such as > > Home->Blog > > But I want to more deep hierarchy like below: > > Home->Product->ABCproduct list->When click any link on this list->ABC > products detail individual displayed. > > > > So my questions are: > > - Is there a way to implement this without coding? > > - In order to implement this, do I need to create new content > type named Product? If yes, > > Is there a way to create this content-type without coding? > > > > Thanks in advanced. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080722/0ae02994/attachment.htm From earnie at users.sourceforge.net Tue Jul 22 13:45:05 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 22 Jul 2008 09:45:05 -0400 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: Message-ID: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> Quoting John Fiala : > > I don't think there is any way - looking at user_delete, it doesn't > call hook_user until the user is deleted. > Well that isn't too friendly. If you don't want the user to be deleted you could use a hook_form_alter to hide or remove the button. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From pushyamitra at gmail.com Tue Jul 22 14:48:11 2008 From: pushyamitra at gmail.com (Pushyamitra Navare) Date: Tue, 22 Jul 2008 20:18:11 +0530 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> References: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> Message-ID: On Tue, Jul 22, 2008 at 7:15 PM, Earnie Boyd wrote: > Well that isn't too friendly. If you don't want the user to be deleted you > could use a hook_form_alter to hide or remove the button. > Well, ideally I would like the pre-user-delete-validate function to be called for every user. If I disable button etc. through hook_form_alter, then either all users will be deleted or none. I won't be able to validate individual users and decide to delete or not delete that user. I actually ended up modifying user.module code and calling my own validate function just before deleting user. Based on validate function's result I either delete the user or just register error. ( The obvious pain would arise when I wish to upgrade to newer Drupal version in future. I would have patch the new user.module as wel. ). For now, it's working... Pushya From anthony at thrillist.com Tue Jul 22 15:00:51 2008 From: anthony at thrillist.com (Anthony Wlodarski) Date: Tue, 22 Jul 2008 11:00:51 -0400 Subject: [development] Proper use of drupal execute to submit a cck node type manually. Message-ID: <4885F623.8030805@thrillist.com> This is my first post on this mailing list so I might as well make it an interesting one... I am currently using drupal_execute to programatically save/update/insert CCK node types. The problem is that the CCK node types never update or get saved. Here is the snippet of code that is having me scratch my head: // we check to see if the item has an existing nid if so then just update the current item if($item['nid'] != 0) { // load the existing node $node = node_load($item['nid']); // we must create the item form manually then call drupal_execute on that $item_form = array(); $item_form['title'] = $item['title']; $item_form['body'] = $item['body_filter']; $item_form['field_item_address1'][0]['value'] = $item['field_item_address1']; $item_form['field_item_date'][0]['value'] = strtotime($item['field_item_date']); //todo the two taxonomies $item_form['field_item_latitude'][0]['value'] = $item['field_item_latitude']; $item_form['field_item_longitude'][0]['value'] = $item['field_item_longitude']; // debug stuff...*/ print "
" . print_r($item, TRUE) . "
##########
"; print "
" . print_r($item_form, TRUE) . 
"
##########
"; print "
" . print_r($node, TRUE) . "
##########
"; //drupal_process_form('item_node_form', $item_form2); $error = drupal_execute('item_node_form', $item_form, $node); print "Error:
$error
"; } else // we have a new item to create { // todo list }
There are a couple of things that we can assume about this piece of code, $item['nid'] != 0 evaluates to true, thus entering the block of code. The $node object is built from node_load() correctly and also the $item_form array matches how the $form_values array would look if I printed it out in a hook_submit() function. I have tried some additional things not mentioned in this block like setting the [op] parameter manually to 'Submit' or 'Update' but to no avail the node does not update. You will notice that I have debugging output in the form of print statements, the results of said print statements are located after this body of text. What is the proper use of drupal_execute()? This would help out immensely as this is a stumbling block for your development schedule right now. Also my source for dreaming up a scheme like this is based on a few lines of lullabot code located at: http://www.lullabot.com/articles/quick_and_dirty_cck_imports. Array ( [title] => Tisk tisk eat my disk... [body_filter] => Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam pulvinar porttitor ante. Pellentesque nulla. Donec pharetra, odio ut fermentum gravida, elit augue dapibus quam, a auctor ligula est eget mauris. Cras bibendum semper tellus. In volutpat vehicula magna. Phasellus in turpis. Suspendisse mollis, lectus eget facilisis mattis, ante purus tincidunt turpis, eu dictum tortor nunc vel justo. Sed consectetuer, sem et aliquet semper, lectus orci gravida nulla, eget faucibus est quam ut neque. Praesent eu mi ac urna facilisis egestas. Ut odio urna, dignissim vel, lacinia non, bibendum vitae, sem. Donec blandit felis at odio. Maecenas ligula magna, porttitor pretium, faucibus eu, aliquet imperdiet, ipsum. Quisque nisi eros, tincidunt nec, posuere at, vestibulum non, magna. Praesent ultrices, velit nec luctus vehicula, sapien ipsum luctus turpis, at porttitor mauris ante et tellus. Duis lobortis. Vestibulum tincidunt tellus in lacus. [neighborhood] => Array ( ) [vertical] => Array ( ) [field_item_address1] => 560 Broadway [field_item_date] => 2008-07-22 00:00:00 [field_item_latitude] => 40.75 [field_item_longitude] => -73.98 [nid] => 326 ) ########## Array ( [title] => Tisk tisk eat my disk... [body] => Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam pulvinar porttitor ante. Pellentesque nulla. Donec pharetra, odio ut fermentum gravida, elit augue dapibus quam, a auctor ligula est eget mauris. Cras bibendum semper tellus. In volutpat vehicula magna. Phasellus in turpis. Suspendisse mollis, lectus eget facilisis mattis, ante purus tincidunt turpis, eu dictum tortor nunc vel justo. Sed consectetuer, sem et aliquet semper, lectus orci gravida nulla, eget faucibus est quam ut neque. Praesent eu mi ac urna facilisis egestas. Ut odio urna, dignissim vel, lacinia non, bibendum vitae, sem. Donec blandit felis at odio. Maecenas ligula magna, porttitor pretium, faucibus eu, aliquet imperdiet, ipsum. Quisque nisi eros, tincidunt nec, posuere at, vestibulum non, magna. Praesent ultrices, velit nec luctus vehicula, sapien ipsum luctus turpis, at porttitor mauris ante et tellus. Duis lobortis. Vestibulum tincidunt tellus in lacus. [field_item_address1] => Array ( [0] => Array ( [value] => 560 Broadway ) ) [field_item_date] => Array ( [0] => Array ( [value] => 1216699200 ) ) [field_item_latitude] => Array ( [0] => Array ( [value] => 40.75 ) ) [field_item_longitude] => Array ( [0] => Array ( [value] => -73.98 ) ) ) ########## stdClass Object ( [nid] => 326 [vid] => 326 [type] => item [status] => 0 [created] => 1216654030 [changed] => 1216664081 [comment] => 0 [promote] => 0 [sticky] => 0 [revision_timestamp] => 1216664081 [title] => This is bananas [body] => Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam pulvinar porttitor ante. Pellentesque nulla. Donec pharetra, odio ut fermentum gravida, elit augue dapibus quam, a auctor ligula est eget mauris. Cras bibendum semper tellus. In volutpat vehicula magna. Phasellus in turpis. Suspendisse mollis, lectus eget facilisis mattis, ante purus tincidunt turpis, eu dictum tortor nunc vel justo. Sed consectetuer, sem et aliquet semper, lectus orci gravida nulla, eget faucibus est quam ut neque. Praesent eu mi ac urna facilisis egestas. Ut odio urna, dignissim vel, lacinia non, bibendum vitae, sem. Donec blandit felis at odio. Maecenas ligula magna, porttitor pretium, faucibus eu, aliquet imperdiet, ipsum. Quisque nisi eros, tincidunt nec, posuere at, vestibulum non, magna. Praesent ultrices, velit nec luctus vehicula, sapien ipsum luctus turpis, at porttitor mauris ante et tellus. Duis lobortis. Vestibulum tincidunt tellus in lacus. [teaser] => Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam pulvinar porttitor ante. Pellentesque nulla. Donec pharetra, odio ut fermentum gravida, elit augue dapibus quam, a auctor ligula est eget mauris. Cras bibendum semper tellus. In volutpat vehicula magna. Phasellus in turpis. Suspendisse mollis, lectus eget facilisis mattis, ante purus tincidunt turpis, eu dictum tortor nunc vel justo. Sed consectetuer, sem et aliquet semper, lectus orci gravida nulla, eget faucibus est quam ut neque. Praesent eu mi ac urna facilisis egestas. [log] => [format] => 1 [uid] => 1 [name] => tech at thrillist.com [picture] => [data] => a:2:{s:8:"editions";a:7:{i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;i:0;}s:15:"default_edition";s:1:"1";} [path] => This is bananas [last_comment_timestamp] => 1216654030 [last_comment_name] => [comment_count] => 0 [taxonomy] => Array ( ) [0] => [field_item_address1] => Array ( [0] => Array ( [value] => 560 Broadway ) ) [field_item_address2] => Array ( [0] => Array ( [value] => Suite 208 ) ) [field_item_city] => Array ( [0] => Array ( [value] => New York ) ) [field_item_contacts] => Array ( [0] => Array ( [nid] => 277 ) [1] => Array ( [nid] => 276 ) [2] => Array ( [nid] => 279 ) ) [field_item_date] => Array ( [0] => Array ( [value] => 1216080000 ) ) [field_item_directive] => Array ( [0] => Array ( [value] => test 2 ) ) [field_item_email] => Array ( [0] => Array ( [value] => anthony at thrillist.com ) ) [field_item_end_date] => Array ( [0] => Array ( [value] => 1216771200 ) ) [field_item_excerpt] => Array ( [0] => Array ( [value] => right ) ) [field_item_exhortation] => Array ( [0] => Array ( [value] => is ) ) [field_item_extended_entry] => Array ( [0] => Array ( [value] => That ) ) [field_item_images] => Array ( [0] => Array ( [nid] => 0 ) ) [field_item_is_event] => Array ( [0] => Array ( [value] => 1 ) ) [field_item_is_recurring] => Array ( [0] => Array ( [value] => 1 ) ) [field_item_latitude] => Array ( [0] => Array ( [value] => 40.75 ) ) [field_item_longitude] => Array ( [0] => Array ( [value] => -73.98 ) ) [field_item_phone] => Array ( [0] => Array ( [value] => 2019262168 ) ) [field_item_start_date] => Array ( [0] => Array ( [value] => 1216771200 ) ) [field_item_url] => Array ( [0] => Array ( [value] => anthonyw.net ) ) [field_item_zip] => Array ( [0] => Array ( [value] => 10012 ) ) ) ########## Error: -- Anthony Wlodarski Web Applications Developer www.thrillist.com 560 Broadway, Suite 308 New York, NY 10012 p 646.274.2435 f 646.557.0803 From jcfiala at gmail.com Tue Jul 22 15:31:56 2008 From: jcfiala at gmail.com (John Fiala) Date: Tue, 22 Jul 2008 09:31:56 -0600 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> Message-ID: Well, one option - I'm not sure how easy it is, because I don't know if you're talking Drupal 5 or Drupal 6 - would be to find all the forms that would try to delete a user via user_delete, and change the validation of those forms using hook_form_alter to call your validation function before the submit comes along and does a user_delete on them. That wouldn't require hacking core. On Tue, Jul 22, 2008 at 8:48 AM, Pushyamitra Navare wrote: > On Tue, Jul 22, 2008 at 7:15 PM, Earnie Boyd > wrote: >> Well that isn't too friendly. If you don't want the user to be deleted you >> could use a hook_form_alter to hide or remove the button. >> > > Well, ideally I would like the pre-user-delete-validate function to be > called for every user. If I disable button etc. through > hook_form_alter, then either all users will be deleted or none. I > won't be able to validate individual users and decide to delete or not > delete that user. > > I actually ended up modifying user.module code and calling my own > validate function just before deleting user. Based on validate > function's result I either delete the user or just register error. ( > The obvious pain would arise when I wish to upgrade to newer Drupal > version in future. I would have patch the new user.module as wel. ). > For now, it's working... > > > Pushya > -- John Fiala From a-joelpe at microsoft.com Tue Jul 22 18:26:40 2008 From: a-joelpe at microsoft.com (Joel Penner (Volt)) Date: Tue, 22 Jul 2008 11:26:40 -0700 Subject: [development] Left menu missing Message-ID: Hey all, I'm writing an abstraction layer for mssql and got the system up and working minus the left hand menu, it shows only 2 items if i clear the cache table but then after reloading it goes away again. Can someone point me in the right direction in the code? Joel Penner Volt Microsoft Open Source Software Lab From earnie at users.sourceforge.net Tue Jul 22 19:20:10 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 22 Jul 2008 15:20:10 -0400 Subject: [development] Left menu missing In-Reply-To: References: Message-ID: <20080722152010.lqx6yy33g9ysc0sk@mail.progw.org> Quoting "Joel Penner (Volt)" : > Hey all, > I'm writing an abstraction layer for mssql and got the system up and > working minus the left hand menu, it shows only 2 items if i clear > the cache table but then after reloading it goes away again. Can > someone point me in the right direction in the code? > Do you have the devel module[1] installed? You can see every query with it. [1] http://drupal.org/project/devel Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From a-joelpe at microsoft.com Tue Jul 22 21:16:45 2008 From: a-joelpe at microsoft.com (Joel Penner (Volt)) Date: Tue, 22 Jul 2008 14:16:45 -0700 Subject: [development] Left menu missing In-Reply-To: <20080722152010.lqx6yy33g9ysc0sk@mail.progw.org> References: <20080722152010.lqx6yy33g9ysc0sk@mail.progw.org> Message-ID: Well, I have control over the driver and can see all of the queries, but I don't know which ones to look for, that's the problem -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Earnie Boyd Sent: Tuesday, July 22, 2008 12:20 PM To: development at drupal.org Subject: Re: [development] Left menu missing Quoting "Joel Penner (Volt)" : > Hey all, > I'm writing an abstraction layer for mssql and got the system up and > working minus the left hand menu, it shows only 2 items if i clear > the cache table but then after reloading it goes away again. Can > someone point me in the right direction in the code? > Do you have the devel module[1] installed? You can see every query with it. [1] http://drupal.org/project/devel Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From earnie at users.sourceforge.net Tue Jul 22 21:52:55 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Tue, 22 Jul 2008 17:52:55 -0400 Subject: [development] Left menu missing In-Reply-To: References: <20080722152010.lqx6yy33g9ysc0sk@mail.progw.org> Message-ID: <20080722175255.7lknsnig6pc8c8gs@mail.progw.org> Quoting "Joel Penner (Volt)" : > Well, I have control over the driver and can see all of the queries, > but I don't know which ones to look for, that's the problem > The devel module will also give you a hint as to from where the query comes as well as how long the query took. Which Drupal version are you targeting your work? My guess is the cache_menu table is missing data. It holds all of the menu array. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From a-joelpe at microsoft.com Tue Jul 22 21:56:38 2008 From: a-joelpe at microsoft.com (Joel Penner (Volt)) Date: Tue, 22 Jul 2008 14:56:38 -0700 Subject: [development] Left menu missing In-Reply-To: <20080722175255.7lknsnig6pc8c8gs@mail.progw.org> References: <20080722152010.lqx6yy33g9ysc0sk@mail.progw.org> <20080722175255.7lknsnig6pc8c8gs@mail.progw.org> Message-ID: Yes, it's mostly blank, do you know if my database driver would have caused this? Where is this data gathered from? -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Earnie Boyd Sent: Tuesday, July 22, 2008 2:53 PM To: development at drupal.org Subject: Re: [development] Left menu missing Quoting "Joel Penner (Volt)" : > Well, I have control over the driver and can see all of the queries, > but I don't know which ones to look for, that's the problem > The devel module will also give you a hint as to from where the query comes as well as how long the query took. Which Drupal version are you targeting your work? My guess is the cache_menu table is missing data. It holds all of the menu array. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From john.morahan at gmail.com Tue Jul 22 22:07:34 2008 From: john.morahan at gmail.com (John Morahan) Date: Tue, 22 Jul 2008 23:07:34 +0100 Subject: [development] Left menu missing In-Reply-To: <48862994.7030006@gmail.com> References: <48862994.7030006@gmail.com> Message-ID: <48865A26.1020900@gmail.com> John Morahan wrote: > Joel Penner (Volt) wrote: >> Hey all, >> I'm writing an abstraction layer for mssql and got the system up and working minus the left hand menu, it shows only 2 items if i clear the cache table but then after reloading it goes away again. Can someone point me in the right direction in the code? >> >> Joel Penner >> Volt >> Microsoft Open Source Software Lab >> > > Perhaps if we could see your code, we could tell you where you're going > wrong? > > ;) > > -john > > Oops. I didn't actually mean to hit send on that snarky response, so I guess I should actually try to be helpful. If you're working with Drupal 5, menu_get_menu() in includes/menu.inc is the only function I'm aware of that reads or writes cached menu data. In Drupal 6 there are quite a few more. Search for calls to cache_set and cache_get with 'cache_menu' as the second parameter. If you're writing a whole new database driver, my first guess would be charset issues - I once accidentally converted a MySQL table to the wrong charset and it broke the serialized data. -john From a-joelpe at microsoft.com Tue Jul 22 22:15:50 2008 From: a-joelpe at microsoft.com (Joel Penner (Volt)) Date: Tue, 22 Jul 2008 15:15:50 -0700 Subject: [development] Left menu missing In-Reply-To: <48865A26.1020900@gmail.com> References: <48862994.7030006@gmail.com> <48865A26.1020900@gmail.com> Message-ID: Actually, you will see the code, when I'm done that is =p I'll check that out, thanks -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of John Morahan Sent: Tuesday, July 22, 2008 3:08 PM To: development at drupal.org Subject: Re: [development] Left menu missing John Morahan wrote: > Joel Penner (Volt) wrote: >> Hey all, >> I'm writing an abstraction layer for mssql and got the system up and working minus the left hand menu, it shows only 2 items if i clear the cache table but then after reloading it goes away again. Can someone point me in the right direction in the code? >> >> Joel Penner >> Volt >> Microsoft Open Source Software Lab >> > > Perhaps if we could see your code, we could tell you where you're going > wrong? > > ;) > > -john > > Oops. I didn't actually mean to hit send on that snarky response, so I guess I should actually try to be helpful. If you're working with Drupal 5, menu_get_menu() in includes/menu.inc is the only function I'm aware of that reads or writes cached menu data. In Drupal 6 there are quite a few more. Search for calls to cache_set and cache_get with 'cache_menu' as the second parameter. If you're writing a whole new database driver, my first guess would be charset issues - I once accidentally converted a MySQL table to the wrong charset and it broke the serialized data. -john From syscrusher at 4th.com Tue Jul 22 22:58:19 2008 From: syscrusher at 4th.com (Syscrusher) Date: Tue, 22 Jul 2008 18:58:19 -0400 Subject: [development] Peculiar behavior of collapsible fieldset titles In-Reply-To: <1B9781C7-BDC8-4041-99B9-4A3FA84D34E7@acko.net> References: <1216675627.7280.45.camel@marcus> <1B9781C7-BDC8-4041-99B9-4A3FA84D34E7@acko.net> Message-ID: <1216767499.32393.12.camel@marcus> On Tue, 2008-07-22 at 12:05 -0700, Steven Wittens wrote: > Sounds like: http://drupal.org/node/140253 > > Next time, use a DOM/CSS inspector to verify what you are seeing. > > Steven Wittens That was exactly the problem. I never would have expected the choice of escaped or non-escaped t() substitution to behave this way, but changing % to ! in my t() calls fixed the problem everywhere it occurred. Thanks for the tip. I didn't think to use a DOM/CSS inspector because it didn't occur to me that this would be a DOM/CSS problem. Since part of the field was there, I thought it must have two different copies of the data somewhere, with one being incomplete. I think I still need to use the DOM/CSS inspector now, even though the problem is gone, because I want to find where in my stylesheets the display:none is occurring that it shouldn't. I assume that's the root cause of the issue, and will use Firefox to find out. Perhaps (and I'll check this first) there are different ID or CLASS attributes assigned by t() depending on the nature of its field substitutions. Thanks again to you and Darrel for steering me in the right direction. Scott -- Syscrusher From bharanikumariyerphp at gmail.com Wed Jul 23 06:17:04 2008 From: bharanikumariyerphp at gmail.com (bharani kumar) Date: Wed, 23 Jul 2008 11:47:04 +0530 Subject: [development] 3 blocks combine into 1 block Message-ID: <2240033d0807222317g20f74b92h223064b2ffffd819@mail.gmail.com> Is it possible, combine 3 blocks into 1 block that is aussume block1,block2,block3, These three block i want to display in the same page, what ever navigations will happen, But i must display all threee blocks in the same pages only... thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080723/23b30767/attachment.htm From darthsteven at gmail.com Wed Jul 23 06:54:35 2008 From: darthsteven at gmail.com (Steven Jones) Date: Wed, 23 Jul 2008 07:54:35 +0100 Subject: [development] 3 blocks combine into 1 block In-Reply-To: <2240033d0807222317g20f74b92h223064b2ffffd819@mail.gmail.com> References: <2240033d0807222317g20f74b92h223064b2ffffd819@mail.gmail.com> Message-ID: Please see http://drupal.org/support for your support options. Regards Steven Jones On Wed, Jul 23, 2008 at 7:17 AM, bharani kumar wrote: > Is it possible, > > > combine 3 blocks into 1 block > > > that is > > aussume block1,block2,block3, > > These three block i want to display in the same page, > > what ever navigations will happen, > > But i must display all threee blocks in the same pages only... > > > thanks > From cwgordon7 at cwgordon.com Wed Jul 23 06:58:00 2008 From: cwgordon7 at cwgordon.com (Charlie Gordon) Date: Wed, 23 Jul 2008 02:58:00 -0400 Subject: [development] 3 blocks combine into 1 block In-Reply-To: <2240033d0807222317g20f74b92h223064b2ffffd819@mail.gmail.com> References: <2240033d0807222317g20f74b92h223064b2ffffd819@mail.gmail.com> Message-ID: <4886D678.4010606@cwgordon.com> This is a support question, please do not send it to the development list. You can get support at http://drupal.org/support. Thanks. bharani kumar wrote: > Is it possible, > > > combine 3 blocks into 1 block > > > that is > > aussume block1,block2,block3, > > These three block i want to display in the same page, > > what ever navigations will happen, > > But i must display all threee blocks in the same pages only... > > > thanks From earnie at users.sourceforge.net Wed Jul 23 13:53:11 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 23 Jul 2008 09:53:11 -0400 Subject: [development] Left menu missing In-Reply-To: References: <20080722152010.lqx6yy33g9ysc0sk@mail.progw.org> <20080722175255.7lknsnig6pc8c8gs@mail.progw.org> Message-ID: <20080723095311.fgmrad4gowg848oc@mail.progw.org> Quoting "Joel Penner (Volt)" : > Yes, it's mostly blank, do you know if my database driver would have > caused this? Where is this data gathered from? > The cache_menu table holds the result from the menu module calling every hook_menu implementation and then calling cache_set with the serialized array data when there is no cache_menu data. The menu module may also call cache_set when there may be a need for an update. The data type for the columns must be large enough to hold the serialized data. The devel module will give you clues and I highly suggest it for any development of a module. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From alan.g.dixon at gmail.com Wed Jul 23 14:08:56 2008 From: alan.g.dixon at gmail.com (Alan Dixon) Date: Wed, 23 Jul 2008 10:08:56 -0400 Subject: [development] transferring session info across login event In-Reply-To: <1882623342555560937@unknownmsgid> References: <1882623342555560937@unknownmsgid> Message-ID: <501ac6c60807230708t46701888ib57c03e981ef2ae9@mail.gmail.com> i'm wondering if your statement: "the login event regenerates the session" is completely true. I don't believe that the php session cookie changes, and I don't see anywhere (or why) drupal would completely remove all $_SESSION info on login. I think what does happen is that Drupal's private session stuff as stored in the session table gets cleared out (primarily the user object that gets cached, i'm not sure what else), but you don't need to worry about that do you? Put all your pre-login stuff into $_SESSION and then it should still be there after login, I think. - Alan On Mon, Jul 14, 2008 at 1:37 PM, Joe Murray wrote: > I have a use case where anonymous users can do a bunch of work, and then at > the end request to save it, which requires logging in (and possibly also > creating an account). The login event regenerates the session, and so far as > I know 5.x does not provide a hook that can be used to copy info from the > old session into the new so that it can be saved in a way that is associated > with the correct uid. I suppose such a hook so would open up lots of > security issues. Still, this is the second time I've confronted this sort of > an issue, and I don't know the correct design pattern to handle it in > Drupal. Comments and suggestions welcome. > > > > Cheers, > > > > Joe Murray, PhD > > President, JMA Consulting > > @ The Centre for Social Innovation > > 215 Spadina Ave, Suite 400, Toronto, Ontario, Canada M5T 2C7 > > 416.466.1281, (416) 644-0116 (f) > > joe.murray at jmaconsulting.biz > > Skype: josephpmurray > > -- Alan Dixon, Web Developer http://alan.g.dixon.googlepages.com/ From matt at cabinetuk.com Wed Jul 23 14:23:53 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Wed, 23 Jul 2008 15:23:53 +0100 Subject: [development] Ahah sometimes working, different users Message-ID: <5AAEAAF8-34AC-4680-BA72-2835CCC7D67E@cabinetuk.com> I'm doing my first AHAH coding. I have a "SELECT" in a form that is doing Ahah on event=change. For now, the returning code simply puts the selected value into a string and displays it in the wrapper. When I log in as the admin user, it works fine. When I log in as another user, the value of the select is not coming across in the POST from the ahah script. ie: the code runs and I see the result, but the result is an empty string because the is no $_REQUEST['field-name'] set. Has anyone seen this? -Matt From catch56 at googlemail.com Wed Jul 23 14:47:41 2008 From: catch56 at googlemail.com (Nathaniel Catchpole) Date: Wed, 23 Jul 2008 15:47:41 +0100 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> Message-ID: There's an RTBC patch to move hook_user before users are actually deleted for this against Drupal7: http://drupal.org/node/218189 Nat From matt at cabinetuk.com Wed Jul 23 14:54:54 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Wed, 23 Jul 2008 15:54:54 +0100 Subject: [development] Ahah sometimes working, different browsers In-Reply-To: <5AAEAAF8-34AC-4680-BA72-2835CCC7D67E@cabinetuk.com> References: <5AAEAAF8-34AC-4680-BA72-2835CCC7D67E@cabinetuk.com> Message-ID: <6CC43C26-CB4B-462A-A02E-7834D831E199@cabinetuk.com> Actually, it's a browser problem. Works in Safari, but not in Firefox. -matt On 23/07/2008, at 3:23 PM, Matt Connolly wrote: > I'm doing my first AHAH coding. > > I have a "SELECT" in a form that is doing Ahah on event=change. For > now, the returning code simply puts the selected value into a string > and displays it in the wrapper. When I log in as the admin user, it > works fine. > > When I log in as another user, the value of the select is not coming > across in the POST from the ahah script. ie: the code runs and I see > the result, but the result is an empty string because the is no > $_REQUEST['field-name'] set. > > Has anyone seen this? > > -Matt > From pushyamitra at gmail.com Wed Jul 23 15:26:58 2008 From: pushyamitra at gmail.com (Pushyamitra Navare) Date: Wed, 23 Jul 2008 20:56:58 +0530 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> Message-ID: On Tue, Jul 22, 2008 at 9:01 PM, John Fiala wrote: > Well, one option - I'm not sure how easy it is, because I don't know > if you're talking Drupal 5 or Drupal 6 - would be to find all the > forms that would try to delete a user via user_delete, and change the > validation of those forms using hook_form_alter to call your > validation function before the submit comes along and does a > user_delete on them. That wouldn't require hacking core. Thanks John. I am using Drupal 6.2. I am sure what you say will work, and I will be able to change validate handler though form_alter, and validate hook will be called before user is deleted. Only problem I guess is that: it will be called only once even if multiple users are being deleted ('coz it's form validate handler, not user delete handler). Right? If possible, I wanted my validate function to be called for individual user, and delete/not delete user based on errors returned by validate hook. Thanks, Pushya From pushyamitra at gmail.com Wed Jul 23 15:37:03 2008 From: pushyamitra at gmail.com (Pushyamitra Navare) Date: Wed, 23 Jul 2008 21:07:03 +0530 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> Message-ID: That's cool. Apparently other people are also interested in such a pre-user-delete hook. Pity, someone's already generated a patch. Otherwise I could have tried and gotten my hands dirty! :-) Pushyamitra. On Wed, Jul 23, 2008 at 8:17 PM, Nathaniel Catchpole wrote: > There's an RTBC patch to move hook_user before users are actually > deleted for this against Drupal7: > http://drupal.org/node/218189 > > Nat > From earnie at users.sourceforge.net Wed Jul 23 18:57:17 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Wed, 23 Jul 2008 14:57:17 -0400 Subject: [development] Can I Indicate failure from hook_user? In-Reply-To: References: <20080722094505.47cufnugxpd4o0o8@mail.progw.org> Message-ID: <20080723145717.bkyd9d8ss54aogoc@mail.progw.org> Quoting Pushyamitra Navare : > On Tue, Jul 22, 2008 at 9:01 PM, John Fiala wrote: >> Well, one option - I'm not sure how easy it is, because I don't know >> if you're talking Drupal 5 or Drupal 6 - would be to find all the >> forms that would try to delete a user via user_delete, and change the >> validation of those forms using hook_form_alter to call your >> validation function before the submit comes along and does a >> user_delete on them. That wouldn't require hacking core. > > Thanks John. I am using Drupal 6.2. > > I am sure what you say will work, and I will be able to change > validate handler though form_alter, and validate hook will be called > before user is deleted. Only problem I guess is that: it will be > called only once even if multiple users are being deleted ('coz it's > form validate handler, not user delete handler). Right? > > If possible, I wanted my validate function to be called for individual > user, and delete/not delete user based on errors returned by validate > hook. > Your module can modify the value for the MENU_CALLBACK item to action a different function which will eventually call the appropriate _submit hook. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From vuthecuong at luvina.net Thu Jul 24 02:06:05 2008 From: vuthecuong at luvina.net (Vu The Cuong) Date: Thu, 24 Jul 2008 09:06:05 +0700 Subject: [development] Need advices from Drupal guru: develop modules that support multilanguages Message-ID: <3DADD35EDAE49145B9BA1AB448447711683A7E@lvsrv_dns.luvina.net> Dear all I have a project building a portal site (somewhat like myspace.com) for 4 countries: - Japan - Spain - France - England Outline: When users access toppage, system will: 1) check which country is this user from 2) Then redirect user to page that displaying content in corresponding to him/her country language Pages for each country is different in language but totally same in content: Subject, title, label, and main content body also. So I need advices from you: About 1): first option is: I planned to uses Accept-Language request header from browser to check where user is from. Second option is: I planned to user Multiviews in Apache to handling this. And I will redirect user based on above returned result. So my question is: - Above solutions is OK? - Do I need to pay any attention on something? - Is any better solution out there? About 2) I would like to receive any advices from you about: - Ex about using t() function, handling date and times etc - text strings used commonly such as labels on form buttons. - body content such as blog articles, informational pages and static blocks - And any others. Thanks in advanced -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080724/647ae058/attachment-0001.htm From drewish at katherinehouse.com Thu Jul 24 02:12:33 2008 From: drewish at katherinehouse.com (andrew morton) Date: Wed, 23 Jul 2008 19:12:33 -0700 Subject: [development] Need advices from Drupal guru: develop modules that support multilanguages In-Reply-To: <3DADD35EDAE49145B9BA1AB448447711683A7E@lvsrv_dns.luvina.net> References: <3DADD35EDAE49145B9BA1AB448447711683A7E@lvsrv_dns.luvina.net> Message-ID: This is really more of a support question that a development question but the short answer is use D6 and enable the locale and translation modules. Hit up admin/settings/language/configure and enable Language negotiation. On Wed, Jul 23, 2008 at 7:06 PM, Vu The Cuong wrote: > Dear all > > > > I have a project building a portal site (somewhat like myspace.com) for 4 > countries: > > - Japan > > - Spain > > - France > > - England > > > > Outline: > > When users access toppage, system will: > > 1) check which country is this user from > > 2) Then redirect user to page that displaying content in corresponding to > him/her country language > > Pages for each country is different in language but totally same in content: > > Subject, title, label, and main content body also. > > > > So I need advices from you: > > About 1): first option is: I planned to uses Accept-Language request header > from browser to check where user is from. > > Second option is: I planned to user Multiviews in Apache to handling this. > > > > And I will redirect user based on above returned result. > > So my question is: > > - Above solutions is OK? > > - Do I need to pay any attention on something? > > - Is any better solution out there? > > About 2) > > I would like to receive any advices from you about: > > - Ex about using t() function, handling date and times etc > > - text strings used commonly such as labels on form buttons. > > - body content such as blog articles, informational pages and static > blocks > > - And any others. > > Thanks in advanced > > > > > > From vuthecuong at luvina.net Thu Jul 24 02:13:22 2008 From: vuthecuong at luvina.net (Vu The Cuong) Date: Thu, 24 Jul 2008 09:13:22 +0700 Subject: [development] Need advices from Drupal guru: develop modulesthat support multilanguages Message-ID: <3DADD35EDAE49145B9BA1AB448447711683A81@lvsrv_dns.luvina.net> I'm sorry for mistake in mailing list Regards, > -----Original Message----- > From: development-bounces at drupal.org [mailto:development- > bounces at drupal.org] On Behalf Of andrew morton > Sent: Thursday, July 24, 2008 9:13 AM > To: development at drupal.org > Subject: Re: [development] Need advices from Drupal guru: develop > modulesthat support multilanguages > > This is really more of a support question that a development question > but the short answer is use D6 and enable the locale and translation > modules. Hit up admin/settings/language/configure and enable Language > negotiation. > > On Wed, Jul 23, 2008 at 7:06 PM, Vu The Cuong > wrote: > > Dear all > > > > > > > > I have a project building a portal site (somewhat like myspace.com) for > 4 > > countries: > > > > - Japan > > > > - Spain > > > > - France > > > > - England > > > > > > > > Outline: > > > > When users access toppage, system will: > > > > 1) check which country is this user from > > > > 2) Then redirect user to page that displaying content in corresponding > to > > him/her country language > > > > Pages for each country is different in language but totally same in > content: > > > > Subject, title, label, and main content body also. > > > > > > > > So I need advices from you: > > > > About 1): first option is: I planned to uses Accept-Language request > header > > from browser to check where user is from. > > > > Second option is: I planned to user Multiviews in Apache to handling > this. > > > > > > > > And I will redirect user based on above returned result. > > > > So my question is: > > > > - Above solutions is OK? > > > > - Do I need to pay any attention on something? > > > > - Is any better solution out there? > > > > About 2) > > > > I would like to receive any advices from you about: > > > > - Ex about using t() function, handling date and times etc > > > > - text strings used commonly such as labels on form buttons. > > > > - body content such as blog articles, informational pages and > static > > blocks > > > > - And any others. > > > > Thanks in advanced > > > > > > > > > > > > > From development at robuustdesign.nl Wed Jul 16 16:44:35 2008 From: development at robuustdesign.nl (Stefan Nagtegaal) Date: Wed, 16 Jul 2008 18:44:35 +0200 Subject: [development] HTML emails In-Reply-To: References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> Message-ID: <4622D560-2B29-4A19-AAE6-7810611FFCD1@robuustdesign.nl> Op 16 jul 2008, om 18:06 heeft Darrel O'Pry het volgende geschreven: > On Wed, Jul 16, 2008 at 5:12 AM, Matt Connolly > wrote: > > Besides, email clients have been HTML friendly for a *long* time, so > I don't see why Drupal shouldn't have an interface that understands > rich email messages. > > Thoughts? > > Have you even tried to make an HTML email look the same in multiple > email clients? That stuff is impossible... and forget it if you > want colored anchors or css support consistently. Heck they don't > even send mime attachments consistently... They all do something > close to spec... and lets not even get into the quirks of various > webmail clients and the pluthera of different versions of MS Outlook > in the wild and still supported by MS. It isn't impossible! Just use CSS and make sure you have a wrapper div around your HTML- layout, styled with the CSS. The only thing that breaks your e-mails along the different e-mail clients is when you add styling to the ... of your HTML e- mail. Stefan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080716/477b6614/attachment-0002.htm From bharanikumariyerphp at gmail.com Thu Jul 24 19:48:42 2008 From: bharanikumariyerphp at gmail.com (bharani kumar) Date: Fri, 25 Jul 2008 01:18:42 +0530 Subject: [development] search Problem Message-ID: <2240033d0807241248q3b8fe101k347a9fa2ba3d316d@mail.gmail.com> Some time Genral search not working, Event the keyword is in the content or article... thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080725/41e294ea/attachment.htm From cwgordon7 at cwgordon.com Thu Jul 24 19:55:10 2008 From: cwgordon7 at cwgordon.com (Charlie Gordon) Date: Thu, 24 Jul 2008 15:55:10 -0400 Subject: [development] search Problem In-Reply-To: <2240033d0807241248q3b8fe101k347a9fa2ba3d316d@mail.gmail.com> References: <2240033d0807241248q3b8fe101k347a9fa2ba3d316d@mail.gmail.com> Message-ID: <4888DE1E.8030104@cwgordon.com> This is a support question, please do not send it to the development list. You can get support at http://drupal.org/support. Thanks. bharani kumar wrote: > Some time > > Genral search not working, > > Event the keyword is in the content or article... > > thanks From bharanikumariyerphp at gmail.com Thu Jul 24 20:07:09 2008 From: bharanikumariyerphp at gmail.com (bharani kumar) Date: Fri, 25 Jul 2008 01:37:09 +0530 Subject: [development] search Problem In-Reply-To: <4888DE1E.8030104@cwgordon.com> References: <2240033d0807241248q3b8fe101k347a9fa2ba3d316d@mail.gmail.com> <4888DE1E.8030104@cwgordon.com> Message-ID: <2240033d0807241307i3df867ddtcc0d5314dc7578ab@mail.gmail.com> i thing , for this search module need patch, so that i posted in development... On Fri, Jul 25, 2008 at 1:25 AM, Charlie Gordon wrote: > This is a support question, please do not send it to the development list. > You can get support at http://drupal.org/support. Thanks. > > > bharani kumar wrote: > >> Some time >> >> Genral search not working, >> >> Event the keyword is in the content or article... >> >> thanks >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080725/838e160a/attachment.htm From merlin at logrus.com Thu Jul 24 21:35:11 2008 From: merlin at logrus.com (Earl Miles) Date: Thu, 24 Jul 2008 14:35:11 -0700 Subject: [development] search Problem In-Reply-To: <2240033d0807241248q3b8fe101k347a9fa2ba3d316d@mail.gmail.com> References: <2240033d0807241248q3b8fe101k347a9fa2ba3d316d@mail.gmail.com> Message-ID: <4888F58F.4020105@logrus.com> bharani kumar wrote: > Some time > > Genral search not working, > > Event the keyword is in the content or article... The amount of wrong with this message is enormous. 1) You're clearly in the wrong place. If you think it's a bug, then you need to post it in the issue queue for...err, whatever you're posting the bug about. If you don't know then http://drupal.org/support 2) Even if you were in the right place, nobody has any idea WTF you're talking about. You need to be specific and detailed, whereas this is the opposite: vague and general. You need to do things like report specific problems, error messages, exact steps to reproduce the problem. "It's broken, fix it" is only going to get you mocked. From xavier.bestel at free.fr Thu Jul 24 08:36:31 2008 From: xavier.bestel at free.fr (Xavier Bestel) Date: Thu, 24 Jul 2008 10:36:31 +0200 Subject: [development] HTML emails In-Reply-To: <4622D560-2B29-4A19-AAE6-7810611FFCD1@robuustdesign.nl> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <4622D560-2B29-4A19-AAE6-7810611FFCD1@robuustdesign.nl> Message-ID: <1216888591.14814.10.camel@skunk.anacadf.mentorg.com> On Wed, 2008-07-16 at 18:44 +0200, Stefan Nagtegaal wrote: > > Op 16 jul 2008, om 18:06 heeft Darrel O'Pry het volgende geschreven: > > > On Wed, Jul 16, 2008 at 5:12 AM, Matt Connolly > > wrote: > > > > Besides, email clients have been HTML friendly for a *long* > > time, so I don't see why Drupal shouldn't have an interface > > that understands rich email messages. > > > > > > Thoughts? > > > > Have you even tried to make an HTML email look the same in multiple > > email clients? That stuff is impossible... and forget it if you > > want colored anchors or css support consistently. Heck they don't > > even send mime attachments consistently... They all do something > > close to spec... and lets not even get into the quirks of various > > webmail clients and the pluthera of different versions of MS Outlook > > in the wild and still supported by MS. > > > It isn't impossible! > Just use CSS and make sure you have a wrapper div around your > HTML-layout, styled with the CSS. > The only thing that breaks your e-mails along the different e-mail > clients is when you add styling to the ... of your HTML > e-mail. Some current email clients support HTML but *not* CSS. Xav From metzlerd at metzlerd.com Fri Jul 25 05:32:34 2008 From: metzlerd at metzlerd.com (David Metzler) Date: Thu, 24 Jul 2008 22:32:34 -0700 Subject: [development] HTML emails In-Reply-To: <1216888591.14814.10.camel@skunk.anacadf.mentorg.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <4622D560-2B29-4A19-AAE6-7810611FFCD1@robuustdesign.nl> <1216888591.14814.10.camel@skunk.anacadf.mentorg.com> Message-ID: <664D88F7-38A7-4E9B-A8D6-5764D38FD792@metzlerd.com> True, but it doesn't mean HTML mail is not useful with or without css. I use HTML messages in Drupal applications to bring emphasis (h1,h2,etc) tags, transmit bold and italics, and show data in tables. I don't use the drupal mail apis because they don't support html :) Dave On Jul 24, 2008, at 1:36 AM, Xavier Bestel wrote: > On Wed, 2008-07-16 at 18:44 +0200, Stefan Nagtegaal wrote: >> >> Op 16 jul 2008, om 18:06 heeft Darrel O'Pry het volgende geschreven: >> >>> On Wed, Jul 16, 2008 at 5:12 AM, Matt Connolly >>> wrote: >>> >>> Besides, email clients have been HTML friendly for a *long* >>> time, so I don't see why Drupal shouldn't have an interface >>> that understands rich email messages. >>> >>> >>> Thoughts? >>> >>> Have you even tried to make an HTML email look the same in multiple >>> email clients? That stuff is impossible... and forget it if you >>> want colored anchors or css support consistently. Heck they don't >>> even send mime attachments consistently... They all do something >>> close to spec... and lets not even get into the quirks of various >>> webmail clients and the pluthera of different versions of MS Outlook >>> in the wild and still supported by MS. >> >> >> It isn't impossible! >> Just use CSS and make sure you have a wrapper div around your >> HTML-layout, styled with the CSS. >> The only thing that breaks your e-mails along the different e-mail >> clients is when you add styling to the ... of your HTML >> e-mail. > > Some current email clients support HTML but *not* CSS. > > Xav > > From development at robuustdesign.nl Fri Jul 25 07:22:03 2008 From: development at robuustdesign.nl (Stefan Nagtegaal) Date: Fri, 25 Jul 2008 09:22:03 +0200 Subject: [development] HTML emails In-Reply-To: <1216888591.14814.10.camel@skunk.anacadf.mentorg.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <4622D560-2B29-4A19-AAE6-7810611FFCD1@robuustdesign.nl> <1216888591.14814.10.camel@skunk.anacadf.mentorg.com> Message-ID: Op 24 jul 2008, om 10:36 heeft Xavier Bestel het volgende geschreven: > On Wed, 2008-07-16 at 18:44 +0200, Stefan Nagtegaal wrote: >> >> Op 16 jul 2008, om 18:06 heeft Darrel O'Pry het volgende geschreven: >> >>> On Wed, Jul 16, 2008 at 5:12 AM, Matt Connolly >>> wrote: >>> >>> Besides, email clients have been HTML friendly for a *long* >>> time, so I don't see why Drupal shouldn't have an interface >>> that understands rich email messages. >>> >>> >>> Thoughts? >>> >>> Have you even tried to make an HTML email look the same in multiple >>> email clients? That stuff is impossible... and forget it if you >>> want colored anchors or css support consistently. Heck they don't >>> even send mime attachments consistently... They all do something >>> close to spec... and lets not even get into the quirks of various >>> webmail clients and the pluthera of different versions of MS Outlook >>> in the wild and still supported by MS. >> >> >> It isn't impossible! >> Just use CSS and make sure you have a wrapper div around your >> HTML-layout, styled with the CSS. >> The only thing that breaks your e-mails along the different e-mail >> clients is when you add styling to the ... of your HTML >> e-mail. > > Some current email clients support HTML but *not* CSS. They do, but you should use the CSS inside the header itself, and not as a external file. I'm sorry, I should have said so in the first place.. Stefan From mail at webthatworks.it Fri Jul 25 11:12:35 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Fri, 25 Jul 2008 13:12:35 +0200 Subject: [development] HTML emails In-Reply-To: <664D88F7-38A7-4E9B-A8D6-5764D38FD792@metzlerd.com> References: <181BDA55-7852-46DB-A1D9-CF6D7C8A06E9@cabinetuk.com> <4622D560-2B29-4A19-AAE6-7810611FFCD1@robuustdesign.nl> <1216888591.14814.10.camel@skunk.anacadf.mentorg.com> <664D88F7-38A7-4E9B-A8D6-5764D38FD792@metzlerd.com> Message-ID: <20080725131235.3df3e0cf@dawn.webthatworks.it> On Thu, 24 Jul 2008 22:32:34 -0700 David Metzler wrote: > True, but it doesn't mean HTML mail is not useful with or without > css. > > I use HTML messages in Drupal applications to bring emphasis > (h1,h2,etc) tags, transmit bold and italics, and show data in > tables. I don't use the drupal mail apis because they don't I'd say that while layout helps increasing efficiency of communication in some cases (have you noticed how much italics, bold, colors are used in a science book compared to a literature book?) HTML emails are still to be used with extreme care. In a browser you can turn off images, you've a stop button, you can chose a textual browser that will avoid to download css and js.... You don't have so much freedom in an email reader and while email is some how pull content (you chose to pull emails from the server) it looks more like a push content (think about spam). When you really need more control on "layout" in an email most of the times you'd be better to add a suitable attachment or provide a link. Most of the times we are required to provide html emails it is for "spammish" reasons. Still among non geeks there is an unbelievably high percent of people that prefer to receive html emails when they are given the choice. If we're honest about why we generally have to send html emails from drupal we could build something that could really be useful. Most of the times we send out html emails to replicate the look&feel of the web site. I'm perfectly aware of the limitations of such approach... but readability is surely not the most frequent (reasonable?) reason why we are required to send out html. If readability was our first concern we wouldn't send out html emails. mimemail already does a good job since it includes css directly from the website. What maybe is missing is a bit more logic on the core side to dynamically manage the added css and template according to different media. When I had to send html emails I didn't use mimemail because my first target was actually to have well formatted textual content out of HTML. > support html :) In a perfect world we shouldn't. -- Ivan Sergio Borgonovo http://www.webthatworks.it From a-joelpe at microsoft.com Fri Jul 25 16:37:56 2008 From: a-joelpe at microsoft.com (Joel Penner (Volt)) Date: Fri, 25 Jul 2008 09:37:56 -0700 Subject: [development] Left menu missing In-Reply-To: <20080723095311.fgmrad4gowg848oc@mail.progw.org> References: <20080722152010.lqx6yy33g9ysc0sk@mail.progw.org> <20080722175255.7lknsnig6pc8c8gs@mail.progw.org> <20080723095311.fgmrad4gowg848oc@mail.progw.org> Message-ID: Looks like I found the problem. If the database returns NULL if there are no more rows to retrieve and that is then passed on to the app, it causes lots of problems, fixed -----Original Message----- From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of Earnie Boyd Sent: Wednesday, July 23, 2008 6:53 AM To: development at drupal.org Subject: Re: [development] Left menu missing Quoting "Joel Penner (Volt)" : > Yes, it's mostly blank, do you know if my database driver would have > caused this? Where is this data gathered from? > The cache_menu table holds the result from the menu module calling every hook_menu implementation and then calling cache_set with the serialized array data when there is no cache_menu data. The menu module may also call cache_set when there may be a need for an update. The data type for the columns must be large enough to hold the serialized data. The devel module will give you clues and I highly suggest it for any development of a module. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From mfburdett at gmail.com Sat Jul 26 00:09:47 2008 From: mfburdett at gmail.com (mark burdett) Date: Fri, 25 Jul 2008 17:09:47 -0700 Subject: [development] transferring session info across login event In-Reply-To: <501ac6c60807230708t46701888ib57c03e981ef2ae9@mail.gmail.com> References: <1882623342555560937@unknownmsgid> <501ac6c60807230708t46701888ib57c03e981ef2ae9@mail.gmail.com> Message-ID: I'd also like to know the proper technique for moving session data from anonymous to logged in user. This diff http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/user/user.module?r1=1.745.2.30&r2=1.745.2.31&pathrev=DRUPAL-5 shows how the session is now regenerated after a successful login and before the login hook is invoked. This change breaks the ability to login and keep the contents of your shopping cart in drupal e-commerce 5-3, for example. Maybe pre-login and post-login hooks are needed? --mark On Wed, Jul 23, 2008 at 7:08 AM, Alan Dixon wrote: > i'm wondering if your statement: > > "the login event regenerates the session" > > is completely true. > > I don't believe that the php session cookie changes, and I don't see > anywhere (or why) drupal would completely remove all $_SESSION info on > login. > > I think what does happen is that Drupal's private session stuff as > stored in the session table gets cleared out (primarily the user > object that gets cached, i'm not sure what else), but you don't need > to worry about that do you? > > Put all your pre-login stuff into $_SESSION and then it should still > be there after login, I think. > > - Alan > > On Mon, Jul 14, 2008 at 1:37 PM, Joe Murray > wrote: >> I have a use case where anonymous users can do a bunch of work, and then at >> the end request to save it, which requires logging in (and possibly also >> creating an account). The login event regenerates the session, and so far as >> I know 5.x does not provide a hook that can be used to copy info from the >> old session into the new so that it can be saved in a way that is associated >> with the correct uid. I suppose such a hook so would open up lots of >> security issues. Still, this is the second time I've confronted this sort of >> an issue, and I don't know the correct design pattern to handle it in >> Drupal. Comments and suggestions welcome. >> >> >> >> Cheers, >> >> >> >> Joe Murray, PhD >> >> President, JMA Consulting >> >> @ The Centre for Social Innovation >> >> 215 Spadina Ave, Suite 400, Toronto, Ontario, Canada M5T 2C7 >> >> 416.466.1281, (416) 644-0116 (f) >> >> joe.murray at jmaconsulting.biz >> >> Skype: josephpmurray >> >> > > > > -- > Alan Dixon, Web Developer > http://alan.g.dixon.googlepages.com/ > From senpai_san at mac.com Sat Jul 26 00:36:28 2008 From: senpai_san at mac.com (Senpai) Date: Fri, 25 Jul 2008 17:36:28 -0700 Subject: [development] Proposal: A new Handbook page outlining Best Practices Message-ID: <7955467F-C8D2-455D-80CF-81E4F108B892@mac.com> Well, we've gone and done it. Several of us got to talking in IRC today and realized that there wasn't a readily available set of Best Practice guidelines for programming within the Drupal framework. This page is a beginning towards a fix for that. Best Practices is now at http://drupal.org/node/287350 We're hoping that everyone on this list who cares enough to send the very best will place a comment on this page with something that they do as a matter of course, and wish everyone else did too. Once the docs team gets enough of these, we'll begin rolling them into a cohesive set of guidelines for Coding within Drupal as it pertains to PHP, MySQL, and the like. High level stuff. Let the fallout commence! -- Joel 'Senpai' Farris "Protection and captivity so often look the same." ** Robert Ludlum From mfburdett at gmail.com Sat Jul 26 00:46:20 2008 From: mfburdett at gmail.com (mark burdett) Date: Fri, 25 Jul 2008 17:46:20 -0700 Subject: [development] transferring session info across login event In-Reply-To: References: <1882623342555560937@unknownmsgid> <501ac6c60807230708t46701888ib57c03e981ef2ae9@mail.gmail.com> Message-ID: To clarify, the issue I wrote about isn't related to $_SESSION, it's modules that store data in a separate table with session id as the key (as e-commerce does). It seems this may be a flawed data model unless there is some means for modules to respond to regenerated session ids. --mark On Fri, Jul 25, 2008 at 5:09 PM, mark burdett wrote: > I'd also like to know the proper technique for moving session data > from anonymous to logged in user. > > This diff http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/user/user.module?r1=1.745.2.30&r2=1.745.2.31&pathrev=DRUPAL-5 > shows how the session is now regenerated after a successful login and > before the login hook is invoked. This change breaks the ability to > login and keep the contents of your shopping cart in drupal e-commerce > 5-3, for example. Maybe pre-login and post-login hooks are needed? > > --mark > > On Wed, Jul 23, 2008 at 7:08 AM, Alan Dixon wrote: >> i'm wondering if your statement: >> >> "the login event regenerates the session" >> >> is completely true. >> >> I don't believe that the php session cookie changes, and I don't see >> anywhere (or why) drupal would completely remove all $_SESSION info on >> login. >> >> I think what does happen is that Drupal's private session stuff as >> stored in the session table gets cleared out (primarily the user >> object that gets cached, i'm not sure what else), but you don't need >> to worry about that do you? >> >> Put all your pre-login stuff into $_SESSION and then it should still >> be there after login, I think. >> >> - Alan >> >> On Mon, Jul 14, 2008 at 1:37 PM, Joe Murray >> wrote: >>> I have a use case where anonymous users can do a bunch of work, and then at >>> the end request to save it, which requires logging in (and possibly also >>> creating an account). The login event regenerates the session, and so far as >>> I know 5.x does not provide a hook that can be used to copy info from the >>> old session into the new so that it can be saved in a way that is associated >>> with the correct uid. I suppose such a hook so would open up lots of >>> security issues. Still, this is the second time I've confronted this sort of >>> an issue, and I don't know the correct design pattern to handle it in >>> Drupal. Comments and suggestions welcome. >>> >>> >>> >>> Cheers, >>> >>> >>> >>> Joe Murray, PhD >>> >>> President, JMA Consulting >>> >>> @ The Centre for Social Innovation >>> >>> 215 Spadina Ave, Suite 400, Toronto, Ontario, Canada M5T 2C7 >>> >>> 416.466.1281, (416) 644-0116 (f) >>> >>> joe.murray at jmaconsulting.biz >>> >>> Skype: josephpmurray >>> >>> >> >> >> >> -- >> Alan Dixon, Web Developer >> http://alan.g.dixon.googlepages.com/ >> > From drumm at delocalizedham.com Sat Jul 26 00:46:08 2008 From: drumm at delocalizedham.com (Neil Drumm) Date: Fri, 25 Jul 2008 17:46:08 -0700 Subject: [development] transferring session info across login event In-Reply-To: References: <1882623342555560937@unknownmsgid> <501ac6c60807230708t46701888ib57c03e981ef2ae9@mail.gmail.com> Message-ID: Session ID regeneration is just that, a new session ID for the same session. Session variables are not overwritten. To test, I found my session ID, for an anonymous session, and did: UPDATE sessions SET session = 'debug|s:1:"a"' WHERE sid = '...'; After logging in, the session variables had not changed. Executing print_r($_SESSION); resulted in the expected Array ( [debug] => a ) -Neil On Fri, Jul 25, 2008 at 5:09 PM, mark burdett wrote: > I'd also like to know the proper technique for moving session data > from anonymous to logged in user. > > This diff > http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/user/user.module?r1=1.745.2.30&r2=1.745.2.31&pathrev=DRUPAL-5 > shows how the session is now regenerated after a successful login and > before the login hook is invoked. This change breaks the ability to > login and keep the contents of your shopping cart in drupal e-commerce > 5-3, for example. Maybe pre-login and post-login hooks are needed? > > --mark > > On Wed, Jul 23, 2008 at 7:08 AM, Alan Dixon > wrote: > > i'm wondering if your statement: > > > > "the login event regenerates the session" > > > > is completely true. > > > > I don't believe that the php session cookie changes, and I don't see > > anywhere (or why) drupal would completely remove all $_SESSION info on > > login. > > > > I think what does happen is that Drupal's private session stuff as > > stored in the session table gets cleared out (primarily the user > > object that gets cached, i'm not sure what else), but you don't need > > to worry about that do you? > > > > Put all your pre-login stuff into $_SESSION and then it should still > > be there after login, I think. > > > > - Alan > > > > On Mon, Jul 14, 2008 at 1:37 PM, Joe Murray > > wrote: > >> I have a use case where anonymous users can do a bunch of work, and then > at > >> the end request to save it, which requires logging in (and possibly also > >> creating an account). The login event regenerates the session, and so > far as > >> I know 5.x does not provide a hook that can be used to copy info from > the > >> old session into the new so that it can be saved in a way that is > associated > >> with the correct uid. I suppose such a hook so would open up lots of > >> security issues. Still, this is the second time I've confronted this > sort of > >> an issue, and I don't know the correct design pattern to handle it in > >> Drupal. Comments and suggestions welcome. > >> > >> > >> > >> Cheers, > >> > >> > >> > >> Joe Murray, PhD > >> > >> President, JMA Consulting > >> > >> @ The Centre for Social Innovation > >> > >> 215 Spadina Ave, Suite 400, Toronto, Ontario, Canada M5T 2C7 > >> > >> 416.466.1281, (416) 644-0116 (f) > >> > >> joe.murray at jmaconsulting.biz > >> > >> Skype: josephpmurray > >> > >> > > > > > > > > -- > > Alan Dixon, Web Developer > > http://alan.g.dixon.googlepages.com/ > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080725/dab6fc38/attachment.htm From drumm at delocalizedham.com Sat Jul 26 00:59:12 2008 From: drumm at delocalizedham.com (Neil Drumm) Date: Fri, 25 Jul 2008 17:59:12 -0700 Subject: [development] transferring session info across login event In-Reply-To: References: <1882623342555560937@unknownmsgid> <501ac6c60807230708t46701888ib57c03e981ef2ae9@mail.gmail.com> Message-ID: Then the easiest thing to do is to use your own id set $_SESSION['ecommerce_cart_id']. -Neil On Fri, Jul 25, 2008 at 5:46 PM, mark burdett wrote: > To clarify, the issue I wrote about isn't related to $_SESSION, it's > modules that store data in a separate table with session id as the key > (as e-commerce does). It seems this may be a flawed data model unless > there is some means for modules to respond to regenerated session ids. > > --mark > > On Fri, Jul 25, 2008 at 5:09 PM, mark burdett wrote: > > I'd also like to know the proper technique for moving session data > > from anonymous to logged in user. > > > > This diff > http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/user/user.module?r1=1.745.2.30&r2=1.745.2.31&pathrev=DRUPAL-5 > > shows how the session is now regenerated after a successful login and > > before the login hook is invoked. This change breaks the ability to > > login and keep the contents of your shopping cart in drupal e-commerce > > 5-3, for example. Maybe pre-login and post-login hooks are needed? > > > > --mark > > > > On Wed, Jul 23, 2008 at 7:08 AM, Alan Dixon > wrote: > >> i'm wondering if your statement: > >> > >> "the login event regenerates the session" > >> > >> is completely true. > >> > >> I don't believe that the php session cookie changes, and I don't see > >> anywhere (or why) drupal would completely remove all $_SESSION info on > >> login. > >> > >> I think what does happen is that Drupal's private session stuff as > >> stored in the session table gets cleared out (primarily the user > >> object that gets cached, i'm not sure what else), but you don't need > >> to worry about that do you? > >> > >> Put all your pre-login stuff into $_SESSION and then it should still > >> be there after login, I think. > >> > >> - Alan > >> > >> On Mon, Jul 14, 2008 at 1:37 PM, Joe Murray > >> wrote: > >>> I have a use case where anonymous users can do a bunch of work, and > then at > >>> the end request to save it, which requires logging in (and possibly > also > >>> creating an account). The login event regenerates the session, and so > far as > >>> I know 5.x does not provide a hook that can be used to copy info from > the > >>> old session into the new so that it can be saved in a way that is > associated > >>> with the correct uid. I suppose such a hook so would open up lots of > >>> security issues. Still, this is the second time I've confronted this > sort of > >>> an issue, and I don't know the correct design pattern to handle it in > >>> Drupal. Comments and suggestions welcome. > >>> > >>> > >>> > >>> Cheers, > >>> > >>> > >>> > >>> Joe Murray, PhD > >>> > >>> President, JMA Consulting > >>> > >>> @ The Centre for Social Innovation > >>> > >>> 215 Spadina Ave, Suite 400, Toronto, Ontario, Canada M5T 2C7 > >>> > >>> 416.466.1281, (416) 644-0116 (f) > >>> > >>> joe.murray at jmaconsulting.biz > >>> > >>> Skype: josephpmurray > >>> > >>> > >> > >> > >> > >> -- > >> Alan Dixon, Web Developer > >> http://alan.g.dixon.googlepages.com/ > >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080725/eea2d4d8/attachment.htm From news at unleashedmind.com Sat Jul 26 01:04:09 2008 From: news at unleashedmind.com (Daniel F. Kudwien) Date: Sat, 26 Jul 2008 03:04:09 +0200 Subject: [development] transferring session info across login event In-Reply-To: Message-ID: <07e101c8eebb$82fd42f0$0200a8c0@structworks.com> > To clarify, the issue I wrote about isn't related to > $_SESSION, it's modules that store data in a separate table > with session id as the key (as e-commerce does). It seems > this may be a flawed data model unless there is some means > for modules to respond to regenerated session ids. Did you already try: function mymodule_form_alter($form_id, &$form) { if ($form_id == 'user_login' || $form_id == 'user_login_block') { $form['submit'] = array('mymodule_pre_submit' => array()); $form['submit']['mymodule_post_submit'] = array(); } } function mymodule_pre_submit($form_id, $form_values, $return) { static $backup = array(); if ($return) { return $backup; } // Backup session data here $backup = ... // Invoke user login (hook_user) user_login_submit(...); } function mymodule_post_submit($form_id, $form_values) { // Reset session data $restored = mymodule_pre_submit(NULL, NULL, TRUE); } ? Just an idea. But yes, dealing with hook_user() forms is quite a mess... From mfburdett at gmail.com Sat Jul 26 02:08:15 2008 From: mfburdett at gmail.com (mark burdett) Date: Fri, 25 Jul 2008 19:08:15 -0700 Subject: [development] transferring session info across login event In-Reply-To: <07e101c8eebb$82fd42f0$0200a8c0@structworks.com> References: <07e101c8eebb$82fd42f0$0200a8c0@structworks.com> Message-ID: That would be the last resort but I think I can fix it by following Neil's suggestion: saving the cart/session id in $_SESSION so it's not lost. --mark On Fri, Jul 25, 2008 at 6:04 PM, Daniel F. Kudwien wrote: >> To clarify, the issue I wrote about isn't related to >> $_SESSION, it's modules that store data in a separate table >> with session id as the key (as e-commerce does). It seems >> this may be a flawed data model unless there is some means >> for modules to respond to regenerated session ids. > > Did you already try: > > function mymodule_form_alter($form_id, &$form) { > if ($form_id == 'user_login' || $form_id == 'user_login_block') { > $form['submit'] = array('mymodule_pre_submit' => array()); > $form['submit']['mymodule_post_submit'] = array(); > } > } > > function mymodule_pre_submit($form_id, $form_values, $return) { > static $backup = array(); > if ($return) { > return $backup; > } > // Backup session data here > $backup = ... > // Invoke user login (hook_user) > user_login_submit(...); > } > > function mymodule_post_submit($form_id, $form_values) { > // Reset session data > $restored = mymodule_pre_submit(NULL, NULL, TRUE); > } > > ? Just an idea. > > But yes, dealing with hook_user() forms is quite a mess... > > From larry at garfieldtech.com Sat Jul 26 02:10:04 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Fri, 25 Jul 2008 21:10:04 -0500 Subject: [development] transferring session info across login event In-Reply-To: References: Message-ID: And for the love of god, keep the data you're saving small. Modules that store large amounts of data in the session, such as a fully loaded node, waste hundreds of megabytes of disk space from stale sessions. Seriously, burn the extra CPU cycles and keep the session size small. --Larry Garfield On Fri, 25 Jul 2008 17:59:12 -0700, "Neil Drumm" wrote: > Then the easiest thing to do is to use your own id set > $_SESSION['ecommerce_cart_id']. > > -Neil > > On Fri, Jul 25, 2008 at 5:46 PM, mark burdett wrote: > >> To clarify, the issue I wrote about isn't related to $_SESSION, it's >> modules that store data in a separate table with session id as the key >> (as e-commerce does). It seems this may be a flawed data model unless >> there is some means for modules to respond to regenerated session ids. >> >> --mark >> >> On Fri, Jul 25, 2008 at 5:09 PM, mark burdett > wrote: >> > I'd also like to know the proper technique for moving session data >> > from anonymous to logged in user. >> > >> > This diff >> > http://cvs.drupal.org/viewvc.py/drupal/drupal/modules/user/user.module?r1=1.745.2.30&r2=1.745.2.31&pathrev=DRUPAL-5 >> > shows how the session is now regenerated after a successful login and >> > before the login hook is invoked. This change breaks the ability to >> > login and keep the contents of your shopping cart in drupal e-commerce >> > 5-3, for example. Maybe pre-login and post-login hooks are needed? >> > >> > --mark >> > >> > On Wed, Jul 23, 2008 at 7:08 AM, Alan Dixon >> wrote: >> >> i'm wondering if your statement: >> >> >> >> "the login event regenerates the session" >> >> >> >> is completely true. >> >> >> >> I don't believe that the php session cookie changes, and I don't see >> >> anywhere (or why) drupal would completely remove all $_SESSION info > on >> >> login. >> >> >> >> I think what does happen is that Drupal's private session stuff as >> >> stored in the session table gets cleared out (primarily the user >> >> object that gets cached, i'm not sure what else), but you don't need >> >> to worry about that do you? >> >> >> >> Put all your pre-login stuff into $_SESSION and then it should still >> >> be there after login, I think. >> >> >> >> - Alan >> >> >> >> On Mon, Jul 14, 2008 at 1:37 PM, Joe Murray >> >> wrote: >> >>> I have a use case where anonymous users can do a bunch of work, and >> then at >> >>> the end request to save it, which requires logging in (and possibly >> also >> >>> creating an account). The login event regenerates the session, and > so >> far as >> >>> I know 5.x does not provide a hook that can be used to copy info > from >> the >> >>> old session into the new so that it can be saved in a way that is >> associated >> >>> with the correct uid. I suppose such a hook so would open up lots of >> >>> security issues. Still, this is the second time I've confronted this >> sort of >> >>> an issue, and I don't know the correct design pattern to handle it > in >> >>> Drupal. Comments and suggestions welcome. >> >>> >> >>> >> >>> >> >>> Cheers, >> >>> >> >>> >> >>> >> >>> Joe Murray, PhD >> >>> >> >>> President, JMA Consulting >> >>> >> >>> @ The Centre for Social Innovation >> >>> >> >>> 215 Spadina Ave, Suite 400, Toronto, Ontario, Canada M5T 2C7 >> >>> >> >>> 416.466.1281, (416) 644-0116 (f) >> >>> >> >>> joe.murray at jmaconsulting.biz >> >>> >> >>> Skype: josephpmurray >> >>> >> >>> >> >> >> >> >> >> >> >> -- >> >> Alan Dixon, Web Developer >> >> http://alan.g.dixon.googlepages.com/ >> >> >> > >> > > From matt at cabinetuk.com Tue Jul 29 16:00:02 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Tue, 29 Jul 2008 17:00:02 +0100 Subject: [development] module_preprocess_hook not always called Message-ID: Is there a reason why a module's preprocess function is not always called? I have several preprocess functions in a module, and I'd like to preprocess certain pieces of themed content based on content types specific to this module - so, it makes sense to me that the preprocess code should be in the module file. I've traced through the theme() call, and my module's preprocess function name appears in the $hooks array. For example, i'd like to hilight a menu, so I'm trying to preprocess theme(links). My theme has a theme_links function which generates the html output, but in this case the preprocess function is NOT called. For other pieces of themed output, using hook.tpl.php files, the preprocess functions ARE called. Is there a reason why? -Matt From cwgordon7 at cwgordon.com Tue Jul 29 16:07:19 2008 From: cwgordon7 at cwgordon.com (Charlie Gordon) Date: Tue, 29 Jul 2008 12:07:19 -0400 Subject: [development] module_preprocess_hook not always called In-Reply-To: References: Message-ID: <488F4037.4070200@cwgordon.com> Template preprocess functions are, as the name implies, only for templates. -Charlie Matt Connolly wrote: > My theme has a theme_links function which generates the html output, > but in this case the preprocess function is NOT called. > > For other pieces of themed output, using hook.tpl.php files, the > preprocess functions ARE called. From karoly at negyesi.net Tue Jul 29 16:14:28 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Tue, 29 Jul 2008 18:14:28 +0200 (CEST) Subject: [development] module_preprocess_hook not always called In-Reply-To: <488F4037.4070200@cwgordon.com> References: <488F4037.4070200@cwgordon.com> Message-ID: http://www.lullabot.com/articles/overriding-theme-functions-in-modules From merlin at logrus.com Tue Jul 29 16:17:23 2008 From: merlin at logrus.com (Earl Miles) Date: Tue, 29 Jul 2008 09:17:23 -0700 Subject: [development] module_preprocess_hook not always called In-Reply-To: References: Message-ID: <488F4293.8080405@logrus.com> Matt Connolly wrote: > Is there a reason why a module's preprocess function is not always called? The answer to your question is right in the theming documentation: http://drupal.org/node/223430 From matt at cabinetuk.com Tue Jul 29 16:28:55 2008 From: matt at cabinetuk.com (Matt Connolly) Date: Tue, 29 Jul 2008 17:28:55 +0100 Subject: [development] module_preprocess_hook not always called In-Reply-To: <488F4293.8080405@logrus.com> References: <488F4293.8080405@logrus.com> Message-ID: <02601A16-9C83-4B79-A2F2-AF291DED4D11@cabinetuk.com> No. My question is WHY? I can see that the preprocess functions are called for theme files and not for functions. I think it would be useful for everything. eg, quote (from http://api.drupal.org/api/function/theme) : -- For example, if a module named "foo" wanted to alter the $submitted variable for the hook "node" a preprocess function of foo_preprocess_node() can be created to intercept and alter the variable -- That seems like pretty useful functionality regardless of whether the content is generated by a function or a template file. Another email informing me about "hook_theme_registry_alter" was very useful - thanks. -Matt On 29/07/2008, at 5:17 PM, Earl Miles wrote: > Matt Connolly wrote: >> Is there a reason why a module's preprocess function is not always >> called? > > The answer to your question is right in the theming documentation: http://drupal.org/node/223430 From merlin at logrus.com Tue Jul 29 16:37:34 2008 From: merlin at logrus.com (Earl Miles) Date: Tue, 29 Jul 2008 09:37:34 -0700 Subject: [development] module_preprocess_hook not always called In-Reply-To: <02601A16-9C83-4B79-A2F2-AF291DED4D11@cabinetuk.com> References: <488F4293.8080405@logrus.com> <02601A16-9C83-4B79-A2F2-AF291DED4D11@cabinetuk.com> Message-ID: <488F474E.4030100@logrus.com> Matt Connolly wrote: > No. My question is WHY? For one, you really can't use the preprocessors with a theme function. With a template, you get a nice handy box of variables and you can do what you want with it. With a theme function, you get the variables that were defined, and that's it. Sure, theoretically you could massage those X variables a bit. The real reason, though, is performance. Templates take up to five times as long to run as theme functions; and Drupal has a couple of places where a single theme function might be called fifty or a hundred times on a page. This is discussed here: http://drupal.org/node/173880 and there is another mention of it here in the module developer's guide where we discuss that side of using the theme layer: http://drupal.org/node/165706 From marvil07 at gmail.com Wed Jul 30 03:25:01 2008 From: marvil07 at gmail.com (Marco Antonio Villegas Vega) Date: Tue, 29 Jul 2008 22:25:01 -0500 Subject: [development] howto about git and drupal modules maintain Message-ID: <20080729222501.78556963@rino> Hello all, I posted a little how to about maintaining drupal modules using git: http://drupal.org/node/288873 I'm sending this email because I see high activity on git related mails. Hope this helps, ________________________________ Marco Antonio Villegas Vega ( __ - __ ) Ing. Informatica http://blog.pucp.edu.pe/marvil07 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: not available Url : http://lists.drupal.org/pipermail/development/attachments/20080729/a4d15d04/attachment.pgp From gordon at heydon.com.au Wed Jul 30 04:57:09 2008 From: gordon at heydon.com.au (Gordon Heydon) Date: Wed, 30 Jul 2008 14:57:09 +1000 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <20080729222501.78556963@rino> References: <20080729222501.78556963@rino> Message-ID: <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> Hi, This looks really cool. I do all the e-Commerce development in git and esp when working with many branches it is so easy to keep it all in line with different versions. Fixing a bug in 1 very can very easily be copied to another branch, and I find that they will convert 80% of the time with no manual effort. However I don't like the CVS integration as much as I like the SVN integration. The SVN integration work much more like just another git repository and once you have made all the changes you can pass in all the commits at once. it is quite cool. Gordon. On 30/07/2008, at 1:25 PM, Marco Antonio Villegas Vega wrote: > Hello all, > > I posted a little how to about maintaining drupal modules using git: > http://drupal.org/node/288873 > > I'm sending this email because I see high activity on git related > mails. > > Hope this helps, > ________________________________ > > Marco Antonio Villegas Vega > ( __ - __ ) Ing. Informatica > http://blog.pucp.edu.pe/marvil07 > !DSPAM:1000,488fdef1230554881810528! From sanari9 at gmail.com Wed Jul 30 04:38:46 2008 From: sanari9 at gmail.com (sanaaris) Date: Tue, 29 Jul 2008 21:38:46 -0700 (PDT) Subject: [development] sanaaris has invited you to join SlideShare Message-ID: <20080730043846.882D16612B7@bipasha-pp.slideshare.net> An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080729/a73d1bbe/attachment.htm From sanari9 at gmail.com Wed Jul 30 04:35:20 2008 From: sanari9 at gmail.com (sanaaris) Date: Tue, 29 Jul 2008 21:35:20 -0700 (PDT) Subject: [development] sanaaris has invited you to join SlideShare Message-ID: <20080730043520.BFD1A6623D0@bipasha-pp.slideshare.net> An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080729/28e5f2e2/attachment-0001.htm From sirkitree at gmail.com Wed Jul 30 14:39:09 2008 From: sirkitree at gmail.com (Jerad Bitner) Date: Wed, 30 Jul 2008 10:39:09 -0400 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> Message-ID: <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> This looks really good, and may just give me the excuse I've been looking for to get into GIT, as CVS is somewhat of a pain IMO... but what I have yet to see is someone explain the pros and cons. GIT still looks to me like it's just a bunch more commands to try to memorize. Does anyone have some resources that clearly outline why anyone would want to use GIT over CVS or even SVN? Thanks, ~Jerad On Wed, Jul 30, 2008 at 12:57 AM, Gordon Heydon wrote: > Hi, > > This looks really cool. > > I do all the e-Commerce development in git and esp when working with many > branches it is so easy to keep it all in line with different versions. > > Fixing a bug in 1 very can very easily be copied to another branch, and I > find that they will convert 80% of the time with no manual effort. > > However I don't like the CVS integration as much as I like the SVN > integration. The SVN integration work much more like just another git > repository and once you have made all the changes you can pass in all the > commits at once. it is quite cool. > > Gordon. > > > On 30/07/2008, at 1:25 PM, Marco Antonio Villegas Vega wrote: > > Hello all, >> >> I posted a little how to about maintaining drupal modules using git: >> http://drupal.org/node/288873 >> >> I'm sending this email because I see high activity on git related mails. >> >> Hope this helps, >> ________________________________ >> >> Marco Antonio Villegas Vega >> ( __ - __ ) Ing. Informatica >> http://blog.pucp.edu.pe/marvil07 >> !DSPAM:1000,488fdef1230554881810528! >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080730/a90bdfb1/attachment.htm From rich at freestylesystems.co.uk Wed Jul 30 14:53:52 2008 From: rich at freestylesystems.co.uk (Richard Burford) Date: Wed, 30 Jul 2008 15:53:52 +0100 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> Message-ID: <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> I watched a talk by Linus Lorvalds on Git: http://video.google.com/videosearch?q=linus+git# It's quite entertaining if nothing else. Git seems to have real benefits when lots of people will be working on the same code and there is one moderator deciding what they want to 'pull' into the main branch. CVS is a pain, especially for beginners like me but I feel, since it's necessary for Drupal I just have to get used to it. Here's some information on Git vs SVN: http://git.or.cz/gitwiki/GitSvnComparsion psynaptic http://freestylesystems.co.uk http://api.freestylesystems.co.uk On 30 Jul 2008, at 15:39, Jerad Bitner wrote: > This looks really good, and may just give me the excuse I've been > looking > for to get into GIT, as CVS is somewhat of a pain IMO... but what I > have yet > to see is someone explain the pros and cons. > > GIT still looks to me like it's just a bunch more commands to try to > memorize. Does anyone have some resources that clearly outline why > anyone > would want to use GIT over CVS or even SVN? > > Thanks, > ~Jerad > > On Wed, Jul 30, 2008 at 12:57 AM, Gordon Heydon > wrote: > >> Hi, >> >> This looks really cool. >> >> I do all the e-Commerce development in git and esp when working >> with many >> branches it is so easy to keep it all in line with different >> versions. >> >> Fixing a bug in 1 very can very easily be copied to another branch, >> and I >> find that they will convert 80% of the time with no manual effort. >> >> However I don't like the CVS integration as much as I like the SVN >> integration. The SVN integration work much more like just another git >> repository and once you have made all the changes you can pass in >> all the >> commits at once. it is quite cool. >> >> Gordon. >> >> >> On 30/07/2008, at 1:25 PM, Marco Antonio Villegas Vega wrote: >> >> Hello all, >>> >>> I posted a little how to about maintaining drupal modules using git: >>> http://drupal.org/node/288873 >>> >>> I'm sending this email because I see high activity on git related >>> mails. >>> >>> Hope this helps, >>> ________________________________ >>> >>> Marco Antonio Villegas Vega >>> ( __ - __ ) Ing. Informatica >>> http://blog.pucp.edu.pe/marvil07 >>> !DSPAM:1000,488fdef1230554881810528! >>> >> >> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2437 bytes Desc: not available Url : http://lists.drupal.org/pipermail/development/attachments/20080730/c8f7ee75/attachment.bin From anisotropic at gmail.com Wed Jul 30 15:02:36 2008 From: anisotropic at gmail.com (Jeff Griffiths) Date: Wed, 30 Jul 2008 08:02:36 -0700 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> Message-ID: On Wed, Jul 30, 2008 at 7:53 AM, Richard Burford wrote: > CVS is a pain, especially for beginners like me but I feel, since it's > necessary for Drupal I just have to get used to it. CVS seems to still be around simply because no-one is willing to tackle the problem of going to svn or something else. Some other projects are moving away from CVS: Mozilla => Hg PHP => SVN IMHO Drupal could move at least to svn as it is much simpler to learn than CVS and has better tools for people that want to use things like git, hg or bazaar. D7 would have been a good point to do that but it doesn't seem to be a priority for core. Jeff From gerhard at killesreiter.de Wed Jul 30 15:19:29 2008 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Wed, 30 Jul 2008 17:19:29 +0200 Subject: [development] howto about git and drupal modules maintain In-Reply-To: References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> Message-ID: <48908681.2070504@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jeff Griffiths schrieb: > On Wed, Jul 30, 2008 at 7:53 AM, Richard Burford > wrote: > >> CVS is a pain, especially for beginners like me but I feel, since it's >> necessary for Drupal I just have to get used to it. > > CVS seems to still be around simply because no-one is willing to > tackle the problem of going to svn or something else. Some other > projects are moving away from CVS: > > Mozilla => Hg > PHP => SVN > > IMHO Drupal could move at least to svn as it is much simpler to learn > than CVS and has better tools for people that want to use things like > git, hg or bazaar. Please stop, we've had that discussion more often than I care to count. The gist is: As long as there are no suitable GUIs for dummies there is no point in moving away from CVS. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIkIaAfg6TFvELooQRArlCAJ4nUpLCnViM6Cvwn85fdXpFu/O3/QCfU3Er /csXDfR0fZB43wtBDu7rdRY= =4zcO -----END PGP SIGNATURE----- From kkaefer at gmail.com Wed Jul 30 15:23:25 2008 From: kkaefer at gmail.com (=?ISO-8859-1?Q?Konstantin_K=E4fer?=) Date: Wed, 30 Jul 2008 17:23:25 +0200 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <48908681.2070504@killesreiter.de> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> Message-ID: > The gist is: As long as there are no suitable GUIs for dummies there > is > no point in moving away from CVS. And: CVS working copies can be checked into an SVN repository without any problems. From Greg at GrowingVentureSolutions.com Wed Jul 30 15:35:16 2008 From: Greg at GrowingVentureSolutions.com (Greg Knaddison - GVS) Date: Wed, 30 Jul 2008 09:35:16 -0600 Subject: [development] howto about git and drupal modules maintain In-Reply-To: References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> Message-ID: <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> On Wed, Jul 30, 2008 at 9:23 AM, Konstantin K?fer wrote: >> The gist is: As long as there are no suitable GUIs for dummies there is >> no point in moving away from CVS. Well, there are quite good GUIs for svn (often better than those for CVS). But we need that and we need someone to take over and really support the version control API so that project/project_issue/project_release modules can be RCS independent (see http://lists.drupal.org/pipermail/development/2008-July/030453.html for a plea for help on this). > And: CVS working copies can be checked into an SVN repository without any > problems. I'm not sure where you were heading with this - perhaps that using CVS for the project makes it easy for all us developers who prefer SVN because we can include CVS into SVN. However, SVN working copies can be "checked into" SVN as well - see external/vendor branches. Regards, Greg -- Greg Knaddison Denver, CO | http://knaddison.com | 303-800-5623 Growing Venture Solutions, LLC | http://growingventuresolutions.com From kathleen at ceardach.com Wed Jul 30 15:40:13 2008 From: kathleen at ceardach.com (Kathleen Murtagh) Date: Wed, 30 Jul 2008 11:40:13 -0400 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> Message-ID: <1d83e3e60807300840l4df76d93pe3d9acb11cd8367f@mail.gmail.com> SVN vs Git Centralized vs Decentralized SVN (and CVS) is based on having a centralized repository while Git is decentralized. In SVN, committing, checking out, merging, etc, all need to check into the central (remote) repository. Git's decentralized nature means that all commits, reversions, checkouts, merges, etc, all happen locally. You literally have an entire copy of the repository, entire history and all, and you manually sync up to the central source being used by your team (this is both good and bad depending on your situation). You can do more work without an internet connection than you can with SVN. Since you have to manually sync with the "source control hub" with git, there are extra tools added to be able to manipulate your commits before syncing/pushing out to the hub/public. You can combine commits and rearrange their order to have a clean patch history of each change. The manual syncing also promotes smaller commits because you don't have to worry about breaking someone else's working copy between your commits. A large change can be pushed out instantaneously to your team in a batch of numerous commits. This promotes and encourages people to commit often, helping developers even with their own work. Speed SVN's speed is limited to your network connection. With Git entirely localized, your speed is only limited by your local environment. Internet only comes into the equation when you push your changes to the hub. A merge involving a large amount of files is lightning fast when compared to SVN (I've had checkouts/merges/etc take 20+ minutes). Setting up a repo in Git is also very fast. Since it's decentralized, there is no need for the overhead of creating the centralized location for storage like SVN/CVS. Just "git init" and "git add ." and you're ready to go. Merging Git is designed for the ease of branching and merging. It's goal is that you can maintain multiple branches and merge them with ease. It promotes and encourages the developer to branch because it's so easy. Revisioning SVN uses incremental revisions for the entire repository, trunk, branches, tags and all. Git uses just hashes to identify a unique commit. It thinks more along the lines of "how many commits from HEAD" rather than specific commits. Staging Git has an extra spot between a modified file and a committed change called "staging". This can make it easier to develop, to maintain that "inbetween" spot and not lose your changes. If you've ever copied a file even when working with SVN or CVS, then you'll find staging commits valuable. --- Kathleen Murtagh On Wed, Jul 30, 2008 at 10:39 AM, Jerad Bitner wrote: > This looks really good, and may just give me the excuse I've been looking > for to get into GIT, as CVS is somewhat of a pain IMO... but what I have yet > to see is someone explain the pros and cons. > > GIT still looks to me like it's just a bunch more commands to try to > memorize. Does anyone have some resources that clearly outline why anyone > would want to use GIT over CVS or even SVN? > > Thanks, > ~Jerad > > On Wed, Jul 30, 2008 at 12:57 AM, Gordon Heydon > wrote: >> >> Hi, >> >> This looks really cool. >> >> I do all the e-Commerce development in git and esp when working with many >> branches it is so easy to keep it all in line with different versions. >> >> Fixing a bug in 1 very can very easily be copied to another branch, and I >> find that they will convert 80% of the time with no manual effort. >> >> However I don't like the CVS integration as much as I like the SVN >> integration. The SVN integration work much more like just another git >> repository and once you have made all the changes you can pass in all the >> commits at once. it is quite cool. >> >> Gordon. >> >> On 30/07/2008, at 1:25 PM, Marco Antonio Villegas Vega wrote: >> >>> Hello all, >>> >>> I posted a little how to about maintaining drupal modules using git: >>> http://drupal.org/node/288873 >>> >>> I'm sending this email because I see high activity on git related mails. >>> >>> Hope this helps, >>> ________________________________ >>> >>> Marco Antonio Villegas Vega >>> ( __ - __ ) Ing. Informatica >>> http://blog.pucp.edu.pe/marvil07 >>> !DSPAM:1000,488fdef1230554881810528! >> > > From mail at webthatworks.it Wed Jul 30 15:57:05 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Wed, 30 Jul 2008 17:57:05 +0200 Subject: [development] howto about git and drupal modules maintain In-Reply-To: References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> Message-ID: <20080730175705.6439705a@dawn.webthatworks.it> On Wed, 30 Jul 2008 08:02:36 -0700 "Jeff Griffiths" wrote: > On Wed, Jul 30, 2008 at 7:53 AM, Richard Burford > wrote: > > > CVS is a pain, especially for beginners like me but I feel, > > since it's necessary for Drupal I just have to get used to it. > > CVS seems to still be around simply because no-one is willing to > tackle the problem of going to svn or something else. Some other > projects are moving away from CVS: > > Mozilla => Hg > PHP => SVN > IMHO Drupal could move at least to svn as it is much simpler to > learn than CVS and has better tools for people that want to use > things like git, hg or bazaar. D7 would have been a good point to > do that but it doesn't seem to be a priority for core. I'm on svn BUT svn is an old tool too. If we are really willing to take the challenge of a change in infrastructure the family of tools to whom git belongs (like bazaar, mercurial, darcs...) could be a good chance to make a longer leap. Don't any of these tools have good GUI for Windows too? -- Ivan Sergio Borgonovo http://www.webthatworks.it From cxjohnson at gmail.com Wed Jul 30 16:06:52 2008 From: cxjohnson at gmail.com (Chris Johnson) Date: Wed, 30 Jul 2008 11:06:52 -0500 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> Message-ID: <9ea8d6030807300906t5a5927d7p7e4c9734413ae385@mail.gmail.com> You can always watch Linus Torvalds talk about why GIT is wonderful and all the rest suck at Youtube: http://www.youtube.com/watch?v=4XpnKHJAok8 Of course, Linus is not at all opinionated. :-) On Wed, Jul 30, 2008 at 9:39 AM, Jerad Bitner wrote: > GIT still looks to me like it's just a bunch more commands to try to > memorize. Does anyone have some resources that clearly outline why anyone > would want to use GIT over CVS or even SVN? From sean at practicalweb.co.uk Wed Jul 30 16:25:46 2008 From: sean at practicalweb.co.uk (Sean Burlington) Date: Wed, 30 Jul 2008 17:25:46 +0100 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <9ea8d6030807300906t5a5927d7p7e4c9734413ae385@mail.gmail.com> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <9ea8d6030807300906t5a5927d7p7e4c9734413ae385@mail.gmail.com> Message-ID: <4890960A.9050306@practicalweb.co.uk> Chris Johnson wrote: > You can always watch Linus Torvalds talk about why GIT is wonderful > and all the rest suck at Youtube: > http://www.youtube.com/watch?v=4XpnKHJAok8 > > Of course, Linus is not at all opinionated. :-) > he's earned the right though! -- Sean Burlington www.practicalweb.co.uk From drupal at dwwright.net Wed Jul 30 16:50:01 2008 From: drupal at dwwright.net (Derek Wright) Date: Wed, 30 Jul 2008 09:50:01 -0700 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> Message-ID: <93BFB02C-81F4-4988-80E9-849A1A6E8DF0@dwwright.net> On Jul 30, 2008, at 8:35 AM, Greg Knaddison - GVS wrote: > Well, there are quite good GUIs for svn (often better than those > for CVS). git can pretend to be a CVS pserver, so I believe you can just use all the CVS clients directly and point them at git. > But we need that and we need someone to take over and really support > the version control API so that project/project_issue/project_release > modules can be RCS independent (see > http://lists.drupal.org/pipermail/development/2008-July/030453.html > for a plea for help on this). That's the heart of the matter. In addition to someone to adopt, fix, maintain and extend the versioncontrol API and the appropriate backend (versioncontrol_git, presumably), the other big hurdle here is that someone also needs to volunteer to be The Main Support Person(tm) for the 100s (1000s) of support questions that are going to be generated as a result of moving to a distributed version control system for the Drupal developer community. I'm not taking that job. Above person also gets to rewrite dozens of handbook pages and keep them current/ accurate. You'll probably want to start giving talks at every DrupalCon about distributed version control, too. ;) Cheers, -Derek (dww) From drupal-devel at webchick.net Wed Jul 30 16:50:25 2008 From: drupal-devel at webchick.net (Angela Byron) Date: Wed, 30 Jul 2008 12:50:25 -0400 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? Message-ID: <48909BD1.2020908@webchick.net> Since we're all sick of answering this question every week, I've made an attempt at documenting this here: http://drupal.org/node/289117 If someone has some of the old threads laying around and could help flesh that page out (esp. with "here's where you jump in if you want to change this" stuff), that'd be lovely. -Angie From weitzman at tejasa.com Wed Jul 30 16:52:17 2008 From: weitzman at tejasa.com (Moshe Weitzman) Date: Wed, 30 Jul 2008 12:52:17 -0400 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48909BD1.2020908@webchick.net> References: <48909BD1.2020908@webchick.net> Message-ID: <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> Thanks ... would you consider retitling it to "How you can help Drupal migrate to a modern RCS."? I think thats more positive. Virtually all agree that the current situation is non ideal. On Wed, Jul 30, 2008 at 12:50 PM, Angela Byron wrote: > Since we're all sick of answering this question every week, I've made an > attempt at documenting this here: > > http://drupal.org/node/289117 > > If someone has some of the old threads laying around and could help flesh > that page out (esp. with "here's where you jump in if you want to change > this" stuff), that'd be lovely. > > -Angie > From drupal-devel at webchick.net Wed Jul 30 17:04:42 2008 From: drupal-devel at webchick.net (Angela Byron) Date: Wed, 30 Jul 2008 13:04:42 -0400 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> Message-ID: <48909F2A.7030700@webchick.net> Moshe Weitzman wrote: > Thanks ... would you consider retitling it to "How you can help Drupal > migrate to a modern RCS."? I think thats more positive. Virtually all > agree that the current situation is non ideal. I'd be more than happy to do that if people can start adding enough information about relevant issues, groups, mailing list threads, etc. that tell people how to help, in order to warrant the title change. :) Derek? Chad? Adam? Jakob? -Angie From sirkitree at gmail.com Wed Jul 30 18:11:52 2008 From: sirkitree at gmail.com (Jerad Bitner) Date: Wed, 30 Jul 2008 14:11:52 -0400 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <93BFB02C-81F4-4988-80E9-849A1A6E8DF0@dwwright.net> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> <93BFB02C-81F4-4988-80E9-849A1A6E8DF0@dwwright.net> Message-ID: <215a89c90807301111p5a2bdbadl94abe306c7d89ad1@mail.gmail.com> Sounds like we need more of a task force then a single person, dww :) On Wed, Jul 30, 2008 at 12:50 PM, Derek Wright wrote: > > On Jul 30, 2008, at 8:35 AM, Greg Knaddison - GVS wrote: > > Well, there are quite good GUIs for svn (often better than those for CVS). >> > > git can pretend to be a CVS pserver, so I believe you can just use all the > CVS clients directly and point them at git. > > But we need that and we need someone to take over and really support >> the version control API so that project/project_issue/project_release >> modules can be RCS independent (see >> http://lists.drupal.org/pipermail/development/2008-July/030453.html >> for a plea for help on this). >> > > That's the heart of the matter. > > In addition to someone to adopt, fix, maintain and extend the > versioncontrol API and the appropriate backend (versioncontrol_git, > presumably), the other big hurdle here is that someone also needs to > volunteer to be The Main Support Person(tm) for the 100s (1000s) of support > questions that are going to be generated as a result of moving to a > distributed version control system for the Drupal developer community. I'm > not taking that job. Above person also gets to rewrite dozens of handbook > pages and keep them current/accurate. You'll probably want to start giving > talks at every DrupalCon about distributed version control, too. ;) > > Cheers, > -Derek (dww) > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080730/f857ad01/attachment.htm From aclight at gmail.com Wed Jul 30 18:34:55 2008 From: aclight at gmail.com (Adam Light) Date: Wed, 30 Jul 2008 13:34:55 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48909F2A.7030700@webchick.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: On Wed, Jul 30, 2008 at 12:04 PM, Angela Byron wrote: > Moshe Weitzman wrote: >> >> Thanks ... would you consider retitling it to "How you can help Drupal >> migrate to a modern RCS."? I think thats more positive. Virtually all >> agree that the current situation is non ideal. > > I'd be more than happy to do that if people can start adding enough > information about relevant issues, groups, mailing list threads, etc. that > tell people how to help, in order to warrant the title change. :) > > Derek? Chad? Adam? Jakob? > > -Angie > I'm not sure if, practically speaking, there is anything any one or two people can do. I've seen almost no support in either IRC or various mailing lists by the key infrastructure players for SVN, and I'm not sure saying something like "we could move to XXX if only there were GUI clients available, so you could help by writing one of those" is very helpful. For the moment, I think the first major obstacle is getting the Version Control API functional and writing the tie ins with the project module, which Angie already mentioned in the handbook page (the stuff at http://groups.drupal.org/node/8102). But really, even more important than that is the port of project* to D6. Once all of this is done I think the next logical step would be picking a new RCS, because it wouldn't make sense to, in parallel, write backends, rewrite help, etc. if we didn't know what RCS we were going to go to. I really have no idea who would make a decision like that. Perhaps whomever that is (or whatever group of people that is) should raise their hands and explain what kind of argument would need to be made for them to be convinced. How many GUI clients need to be available, what platforms, etc.? Without any solid information on who makes such a decision and what would cause them to agree to move from CVS, I'm not sure that we can give solid information on how people could help. Also, just saying that the infrastructure team decides is not helpful, because clearly not all "members" of the infrastructure team are equal. Adam From gordon at heydon.com.au Thu Jul 31 00:08:23 2008 From: gordon at heydon.com.au (Gordon Heydon) Date: Thu, 31 Jul 2008 10:08:23 +1000 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> Message-ID: <294D2FF4-8814-423F-A794-0344B8C824AC@heydon.com.au> Hi, On 31/07/2008, at 12:39 AM, Jerad Bitner wrote: > This looks really good, and may just give me the excuse I've been > looking for to get into GIT, as CVS is somewhat of a pain IMO... but > what I have yet to see is someone explain the pros and cons. For it is the fact that git is a distributed and it is extremely fast. > > > GIT still looks to me like it's just a bunch more commands to try to > memorize. Does anyone have some resources that clearly outline why > anyone would want to use GIT over CVS or even SVN? Again it is distributed. this means that I can commit to my repository anytime I want and I don't need to have access to the internet. The other thing is that it do not have to have commit access to a repository. So if I do some core development, and send in the patch when it gets committed, if someone looks at the commit, it will say that I was the author, and if Dries committed, he is the committer. But also if killes and chx handled the patch they can both sign it to say that it was "inspected by #12" ;) Also branching in git is just the best. it puts CVS's branching to shame. You really start to learn what branching is about. Gordon. > > > Thanks, > ~Jerad > > On Wed, Jul 30, 2008 at 12:57 AM, Gordon Heydon > wrote: > Hi, > > This looks really cool. > > I do all the e-Commerce development in git and esp when working with > many branches it is so easy to keep it all in line with different > versions. > > Fixing a bug in 1 very can very easily be copied to another branch, > and I find that they will convert 80% of the time with no manual > effort. > > However I don't like the CVS integration as much as I like the SVN > integration. The SVN integration work much more like just another > git repository and once you have made all the changes you can pass > in all the commits at once. it is quite cool. > > Gordon. > > > On 30/07/2008, at 1:25 PM, Marco Antonio Villegas Vega wrote: > > Hello all, > > I posted a little how to about maintaining drupal modules using git: > http://drupal.org/node/288873 > > I'm sending this email because I see high activity on git related > mails. > > Hope this helps, > ________________________________ > > Marco Antonio Villegas Vega > ( __ - __ ) Ing. Informatica > http://blog.pucp.edu.pe/marvil07 > > > > !DSPAM:1000,4890806a256071421416041! From gordon at heydon.com.au Thu Jul 31 00:11:36 2008 From: gordon at heydon.com.au (Gordon Heydon) Date: Thu, 31 Jul 2008 10:11:36 +1000 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <48908681.2070504@killesreiter.de> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> Message-ID: <4FC584C5-E4B7-47A4-889D-408A989B6FFE@heydon.com.au> Hi, On 31/07/2008, at 1:19 AM, Gerhard Killesreiter wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jeff Griffiths schrieb: >> On Wed, Jul 30, 2008 at 7:53 AM, Richard Burford >> wrote: >> >>> CVS is a pain, especially for beginners like me but I feel, since >>> it's >>> necessary for Drupal I just have to get used to it. >> >> CVS seems to still be around simply because no-one is willing to >> tackle the problem of going to svn or something else. Some other >> projects are moving away from CVS: >> >> Mozilla => Hg >> PHP => SVN >> >> IMHO Drupal could move at least to svn as it is much simpler to learn >> than CVS and has better tools for people that want to use things like >> git, hg or bazaar. > > Please stop, we've had that discussion more often than I care to > count. > > The gist is: As long as there are no suitable GUIs for dummies there > is > no point in moving away from CVS. Well then we can move to git! We will schedule it for next week ;) git has a CVS server to allow users to use CVS to make commits. So all CVS GUI's work with git. Gordon. > > > > Cheers, > Gerhard > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFIkIaAfg6TFvELooQRArlCAJ4nUpLCnViM6Cvwn85fdXpFu/O3/QCfU3Er > /csXDfR0fZB43wtBDu7rdRY= > =4zcO > -----END PGP SIGNATURE----- > > !DSPAM:1000,489089ea257761670870668! > From drupal at samboyer.org Thu Jul 31 02:44:35 2008 From: drupal at samboyer.org (Sam Boyer) Date: Wed, 30 Jul 2008 21:44:35 -0500 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> Message-ID: <1217472275.27664.15.camel@thereishope> On Wed, 2008-07-30 at 09:35 -0600, Greg Knaddison - GVS wrote: > On Wed, Jul 30, 2008 at 9:23 AM, Konstantin K?fer wrote: > >> The gist is: As long as there are no suitable GUIs for dummies there is > >> no point in moving away from CVS. > > Well, there are quite good GUIs for svn (often better than those for CVS). > > But we need that and we need someone to take over and really support > the version control API so that project/project_issue/project_release > modules can be RCS independent (see > http://lists.drupal.org/pipermail/development/2008-July/030453.html > for a plea for help on this). > Sorry, jpetso and I never actually did announce over this list, as I immediately took the conversation to one-on-one emails; I imagine the only reason he hasn't responded already is because he's currently on vacation. I offered to take over Version Control API, as well as the rcs-specific extension modules that jpetso was maintainer of (cvs and svn), as long as there wasn't somebody else hot to trot on it. I haven't talked to the maintainers of the hg (ezyang) and git (boombatower) extension modules, but if need be I may step up for those as well once things have moved forward with the API itself. He provided me with a quick-but-effective brain dump about the whole deal prior to his departure, and I've now got quite a lot of information to go on. I don't anticipate that I'll have time to really crack down to it for at least a few weeks, but I am hoping to dig in before Szeged. > > And: CVS working copies can be checked into an SVN repository without any > > problems. > > I'm not sure where you were heading with this - perhaps that using CVS > for the project makes it easy for all us developers who prefer SVN > because we can include CVS into SVN. However, SVN working copies can > be "checked into" SVN as well - see external/vendor branches. > > Regards, > Greg > From drupal at samboyer.org Thu Jul 31 03:09:56 2008 From: drupal at samboyer.org (Sam Boyer) Date: Wed, 30 Jul 2008 22:09:56 -0500 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <1217472275.27664.15.camel@thereishope> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> <1217472275.27664.15.camel@thereishope> Message-ID: <1217473796.27664.21.camel@thereishope> So my initial note was cryptic and very badly written. My apologies. Here's the point: I've taken over Version Control API from Jakob. I hope to start work with it shortly before Szeged. Sam On Wed, 2008-07-30 at 21:44 -0500, Sam Boyer wrote: > On Wed, 2008-07-30 at 09:35 -0600, Greg Knaddison - GVS wrote: > > On Wed, Jul 30, 2008 at 9:23 AM, Konstantin K?fer wrote: > > >> The gist is: As long as there are no suitable GUIs for dummies there is > > >> no point in moving away from CVS. > > > > Well, there are quite good GUIs for svn (often better than those for CVS). > > > > But we need that and we need someone to take over and really support > > the version control API so that project/project_issue/project_release > > modules can be RCS independent (see > > http://lists.drupal.org/pipermail/development/2008-July/030453.html > > for a plea for help on this). > > > > Sorry, jpetso and I never actually did announce over this list, as I > immediately took the conversation to one-on-one emails; I imagine the > only reason he hasn't responded already is because he's currently on > vacation. > > I offered to take over Version Control API, as well as the rcs-specific > extension modules that jpetso was maintainer of (cvs and svn), as long > as there wasn't somebody else hot to trot on it. I haven't talked to the > maintainers of the hg (ezyang) and git (boombatower) extension modules, > but if need be I may step up for those as well once things have moved > forward with the API itself. He provided me with a quick-but-effective > brain dump about the whole deal prior to his departure, and I've now got > quite a lot of information to go on. I don't anticipate that I'll have > time to really crack down to it for at least a few weeks, but I am > hoping to dig in before Szeged. > > > > And: CVS working copies can be checked into an SVN repository without any > > > problems. > > > > I'm not sure where you were heading with this - perhaps that using CVS > > for the project makes it easy for all us developers who prefer SVN > > because we can include CVS into SVN. However, SVN working copies can > > be "checked into" SVN as well - see external/vendor branches. > > > > Regards, > > Greg > > > From Greg at GrowingVentureSolutions.com Thu Jul 31 03:23:04 2008 From: Greg at GrowingVentureSolutions.com (Greg at GrowingVentureSolutions.com) Date: Wed, 30 Jul 2008 21:23:04 -0600 Subject: [development] howto about git and drupal modules maintain In-Reply-To: <1217473796.27664.21.camel@thereishope> References: <20080729222501.78556963@rino> <509EA03E-0E5F-4F5C-A6BE-88B1B5F83D9F@heydon.com.au> <215a89c90807300739g113df79cvce2703cdd0dd1fe1@mail.gmail.com> <868B7E22-7F01-4B77-838C-E2CA4AFE4B05@freestylesystems.co.uk> <48908681.2070504@killesreiter.de> <3861c6770807300835o390acf9cs1cfbf87dc1c701af@mail.gmail.com> <1217472275.27664.15.camel@thereishope> <1217473796.27664.21.camel@thereishope> Message-ID: <3861c6770807302023y1fbaf3e5gf68fe15cecdcd386@mail.gmail.com> I think most folks are happy to put up with cryptic and badly written if the message is so good ;) thanks for volunteering to maintain that module and for the update. -- Greg Knaddison Denver, CO | http://knaddison.com | 303-800-5623 Growing Venture Solutions, LLC | http://growingventuresolutions.com From drupal at dwwright.net Thu Jul 31 08:03:21 2008 From: drupal at dwwright.net (Derek Wright) Date: Thu, 31 Jul 2008 01:03:21 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: (This discussion is more relevant in this thread -- the other thread was really just about a document someone wrote describing how to use git and CVS together...) On Jul 30, 2008, at 8:09 PM, Sam Boyer wrote: > I've taken over Version Control API from Jakob. I hope to start > work with it shortly before Szeged. This is indeed good news (and news to me). Note to others who care about this topic: this isn't really a 1- person job. So, don't let Sam's offer stop you from also stepping forward to volunteer. ;) Also, what Adam wrote is still incredibly relevant for the drupal.org implications of versioncontrol API and friends: A) How do "we" decide which RCS to move to, assuming everything else is in place? B) Who's the "we" who makes this decision? Further, I'd add the following for everyone to chew over: C) Do we move everything at once, or do we just move core to the new thing, and leave contrib with CVS as an interim measure to prevent large-scale, simultaneous catastrophe on all sides? ;) D) Do we leave open the possibility that each project on d.o can choose if it wants CVS or XXX? Do we provide multiple alternatives (svn + git?). I'm 95% sure that the original specs for versioncontrol API and the intended interface with project* left this as an option. So, even if it's not technically possible now, it should be by the time everything is all tied together. The question is do we even want to turn that on on d.o, or not. If we can all be respectful and manage to prevent this from becoming Yet Another Bikeshed Thread, the chances of any of this actually coming into existence will be higher. In fact, I'd recommend that no one attempts to answer any of these questions for at least 24 hours after reading this message. Just let it soak in before you say what you think. (C) won't need to be answered for at least 3 months, probably longer. (A), (B) and (D) should be answered sooner, but not immediately. Cheers, -Derek (dww) From gerhard at killesreiter.de Thu Jul 31 08:21:36 2008 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Thu, 31 Jul 2008 10:21:36 +0200 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: <48917610.9000900@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Derek Wright schrieb: > Also, what Adam wrote is still incredibly relevant for the drupal.org > implications of versioncontrol API and friends: > > A) How do "we" decide which RCS to move to, assuming everything else > is in place? Note that I am not convinced that we need to move at all. :p > B) Who's the "we" who makes this decision? The drupal.org infratructure team based on the input of the developer community. Any change to the core repo is basically dependend on Dries' approval. > Further, I'd add the following for everyone to chew over: > > C) Do we move everything at once, or do we just move core to the new > thing, and leave contrib with CVS as an interim measure to prevent > large-scale, simultaneous catastrophe on all sides? ;) I think that assuming we 1) want to move at all 2) manage to agree on a system to move to and 3) Dries agrees with this would be a good plan. > D) Do we leave open the possibility that each project on d.o can > choose if it wants CVS or XXX? Certainly not. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIkXYPfg6TFvELooQRAqnlAJ4tKEYd6OakkbDSdjkRob9OZKAjbQCfXyp6 xFhfQiIoedGBXAbeh0gUBP0= =jQfY -----END PGP SIGNATURE----- From karoly at negyesi.net Thu Jul 31 10:42:17 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Thu, 31 Jul 2008 12:42:17 +0200 (CEST) Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48909F2A.7030700@webchick.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: If we move, we move to SVN. My team, consisting of mostly pretty good coders tried a few distributed RCSes and given this experience I am now vehemently against any DRCS. The concepts are way too heavy and the utilities are not ready. Most of these systems are not that mature thus any docs from 1-2 years ago are worthless thus documentation is not much. When I was for a DRCS in 2005/2006 I was a naive greenhorn sorry for the ruckus I caused then, I now know better. And back to Drupal contrib, at least with a central repo you can have some central control trying to keep order but with a DRCS all bets are off. Check contrib CVS root for all the crap our CVS challenged contributors add there and think what would ensue with a DRCS. It's highly debatable that the most serious of our problems, namely understanding RCS would be solved by any DRCS. You sure want to explain multiple heads for one or patch algebra for another? How does 140+ commands sound (and then some has one or two superb powerful switches...) This is a terrible mess. Now, with SVN we wll need a script to stop tagged things from being changed because they are not immutable as they were in CVS -- but this is readily available and this is the only problem I am aware of. SVN concepts are mapping much better to reality -- one dir per branch/tag. Makes it (much) easier to understand. You already keep a separate directory for your branches so that's how the repository looks like, easy! Thus it _will_ solve some problems -- another problem with DRCS that it does nto solve the problems we have :) SVN tools are available. SVN is mature and documentation is plentiful. svn 1.5 added merge tracking for (much) better team work. Feature foo and bar might be unavailable for SVN but I can not care , we need something that we, we all of the Drupal community can use. Once the reboot of my life is complete (read: September) I will rejoin the moving effort and help. From karoly at negyesi.net Thu Jul 31 10:44:26 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Thu, 31 Jul 2008 12:44:26 +0200 (CEST) Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48909F2A.7030700@webchick.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: If we move, we move to SVN. My team, consisting of mostly pretty good coders tried a few distributed RCSes and given this experience I am now vehemently against any DRCS. The concepts are way too heavy and the utilities are not ready. Most of these systems are not that mature thus any docs from 1-2 years ago are worthless thus documentation is not much. When I was for a DRCS in 2005/2006 I was a naive greenhorn sorry for the ruckus I caused then, I now know better. And back to Drupal contrib, at least with a central repo you can have some central control trying to keep order but with a DRCS all bets are off. Check contrib CVS root for all the crap our CVS challenged contributors add there and think what would ensue with a DRCS. It's highly debatable that the most serious of our problems, namely understanding RCS would be solved by any DRCS. You sure want to explain multiple heads for one or patch algebra for another? How does 140+ commands sound (and then some has one or two superb powerful switches...) This is a terrible mess. Now, with SVN we wll need a script to stop tagged things from being changed because they are not immutable as they were in CVS -- but this is readily available and this is the only problem I am aware of. SVN concepts are mapping much better to reality -- one dir per branch/tag. Makes it (much) easier to understand. You already keep a separate directory for your branches so that's how the repository looks like, easy! Thus it _will_ solve some problems -- another problem with DRCS that it does nto solve the problems we have :) SVN tools are available. SVN is mature and documentation is plentiful. svn 1.5 added merge tracking for (much) better team work. Feature foo and bar might be unavailable for SVN but I can not care , we need something that we, we all of the Drupal community can use. Once the reboot of my life is complete (read: September) I will rejoin the moving effort and help. From adrian at bryght.com Thu Jul 31 10:51:16 2008 From: adrian at bryght.com (Adrian Rossouw) Date: Thu, 31 Jul 2008 12:51:16 +0200 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: On 31 Jul 2008, at 12:42 PM, Karoly Negyesi wrote: > If we move, we move to SVN. My team, consisting of mostly pretty > good coders tried a few distributed RCSes and given this experience > I am now vehemently against any DRCS. The concepts are way too heavy > and the utilities are not ready. Most of these systems are not that > mature thus any docs from 1-2 years ago are worthless thus > documentation is not much. When I was for a DRCS in 2005/2006 I was > a naive greenhorn sorry for the ruckus I caused then, I now know > better. Wow. that's quite a turn around =) I also like SVN over the others in that it removes complexity instead of adds more. From gerhard at killesreiter.de Thu Jul 31 11:04:58 2008 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Thu, 31 Jul 2008 13:04:58 +0200 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: <48919C5A.6000102@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Adrian Rossouw schrieb: > > On 31 Jul 2008, at 12:42 PM, Karoly Negyesi wrote: > >> If we move, we move to SVN. My team, consisting of mostly pretty good >> coders tried a few distributed RCSes and given this experience I am >> now vehemently against any DRCS. The concepts are way too heavy and >> the utilities are not ready. Most of these systems are not that mature >> thus any docs from 1-2 years ago are worthless thus documentation is >> not much. When I was for a DRCS in 2005/2006 I was a naive greenhorn >> sorry for the ruckus I caused then, I now know better. > > Wow. that's quite a turn around =) > > I also like SVN over the others in that it removes complexity instead of > adds more. Well, then we just can stay with CVS. IMO SVN's features aren't that vastly superior to spend much effort on moving. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIkZxafg6TFvELooQRAph7AKC5Nxz9w7+daWj+qqUnWPJFpF+mtwCcCtgj UzCtAaieYuBfgsJOck3O2Fc= =kfzb -----END PGP SIGNATURE----- From aclight at gmail.com Thu Jul 31 11:04:41 2008 From: aclight at gmail.com (Adam Light) Date: Thu, 31 Jul 2008 06:04:41 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48917610.9000900@killesreiter.de> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48917610.9000900@killesreiter.de> Message-ID: On Thu, Jul 31, 2008 at 3:21 AM, Gerhard Killesreiter wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Derek Wright schrieb: >> B) Who's the "we" who makes this decision? > > The drupal.org infratructure team based on the input of the developer > community. > This is the kind of answer I expected to be provided, but I think it's way to vague. Who is the drupal.org infrastructure team? People with accounts on infrastructure.drupal.org? People with some kind of shell access to the drupal.org infrastructure? If either of these were the actual criteria, then I would not be considered to be on the team, yet in my own mind I do consider myself part of the team. How would the team go about this decision? A simple vote? Does the majority rule, or does it need to be unanimous? I know that the drupal community itself is quite decentralized, and that we probably don't have answers to a lot of the questions above, maybe because such things haven't come up before. But, in my opinion, this decentralization makes it hard to get a lot of things done, since it's never clear who would make the decision and how. The drupal.org redesign is, from my perspective, caught in a similar situation. Even if the answer of "who makes the decision to switch to a new RCS" was "Gerhard Killesreiter", at least it would be more clear what needs to be done to switch. As is, I still think it's totally unclear. Adam From gordon at heydon.com.au Thu Jul 31 11:38:55 2008 From: gordon at heydon.com.au (Gordon Heydon) Date: Thu, 31 Jul 2008 21:38:55 +1000 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: <8290C899-9906-4543-B5B5-FFCFEDDE672A@heydon.com.au> Hi, I have a couple of projects running in Darcs and the repository does not scale at all! I am talking about small projects and when I get to around 500 commits the system really starts getting soooooo sloooooow. If it needs to be a centralize RCS, the I hope to SVN mainly because the git connectivity is so good, and it really works like just another git repository. How ever because SVN doesn't know how to tag or branch I don't think that the upstream use of branches will work that well. Gordon. On 31/07/2008, at 8:42 PM, Karoly Negyesi wrote: > If we move, we move to SVN. My team, consisting of mostly pretty > good coders tried a few distributed RCSes and given this experience > I am now vehemently against any DRCS. The concepts are way too heavy > and the utilities are not ready. Most of these systems are not that > mature thus any docs from 1-2 years ago are worthless thus > documentation is not much. When I was for a DRCS in 2005/2006 I was > a naive greenhorn sorry for the ruckus I caused then, I now know > better. > > And back to Drupal contrib, at least with a central repo you can > have some central control trying to keep order but with a DRCS all > bets are off. Check contrib CVS root for all the crap our CVS > challenged contributors add there and think what would ensue with a > DRCS. > > It's highly debatable that the most serious of our problems, namely > understanding RCS would be solved by any DRCS. You sure want to > explain multiple heads for one or patch algebra for another? How > does 140+ commands sound (and then some has one or two superb > powerful switches...) This is a terrible mess. > > Now, with SVN we wll need a script to stop tagged things from being > changed because they are not immutable as they were in CVS -- but > this is readily available and this is the only problem I am aware > of. SVN concepts are mapping much better to reality -- one dir per > branch/tag. Makes it (much) easier to understand. You already keep a > separate directory for your branches so that's how the repository > looks like, easy! Thus it _will_ solve some problems -- another > problem with DRCS that it does nto solve the problems we have :) SVN > tools are available. SVN is mature and documentation is plentiful. > svn 1.5 added merge tracking for (much) better team work. > > Feature foo and bar might be unavailable for SVN but I can not > care , we need something that we, we all of the Drupal community can > use. > > Once the reboot of my life is complete (read: September) I will > rejoin the moving effort and help. > > !DSPAM:1000,4891974841741299430736! > From gerhard at killesreiter.de Thu Jul 31 12:09:45 2008 From: gerhard at killesreiter.de (Gerhard Killesreiter) Date: Thu, 31 Jul 2008 14:09:45 +0200 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48917610.9000900@killesreiter.de> Message-ID: <4891AB89.1010500@killesreiter.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Adam Light schrieb: > On Thu, Jul 31, 2008 at 3:21 AM, Gerhard Killesreiter > wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> Derek Wright schrieb: >>> B) Who's the "we" who makes this decision? >> The drupal.org infratructure team based on the input of the developer >> community. >> > > This is the kind of answer I expected to be provided, but I think > it's way to vague. Kieran recently explained what "infrastructure team" means: http://lists.drupal.org/private/infrastructure/2008-July/012056.html > How would the team go about this decision? A simple vote? Does the > majority rule, or does it need to be unanimous? We'd need to reach an agreement in a similar way that we do reach agreements about patches that go into Drupal: By discussion among experts. > Even if the answer of "who makes the decision to switch to a new > RCS" was "Gerhard Killesreiter", at least it would be more clear > what needs to be done to switch. As is, I still think it's totally > unclear. Since I am ultimately responsible for running drupal.org I of course wouldn't agree to running a RCS that would likely exceed our servers capabilities or put a lot of work on the table of the infrastructure team by creating support requests. Cheers, Gerhard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIkauIfg6TFvELooQRAkcSAJ9v7YAIkZpEgnmw5kEgdwVFlpwGiACfXpnV 52dAH3OzsWjx7GdEjE1QrFA= =4I/N -----END PGP SIGNATURE----- From adrinux at perlucida.com Thu Jul 31 12:40:40 2008 From: adrinux at perlucida.com (Adrian Simmons) Date: Thu, 31 Jul 2008 13:40:40 +0100 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891AB89.1010500@killesreiter.de> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48917610.9000900@killesreiter.de> <4891AB89.1010500@killesreiter.de> Message-ID: <4891B2C8.6000002@perlucida.com> Gerhard Killesreiter wrote: > Kieran recently explained what "infrastructure team" means: Yay! > http://lists.drupal.org/private/infrastructure/2008-July/012056.html Ah. Password protected :( -- Adrian Simmons (aka adrinux) e-mail From adrinux at perlucida.com Thu Jul 31 14:01:09 2008 From: adrinux at perlucida.com (Adrian Simmons) Date: Thu, 31 Jul 2008 15:01:09 +0100 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48919C5A.6000102@killesreiter.de> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> Message-ID: <4891C5A5.900@perlucida.com> Gerhard Killesreiter wrote: > Well, then we just can stay with CVS. IMO SVN's features aren't that > vastly superior to spend much effort on moving. That's absolutely true for Drupal core :) But it's not true for contrib. And what we I think we all mean when we talk about drupal.org moving to a different VCS is *contrib moving*. Karoly Negyesi wrote: > SVN tools are available. SVN is mature and documentation is plentiful. svn > 1.5 added merge tracking for (much) better team work. I'd add that the two most attractive features of DVCS systems - better merge algorithms and offline commits - can be achieved by people using SVK in conjunction with SVN. Derek Wright wrote: > A) How do "we" decide which RCS to move to Someone could sit down with a list of our needs and do a point by point analysis of what the various VCS and DVCS would provide or not but really Karoly hits the nail on the head: "If we move, we move to SVN". There isn't another viable choice. So that's A) dealt with ;) > D) Do we leave open the possibility that each project on d.o can choose if > it wants CVS or XXX? Do we provide multiple alternatives (svn + git?). Someone can correct me but I think all of the DVCS possibilities can integrate quite well with SVN, once you've provided SVN there's little benefit to providing anything else. Just imagine this is written in a few months: > C) Do we move everything at once, or do we just move core to the new > thing, and leave contrib with CVS as an interim measure to prevent > large-scale, simultaneous catastrophe on all sides? Core doesn't *need* to move, there's no benefit to moving it first, it doesn't even provide much of a comparison to contrib in terms of numbers of commiters and their competence. I think really you'd have to select a subset of contrib modules (I'm sure there'd be no shortage of volunteers) to move first. -- Adrian Simmons (aka adrinux) e-mail From drupal at oadaeh.net Thu Jul 31 14:54:54 2008 From: drupal at oadaeh.net (Jason Flatt) Date: Thu, 31 Jul 2008 07:54:54 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891B2C8.6000002@perlucida.com> References: <48909BD1.2020908@webchick.net> <4891AB89.1010500@killesreiter.de> <4891B2C8.6000002@perlucida.com> Message-ID: <200807310754.54311.drupal@oadaeh.net> On Thu Jul 31 2008 5:40:40 am Adrian Simmons wrote: > Gerhard Killesreiter wrote: > > Kieran recently explained what "infrastructure team" means: > > Yay! > > > http://lists.drupal.org/private/infrastructure/2008-July/012056.html > > Ah. Password protected :( Sign up to the mail list, then you'll have access to the archives. -- Jason Flatt http://www.oadaeh.net/ Father of Six: http://www.flattfamily.com/ (Joseph, 15; Cramer, 13; Travis, 11; Angela; Harry, 8; and William, 2) Linux User: http://www.kubuntu.org/ Drupal Fanatic: http://drupal.org/ From merlin at logrus.com Thu Jul 31 16:01:27 2008 From: merlin at logrus.com (Earl Miles) Date: Thu, 31 Jul 2008 09:01:27 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <8290C899-9906-4543-B5B5-FFCFEDDE672A@heydon.com.au> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <8290C899-9906-4543-B5B5-FFCFEDDE672A@heydon.com.au> Message-ID: <4891E1D7.7090209@logrus.com> Gordon Heydon wrote: > If it needs to be a centralize RCS, the I hope to SVN mainly because the > git connectivity is so good, and it really works like just another git > repository. How ever because SVN doesn't know how to tag or branch I > don't think that the upstream use of branches will work that well. This is my concern with SVN. Its idea of tagging and branching is naive and I find it confusing and also intensive when I end up checking out all the tags unintentionally. It seems like it would be difficult to translate our current tagging system to SVN and I am concerned that the amount of work to do so would be wasted effort. IMO, we have a lot more important problems to solve than this. From drupal-devel at webchick.net Thu Jul 31 16:40:16 2008 From: drupal-devel at webchick.net (Angela Byron) Date: Thu, 31 Jul 2008 12:40:16 -0400 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48919C5A.6000102@killesreiter.de> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> Message-ID: <4891EAF0.9080600@webchick.net> Gerhard Killesreiter wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Adrian Rossouw schrieb: >> On 31 Jul 2008, at 12:42 PM, Karoly Negyesi wrote: >> >>> If we move, we move to SVN. My team, consisting of mostly pretty good >>> coders tried a few distributed RCSes and given this experience I am >>> now vehemently against any DRCS. The concepts are way too heavy and >>> the utilities are not ready. Most of these systems are not that mature >>> thus any docs from 1-2 years ago are worthless thus documentation is >>> not much. When I was for a DRCS in 2005/2006 I was a naive greenhorn >>> sorry for the ruckus I caused then, I now know better. >> Wow. that's quite a turn around =) >> >> I also like SVN over the others in that it removes complexity instead of >> adds more. > > Well, then we just can stay with CVS. IMO SVN's features aren't that > vastly superior to spend much effort on moving. SVN provides a few advantages that make it compelling: 1. Security. pserver authentication is horribly, horribly insecure. 2. The ability to rename and move files, retaining version history, without having to post a support request to the repository maintainers. 3. The ability to remove directories without having to post a support request to the repository maintainers. 4. Much, much more intuitive commands. Compare: cvs tag -d DRUPAL-5--1-0 svn remove tags/DRUPAL-5--1-0 cvs up -dPC filename.inc svn revert filename.inc 5. Spend some time browsing through http://drupal.org/project/issues?projects=107028&components=CVS, and you see an awful lot of requests there that wouldn't be there if we were using SVN. For example, it's amazing how often "I need a tag deleted" comes up, because people can't figure out the command to do it. A lot of others are "D'oh. I accidentally committed something somewhere I didn't mean to, and now I want to (re)move it. I can't. Help?" So the support burden on our repository admins (after the initial bout of total confusion, of course ;)) would be remarkably less. 6. I don't know a lot about SVK, but if SVK can be combined with SVN to provide the advantages of DRCS for advanced users, without reducing our pool of contributors to like 5%, then cool. ;) 7. The SVN community is completely awesome and helpful. I've asked some pretty 'n00b' questions in #svn and always been treated not only with respect, but with a 20-minute answer to my problem. However, the one thing about SVN that terrifies the living Hell out of me is the fact that there is no such thing as a tag. There are only branches, and branches that you don't commit things to (wink wink) are "tags". Judging by the number of people who screw this up now, I can't imagine the utter chaos we'd have if the "stable" 5.x-1.0 release of a module could change on a whim. However, it might be that we could do some funky pre-commit scripts or something to enforce the CVS idea of a tag. If we go down this route, I'm sure the ever-awesome SVN community could help us figure it out. :) -Angie From drupal at dwwright.net Thu Jul 31 17:05:50 2008 From: drupal at dwwright.net (Derek Wright) Date: Thu, 31 Jul 2008 10:05:50 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891EAF0.9080600@webchick.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> Message-ID: <3A609D31-6DF6-4B3E-942A-525501EF09EF@dwwright.net> On Jul 31, 2008, at 9:40 AM, Angela Byron wrote: > 5. Spend some time browsing through http://drupal.org/project/ > issues?projects=107028&components=CVS, and you see an awful lot of > requests there that wouldn't be there if we were using SVN. For > example, it's amazing how often "I need a tag deleted" comes up, > because people can't figure out the command to do it. For the record, this has *nothing* to do with the (D)VCS of choice, but everything to do with people's lack of understanding the basics of release management. The answer to all these questions isn't: - it's "cvs tag -d DRUPAL-5--1-1-ALPHA-CHICKEN", silly, not "cvs remove". The answer is almost always: - You already tagged and released that version. Your alpha chicken is loose in the wild. Your only recourse now is to make a beta chicken or make a real release. Please RTFM about "Fixing releases": http://drupal.org/node/128614 Cheers, -Derek (dww) From earnie at users.sourceforge.net Thu Jul 31 17:10:06 2008 From: earnie at users.sourceforge.net (Earnie Boyd) Date: Thu, 31 Jul 2008 13:10:06 -0400 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <48919C5A.6000102@killesreiter.de> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> Message-ID: <20080731131006.tks1jacl2r0o4swc@mail.progw.org> Quoting Gerhard Killesreiter : > > Well, then we just can stay with CVS. IMO SVN's features aren't that > vastly superior to spend much effort on moving. > That is certainly the opinion I hold for projects I maintain elsewhere. If it is already in CVS there is no need to switch to SVN. The hardship people tend to have with CVS is understanding the meaning of branch and release tags. However, Drupal has well defined meanings for those and the release tools and documentation handle them well. Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/ From drupal at dwwright.net Thu Jul 31 17:19:24 2008 From: drupal at dwwright.net (Derek Wright) Date: Thu, 31 Jul 2008 10:19:24 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: <602FF91E-8F1C-4D0C-A5A9-DB81DA7FDF68@dwwright.net> On Jul 31, 2008, at 3:42 AM, Karoly Negyesi wrote: > If we move, we move to SVN. On Jul 31, 2008, at 4:04 AM, Gerhard Killesreiter wrote: > Well, then we just can stay with CVS. IMO SVN's features aren't > that vastly superior to spend much effort on moving. On Jul 31, 2008, at 9:01 AM, Earl Miles wrote: > This is my concern with SVN. Its idea of tagging and branching is > naive and I find it confusing and also intensive when I end up > checking out all the tags unintentionally. It seems like it would > be difficult to translate our current tagging system to SVN and I > am concerned that the amount of work to do so would be wasted > effort. IMO, we have a lot more important problems to solve than this. In that case, we're exactly where we've been for at least the last 2 years. This comes as no surprise at all, and why I've never had much of a sense of urgency about this situation. To summarize: - DVCS is relatively new, immature, and very complicated. The basic level of understanding among Drupal developers of even simple VCS and release management 101 is so low that a DVCS would produce vastly more problems than it would solve. At least for the foreseeable future, DVCS is out of reach for the overall Drupal developer community. Maybe in N years when the tools are more mature, the documentation is better, and more people have gained knowledge of DVCS concepts in other areas of their technical lives, we can reopen this part of the thread. - The only viable traditional VCS alternative to CVS is SVN, which only has minor feature improvements, and has a serious conceptual drawback with its naive tagging semantics. Therefore, a switch away from CVS will require massive effort for little or no gain. Shall I update Angie's FAQ to summarize this state of affairs? Can we put this thread to rest for another 2 years? Cheers, -Derek (dww) p.s. Sam, please don't let that stop you from taking over versioncontrol_api. That'd still be a good thing for project*, even if d.o isn't using SVN or git. ;) From cxjohnson at gmail.com Thu Jul 31 17:20:58 2008 From: cxjohnson at gmail.com (Chris Johnson) Date: Thu, 31 Jul 2008 12:20:58 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <3A609D31-6DF6-4B3E-942A-525501EF09EF@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <3A609D31-6DF6-4B3E-942A-525501EF09EF@dwwright.net> Message-ID: <9ea8d6030807311020o6635c8e7j12d33d56313d62d2@mail.gmail.com> On Thu, Jul 31, 2008 at 12:05 PM, Derek Wright wrote: > - You already tagged and released that version. Your alpha chicken is loose > in the wild. Your only recourse now is to make a beta chicken or make a > real release. I find that I really like free-range alpha chicken with barbecue sauce, but that's just me. ;-) -- ..chris From mike at mikeyp.net Thu Jul 31 16:51:28 2008 From: mike at mikeyp.net (Michael Prasuhn) Date: Thu, 31 Jul 2008 09:51:28 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> Message-ID: (This post is directed as much for developers out there, and companies with their own process than it is at d.o) I've recently been through a similar process with the company I'm with now, and come to the same conclusion regarding SVN. While I prefer to do my own personal projects in other systems, SVN is the lowest common denominator of VCS that I could find. I am the first full time developer at my company, and the other employees must have a GUI or they can't use VCS. We are currently stuck in a mix of another DVCS that is not working well, as there is not enough documentation, and neither I nor the consultant who previously set this up for them are experienced in it, rather the consultant wanted to be cutting edge and move to a distributed system. The other major complaint I have at this point, is that moving to a specific DVCS has actually limited workflow options. Previous companies/clients which used SVN actually had more options since almost every major DVCS (hg/git/bzr) has an SVN plugin to allow directly working with a SVN repository. This allows each developer to use the methodologies/workflow that best suits them, for their development. -Mike On Jul 31, 2008, at 3:44 AM, Karoly Negyesi wrote: > If we move, we move to SVN. My team, consisting of mostly pretty > good coders tried a few distributed RCSes and given this experience > I am now vehemently against any DRCS. The concepts are way too heavy > and the utilities are not ready. Most of these systems are not that > mature thus any docs from 1-2 years ago are worthless thus > documentation is not much. When I was for a DRCS in 2005/2006 I was > a naive greenhorn sorry for the ruckus I caused then, I now know > better. > > And back to Drupal contrib, at least with a central repo you can > have some central control trying to keep order but with a DRCS all > bets are off. Check contrib CVS root for all the crap our CVS > challenged contributors add there and think what would ensue with a > DRCS. > > It's highly debatable that the most serious of our problems, namely > understanding RCS would be solved by any DRCS. You sure want to > explain multiple heads for one or patch algebra for another? How > does 140+ commands sound (and then some has one or two superb > powerful switches...) This is a terrible mess. > > Now, with SVN we wll need a script to stop tagged things from being > changed because they are not immutable as they were in CVS -- but > this is readily available and this is the only problem I am aware > of. SVN concepts are mapping much better to reality -- one dir per > branch/tag. Makes it (much) easier to understand. You already keep a > separate directory for your branches so that's how the repository > looks like, easy! Thus it _will_ solve some problems -- another > problem with DRCS that it does nto solve the problems we have :) SVN > tools are available. SVN is mature and documentation is plentiful. > svn 1.5 added merge tracking for (much) better team work. > > Feature foo and bar might be unavailable for SVN but I can not > care , we need something that we, we all of the Drupal community can > use. > > Once the reboot of my life is complete (read: September) I will > rejoin the moving effort and help. __________________ Michael Prasuhn mike at mikeyp.net http://mikeyp.net 503.488.5433 714.356.0168 cell 949.200.7670 fax From drupal at samboyer.org Thu Jul 31 17:43:28 2008 From: drupal at samboyer.org (Sam Boyer) Date: Thu, 31 Jul 2008 12:43:28 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891C5A5.900@perlucida.com> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891C5A5.900@perlucida.com> Message-ID: <1217526208.12087.46.camel@thereishope> So I'll be writing a bunch of responses to various items in this thread, but let me just put this out there as a caveat: right now and for at least the immediate future, I don't consider my newfound role as Version Control API maintainer to include advocacy for switching d.o to any particular RCS. In my mind, there are lots of interesting things to think about, but I've got coding to do before it's much more than conjecture. Personally, I can think of very legitimate arguments for & against a) staying with CVS, b) moving to SVN, c) moving to git, hg, or bzr. So for the moment, I'm hoping to just provide concrete information. On Thu, 2008-07-31 at 15:01 +0100, Adrian Simmons wrote: > Gerhard Killesreiter wrote: > > Well, then we just can stay with CVS. IMO SVN's features aren't that > > vastly superior to spend much effort on moving. > That's absolutely true for Drupal core :) > > But it's not true for contrib. And what we I think we all mean when we talk > about drupal.org moving to a different VCS is *contrib moving*. It's true - core operates under quite a different paradigm from contrib, and IMO the conceptual clash in the contrib paradigm v. CVS is more pronounced than in core paradigm v. CVS. > > Karoly Negyesi wrote: > > SVN tools are available. SVN is mature and documentation is plentiful. > svn > 1.5 added merge tracking for (much) better team work. http://subversion.tigris.org/svn_1.5_releasenotes.html Merge tracking is definitely one of the biggest single selling points of SVN vs. CVS, although it's still orders of magnitude less powerful than git. But IMO, that's moot unless/until someone does some pretty thorough investigating of svn 1.5's in-practice interoperability with svn 1.4. That means please don't regurgitate the table at the link I just posted; we can all read, I mean how it ACTUALLY works =) > > I'd add that the two most attractive features of DVCS systems - better merge > algorithms and offline commits - can be achieved by people using SVK in > conjunction with SVN. These are indeed two very attractive features - although maybe not the _most_ attractive, IMO - of a distributed vcs. svk also has the added benefit of reducing the amount of overhead data that's contained in your .svn directory, which can (especially for large projects with long histories) end up being quite significant. But as I said before, git's merge capabilities are in a class of their own, stemming from the fact that git is a content-addressable filesystem. Sort of along these lines, and partially as an additional response to chx, another feature that's interesting in the list of items that svn 1.5 adds is 'pegs', which improve on svn:externals a bit. However, svn:externals itself is pretty inflexible, so... > > Derek Wright wrote: > > A) How do "we" decide which RCS to move to > Someone could sit down with a list of our needs and do a point by point > analysis of what the various VCS and DVCS would provide or not but really > Karoly hits the nail on the head: "If we move, we move to SVN". There isn't > another viable choice. > So that's A) dealt with ;) > > > D) Do we leave open the possibility that each project on d.o can choose if > > it wants CVS or XXX? Do we provide multiple alternatives (svn + git?). Multiple alternatives is a...complicated question. I don't yet know enough to say where or how the reconciling of the different systems would occur. My suspicion, though, is that it would be a nasty example of the drupal community special brand of 'let's roll-our-own!' hubris to try to reconcile them ourselves; chances are, if we were to do this, we'd build the base with git, use its native capabilities to wrap svn, and have the project* system speak to git. > Someone can correct me but I think all of the DVCS possibilities can > integrate quite well with SVN, once you've provided SVN there's little > benefit to providing anything else. Nope, no need to correct you on this one. Of hg, bzr, git, the only one I'm not sure about providing good svn interoperability is hg. But I'm pretty sure it should be largely the same. > > > Just imagine this is written in a few months: > > C) Do we move everything at once, or do we just move core to the new > > thing, and leave contrib with CVS as an interim measure to prevent > > large-scale, simultaneous catastrophe on all sides? > > Core doesn't *need* to move, there's no benefit to moving it first, it > doesn't even provide much of a comparison to contrib in terms of numbers of > commiters and their competence. I think really you'd have to select a subset > of contrib modules (I'm sure there'd be no shortage of volunteers) to move > first. > I'm in general conceptual agreement here, but there are very real questions about how we'd organize the svn repo(s) that we'd need to answer before even considering such an experiment. There are good ways to migrate CVS => SVN, and there are bad ways...but they all turn into nightmares very quickly if you don't have a very clear vision of how you organize your svn repo(s) on the other side. cheers, Sam From drupal at dwwright.net Thu Jul 31 17:46:33 2008 From: drupal at dwwright.net (Derek Wright) Date: Thu, 31 Jul 2008 10:46:33 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891EAF0.9080600@webchick.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> Message-ID: <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> On Jul 31, 2008, at 9:40 AM, Angela Byron wrote: > 1. Security. pserver authentication is horribly, horribly insecure. I think the security problems will be just as bad with SVN given the OSUOSL infrastructure. There's a way to do CVS securely (over ssh), which is basically equivalent to what we'd have to do to actually make SVN secure (as far as I know), but the OSUOSL side of this question has been "won't fixed" because it would involve giving (extremely limited) shell access to every CVS account holder: http://drupal.org/node/199412 I'll admit I haven't closely studied SVN's various security models, so I could be wrong about this, but on the surface, I think this particular argument is a red herring, since we couldn't configure SVN any more securely than we can configure CVS. If anyone can provide a link to a clear document explaining how to configure SVN more securely than pserver if you don't actually have accounts and ssh keys for everyone, please do so. > 2. The ability to rename and move files, retaining version history, > without having to post a support request to the repository > maintainers. Yeah, this is a minor pain in the ass (my ass, to be precise, since I don't think anyone else has ever fielded one of the cvs_rename issues). But, I've been documenting the process in various issues and hopefully others could pick up some of this (relatively small, in the scheme of things) support load. > 3. The ability to remove directories without having to post a > support request to the repository maintainers. The people who botch this aren't the ones who notice and fix it, anyway. Usually killes or I find the cruft strewn about various places in the contributions repo directory tree that don't belong and we clean it up. Sometimes someone else points it out first, but even if we had a different VCS, cleaning up stuff like this would take the intervention of a repository admin (because of access control reasons, if nothing else). > 4. Much, much more intuitive commands. This doesn't matter if people already know the CVS commands. If they don't, we've got handouts, handbooks, screencasts, DrupalCon talks, off-site writeups, and more, explaining what they need to know... And, as Earl pointed out, the most important commands for tagging and branching are arguably much less intuitive, and those are the ones people seem to have the most trouble with. 5. answered in another message... > 6. I don't know a lot about SVK, but if SVK can be combined with > SVN to provide the advantages of DRCS for advanced users, without > reducing our pool of contributors to like 5%, then cool. ;) Agreed. This is about the only feature I'd actually be psyched about. And, making the ~10% of developers that would be psyched about this happy doesn't outweigh the huge costs (and the "terrifies the living Hell out of me" problem of SVN's notion of tags) of a switch. > 7. The SVN community is completely awesome and helpful. Hey, what are you trying to say? You think I'm neither awesome nor helpful? ;) Not to butt heads with the contributor of the year, but I don't think any of these reasons are actually "compelling". ;) Cheers, -Derek (dww) From drupal at samboyer.org Thu Jul 31 17:50:49 2008 From: drupal at samboyer.org (Sam Boyer) Date: Thu, 31 Jul 2008 12:50:49 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> Message-ID: <1217526649.12087.55.camel@thereishope> On Thu, 2008-07-31 at 10:46 -0700, Derek Wright wrote: > On Jul 31, 2008, at 9:40 AM, Angela Byron wrote: > > > 1. Security. pserver authentication is horribly, horribly insecure. > > I think the security problems will be just as bad with SVN given the > OSUOSL infrastructure. There's a way to do CVS securely (over ssh), > which is basically equivalent to what we'd have to do to actually > make SVN secure (as far as I know), but the OSUOSL side of this > question has been "won't fixed" because it would involve giving > (extremely limited) shell access to every CVS account holder: > > http://drupal.org/node/199412 > > I'll admit I haven't closely studied SVN's various security models, > so I could be wrong about this, but on the surface, I think this > particular argument is a red herring, since we couldn't configure SVN > any more securely than we can configure CVS. If anyone can provide a > link to a clear document explaining how to configure SVN more > securely than pserver if you don't actually have accounts and ssh > keys for everyone, please do so. So let me quickly just respond here to say that, in fact, SVN is almost terrifyingly easy to set up securely using SSH. No need for shell accounts per user. Obviously using ssh keys means that we'd need to _get_ those public keys from people in the first place, and doing so would also be a very real change for all contributors: either you learn SSH, or you can't contribute to drupal. > > > > 2. The ability to rename and move files, retaining version history, > > without having to post a support request to the repository > > maintainers. > > Yeah, this is a minor pain in the ass (my ass, to be precise, since I > don't think anyone else has ever fielded one of the cvs_rename > issues). But, I've been documenting the process in various issues > and hopefully others could pick up some of this (relatively small, in > the scheme of things) support load. > > > > 3. The ability to remove directories without having to post a > > support request to the repository maintainers. > > > The people who botch this aren't the ones who notice and fix it, > anyway. Usually killes or I find the cruft strewn about various > places in the contributions repo directory tree that don't belong and > we clean it up. Sometimes someone else points it out first, but even > if we had a different VCS, cleaning up stuff like this would take the > intervention of a repository admin (because of access control > reasons, if nothing else). > > > > 4. Much, much more intuitive commands. > > This doesn't matter if people already know the CVS commands. If they > don't, we've got handouts, handbooks, screencasts, DrupalCon talks, > off-site writeups, and more, explaining what they need to know... > And, as Earl pointed out, the most important commands for tagging and > branching are arguably much less intuitive, and those are the ones > people seem to have the most trouble with. > > > 5. answered in another message... > > > > 6. I don't know a lot about SVK, but if SVK can be combined with > > SVN to provide the advantages of DRCS for advanced users, without > > reducing our pool of contributors to like 5%, then cool. ;) > > Agreed. This is about the only feature I'd actually be psyched > about. And, making the ~10% of developers that would be psyched > about this happy doesn't outweigh the huge costs (and the "terrifies > the living Hell out of me" problem of SVN's notion of tags) of a switch. > > > > 7. The SVN community is completely awesome and helpful. > > Hey, what are you trying to say? You think I'm neither awesome nor > helpful? ;) > > Not to butt heads with the contributor of the year, but I don't think > any of these reasons are actually "compelling". ;) > > Cheers, > -Derek (dww) > > > From drupal at samboyer.org Thu Jul 31 17:54:00 2008 From: drupal at samboyer.org (Sam Boyer) Date: Thu, 31 Jul 2008 12:54:00 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891E1D7.7090209@logrus.com> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <8290C899-9906-4543-B5B5-FFCFEDDE672A@heydon.com.au> <4891E1D7.7090209@logrus.com> Message-ID: <1217526840.12087.60.camel@thereishope> On Thu, 2008-07-31 at 09:01 -0700, Earl Miles wrote: > Gordon Heydon wrote: > > If it needs to be a centralize RCS, the I hope to SVN mainly because the > > git connectivity is so good, and it really works like just another git > > repository. How ever because SVN doesn't know how to tag or branch I > > don't think that the upstream use of branches will work that well. Doesn't know how to tag or branch? Sorry, that's just not true. > > This is my concern with SVN. Its idea of tagging and branching is naive > and I find it confusing and also intensive when I end up checking out > all the tags unintentionally. It seems like it would be difficult to > translate our current tagging system to SVN and I am concerned that the > amount of work to do so would be wasted effort. IMO, we have a lot more > important problems to solve than this. I've heard svn's branching system called a lot of things, but in comparison to cvs, 'naive' is a new one on me. One of the points svn bills itself on is "easy branching and tagging." And it's true. Avoiding project spaghetti (aka, the more-or-less constant state of the cvs/drupal-contrib directory) and managing release tags becomes a question of a) using the svn hook system and b) how we organize the contrib repo(s) in the first place. Sam From drupal at owenbarton.com Thu Jul 31 17:54:15 2008 From: drupal at owenbarton.com (Owen Barton) Date: Thu, 31 Jul 2008 10:54:15 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <1217526649.12087.55.camel@thereishope> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> <1217526649.12087.55.camel@thereishope> Message-ID: <44dd1dd30807311054i2fca3eas8c2eca94748891d8@mail.gmail.com> Hi All, On Thu, Jul 31, 2008 at 10:50 AM, Sam Boyer wrote: > On Thu, 2008-07-31 at 10:46 -0700, Derek Wright wrote: > > On Jul 31, 2008, at 9:40 AM, Angela Byron wrote: > > > > > 1. Security. pserver authentication is horribly, horribly insecure. > > > > I think the security problems will be just as bad with SVN given the > > OSUOSL infrastructure. There's a way to do CVS securely (over ssh), > > which is basically equivalent to what we'd have to do to actually > > make SVN secure (as far as I know), but the OSUOSL side of this > > question has been "won't fixed" because it would involve giving > > (extremely limited) shell access to every CVS account holder: > > > > http://drupal.org/node/199412 > > > > I'll admit I haven't closely studied SVN's various security models, > > so I could be wrong about this, but on the surface, I think this > > particular argument is a red herring, since we couldn't configure SVN > > any more securely than we can configure CVS. If anyone can provide a > > link to a clear document explaining how to configure SVN more > > securely than pserver if you don't actually have accounts and ssh > > keys for everyone, please do so. > > So let me quickly just respond here to say that, in fact, SVN is almost > terrifyingly easy to set up securely using SSH. No need for shell > accounts per user. Obviously using ssh keys means that we'd need to > _get_ those public keys from people in the first place, and doing so > would also be a very real change for all contributors: either you learn > SSH, or you can't contribute to drupal. > Actually, an even easier method is to setup SVN access over https - http://gentoo-wiki.com/HOWTO_Apache2_with_subversion_SVN_and_DAV This needs no shell accounts or even SSH keys and can authenticate any way apache can. Thanks! - Owen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.drupal.org/pipermail/development/attachments/20080731/83701236/attachment.htm From drupal at samboyer.org Thu Jul 31 18:05:16 2008 From: drupal at samboyer.org (Sam Boyer) Date: Thu, 31 Jul 2008 13:05:16 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <44dd1dd30807311054i2fca3eas8c2eca94748891d8@mail.gmail.com> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> <1217526649.12087.55.camel@thereishope> <44dd1dd30807311054i2fca3eas8c2eca94748891d8@mail.gmail.com> Message-ID: <1217527516.12087.67.camel@thereishope> On Thu, 2008-07-31 at 10:54 -0700, Owen Barton wrote: > Hi All, > > On Thu, Jul 31, 2008 at 10:50 AM, Sam Boyer > wrote: > On Thu, 2008-07-31 at 10:46 -0700, Derek Wright wrote: > > On Jul 31, 2008, at 9:40 AM, Angela Byron wrote: > > > > > 1. Security. pserver authentication is horribly, horribly > insecure. > > > > I think the security problems will be just as bad with SVN > given the > > OSUOSL infrastructure. There's a way to do CVS securely > (over ssh), > > which is basically equivalent to what we'd have to do to > actually > > make SVN secure (as far as I know), but the OSUOSL side of > this > > question has been "won't fixed" because it would involve > giving > > (extremely limited) shell access to every CVS account > holder: > > > > http://drupal.org/node/199412 > > > > I'll admit I haven't closely studied SVN's various security > models, > > so I could be wrong about this, but on the surface, I think > this > > particular argument is a red herring, since we couldn't > configure SVN > > any more securely than we can configure CVS. If anyone can > provide a > > link to a clear document explaining how to configure SVN > more > > securely than pserver if you don't actually have accounts > and ssh > > keys for everyone, please do so. > > > So let me quickly just respond here to say that, in fact, SVN > is almost > terrifyingly easy to set up securely using SSH. No need for > shell > accounts per user. Obviously using ssh keys means that we'd > need to > _get_ those public keys from people in the first place, and > doing so > would also be a very real change for all contributors: either > you learn > SSH, or you can't contribute to drupal. > > > > Actually, an even easier method is to setup SVN access over https - > http://gentoo-wiki.com/HOWTO_Apache2_with_subversion_SVN_and_DAV > This needs no shell accounts or even SSH keys and can authenticate any > way apache can. > > Thanks! > - Owen Yep, https is also an option. I've not worked as extensively with it as I have with ssh-based svn, but it does obviate the need for ssh keys from everyone. It is a bit more intensive than svn+ssh. http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.serverconfig From adrian at bryght.com Thu Jul 31 18:05:47 2008 From: adrian at bryght.com (Adrian Rossouw) Date: Thu, 31 Jul 2008 20:05:47 +0200 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> Message-ID: On 31 Jul 2008, at 7:46 PM, Derek Wright wrote: > > I think the security problems will be just as bad with SVN given the > OSUOSL infrastructure. There's a way to do CVS securely (over ssh), > which is basically equivalent to what we'd have to do to actually > make SVN secure (as far as I know), but the OSUOSL side of this > question has been "won't fixed" because it would involve giving > (extremely limited) shell access to every CVS account holder: > Umm. i think this issue is the same as running apache with fastcgi and suexec (the only really secure way to do multisite, so that each site has it's own user account owning the files). This would probably involve something like using PAM and mysql. I'd definitely be keen to learn more about how this can be solved. From mfburdett at gmail.com Thu Jul 31 18:16:15 2008 From: mfburdett at gmail.com (mark burdett) Date: Thu, 31 Jul 2008 11:16:15 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <20080731131006.tks1jacl2r0o4swc@mail.progw.org> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <20080731131006.tks1jacl2r0o4swc@mail.progw.org> Message-ID: One case study to look at, both to see how painful RCS migration can be as well as showing that it can be done, would be freebsd's ongoing migration of their huge and ancient repository from CVS to Subversion. For the time being, the CVS repository is still in place along with all the infrastructure tied to it; commits are made to SVN, constantly mirrored to CVS, and releases are made from CVS. Some notes about it here: http://people.freebsd.org/~peter/svn_notes.txt http://lists.freebsd.org/pipermail/freebsd-current/2008-June/086023.html --mark On Thu, Jul 31, 2008 at 10:10 AM, Earnie Boyd wrote: > Quoting Gerhard Killesreiter : > >> >> Well, then we just can stay with CVS. IMO SVN's features aren't that >> vastly superior to spend much effort on moving. >> > > That is certainly the opinion I hold for projects I maintain elsewhere. If > it is already in CVS there is no need to switch to SVN. The hardship people > tend to have with CVS is understanding the meaning of branch and release > tags. However, Drupal has well defined meanings for those and the release > tools and documentation handle them well. > > Earnie -- http://for-my-kids.com/ > -- http://give-me-an-offer.com/ > > From drupal at samboyer.org Thu Jul 31 18:16:54 2008 From: drupal at samboyer.org (Sam Boyer) Date: Thu, 31 Jul 2008 13:16:54 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891EAF0.9080600@webchick.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> Message-ID: <1217528214.12087.75.camel@thereishope> On Thu, 2008-07-31 at 12:40 -0400, Angela Byron wrote: > Gerhard Killesreiter wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Adrian Rossouw schrieb: > >> On 31 Jul 2008, at 12:42 PM, Karoly Negyesi wrote: > >> > >>> If we move, we move to SVN. My team, consisting of mostly pretty good > >>> coders tried a few distributed RCSes and given this experience I am > >>> now vehemently against any DRCS. The concepts are way too heavy and > >>> the utilities are not ready. Most of these systems are not that mature > >>> thus any docs from 1-2 years ago are worthless thus documentation is > >>> not much. When I was for a DRCS in 2005/2006 I was a naive greenhorn > >>> sorry for the ruckus I caused then, I now know better. > >> Wow. that's quite a turn around =) > >> > >> I also like SVN over the others in that it removes complexity instead of > >> adds more. > > > > Well, then we just can stay with CVS. IMO SVN's features aren't that > > vastly superior to spend much effort on moving. > > SVN provides a few advantages that make it compelling: > 1. Security. pserver authentication is horribly, horribly insecure. > 2. The ability to rename and move files, retaining version history, > without having to post a support request to the repository maintainers. > 3. The ability to remove directories without having to post a support > request to the repository maintainers. > 4. Much, much more intuitive commands. Compare: > > cvs tag -d DRUPAL-5--1-0 > svn remove tags/DRUPAL-5--1-0 > > cvs up -dPC filename.inc > svn revert filename.inc > > 5. Spend some time browsing through > http://drupal.org/project/issues?projects=107028&components=CVS, and you > see an awful lot of requests there that wouldn't be there if we were > using SVN. For example, it's amazing how often "I need a tag deleted" > comes up, because people can't figure out the command to do it. A lot of > others are "D'oh. I accidentally committed something somewhere I didn't > mean to, and now I want to (re)move it. I can't. Help?" So the support > burden on our repository admins (after the initial bout of total > confusion, of course ;)) would be remarkably less. > 6. I don't know a lot about SVK, but if SVK can be combined with SVN to > provide the advantages of DRCS for advanced users, without reducing our > pool of contributors to like 5%, then cool. ;) > 7. The SVN community is completely awesome and helpful. I've asked some > pretty 'n00b' questions in #svn and always been treated not only with > respect, but with a 20-minute answer to my problem. > > However, the one thing about SVN that terrifies the living Hell out of > me is the fact that there is no such thing as a tag. There are only > branches, and branches that you don't commit things to (wink wink) are > "tags". Judging by the number of people who screw this up now, I can't > imagine the utter chaos we'd have if the "stable" 5.x-1.0 release of a > module could change on a whim. However, it might be that we could do > some funky pre-commit scripts or something to enforce the CVS idea of a > tag. If we go down this route, I'm sure the ever-awesome SVN community > could help us figure it out. :) > > -Angie ? Oh my oh my. Please please, folks, have a look at: http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.branchmerge and possibly the next section, http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.reposadmin svn doesn't have native, hard-coded branching and tagging the way that cvs does. Instead, we have a lot more flexibility and are able to define workflows for how our releases work. BTW, that reminds me - Derek (or anyone who knows), how does the current release packaging system work? Does it iterate over the whole repo and check for changes, or does CVS notify it about the creation of new release tags so that it can target its efforts more efficiently? Sorry if there's a page explaining that somewhere... cheers s From mail at webthatworks.it Thu Jul 31 18:31:59 2008 From: mail at webthatworks.it (Ivan Sergio Borgonovo) Date: Thu, 31 Jul 2008 20:31:59 +0200 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> Message-ID: <20080731203159.5c9b90d1@dawn.webthatworks.it> On Thu, 31 Jul 2008 10:46:33 -0700 Derek Wright wrote: > > On Jul 31, 2008, at 9:40 AM, Angela Byron wrote: > > > 1. Security. pserver authentication is horribly, horribly > > insecure. > > I think the security problems will be just as bad with SVN given > the OSUOSL infrastructure. There's a way to do CVS securely (over > ssh), which is basically equivalent to what we'd have to do to > actually make SVN secure (as far as I know), but the OSUOSL side > of this question has been "won't fixed" because it would involve > giving (extremely limited) shell access to every CVS account > holder: Not that this is going to change any of your previously stated points but svn works *lovely* over https[*] and that's pretty slick if you've to deal with firewalls too. Anyway I didn't know that people could commit over a completely insecure channel as pserver. Is it? I'd say that while svn will make *my* life easier and while I do see advantages in drcs, they aren't as mature as they should be right now (not just the tools but the adoption etc...) and other than uuuh well pserver auth, I don't see any reason to move from cvs to * NOW. I think anyway that a drcs could have a great influence over the development process and the community IF handled with care and consciousness. Building up a good plan and understanding how a drcs may influence development and community requires time so I think it should be something to keep in mind right now. [*] actually it works over webdav(s) and once you've webdav you could think about other interesting applications inside drupal infrastructure. Other than "modernity" when I had to chose my rcs of choice ease of installation over a secure protocol and friendliness to firewall were the top reasons I chose svn over cvs. -- Ivan Sergio Borgonovo http://www.webthatworks.it From drupal at samboyer.org Thu Jul 31 18:34:45 2008 From: drupal at samboyer.org (Sam Boyer) Date: Thu, 31 Jul 2008 13:34:45 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <602FF91E-8F1C-4D0C-A5A9-DB81DA7FDF68@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <602FF91E-8F1C-4D0C-A5A9-DB81DA7FDF68@dwwright.net> Message-ID: <1217529285.12087.91.camel@thereishope> On Thu, 2008-07-31 at 10:19 -0700, Derek Wright wrote: > On Jul 31, 2008, at 3:42 AM, Karoly Negyesi wrote: > > If we move, we move to SVN. > > > On Jul 31, 2008, at 4:04 AM, Gerhard Killesreiter wrote: > > Well, then we just can stay with CVS. IMO SVN's features aren't > > that vastly superior to spend much effort on moving. > > On Jul 31, 2008, at 9:01 AM, Earl Miles wrote: > > This is my concern with SVN. Its idea of tagging and branching is > > naive and I find it confusing and also intensive when I end up > > checking out all the tags unintentionally. It seems like it would > > be difficult to translate our current tagging system to SVN and I > > am concerned that the amount of work to do so would be wasted > > effort. IMO, we have a lot more important problems to solve than this. > > > In that case... ?Ahhh! It's not the case! I've been trying to put out these fires as fast as I can, but I can only type so fast :) I've personally done cvs to svn migrations before, and they do take considerable care and effort, but they're not impossible. Plus, as I've said in a few emails already, the tagging/branching system _is_ mature (quite a bit more so than CVS, in fact), it's just more flexible and we'd need to tailor it. Not like we ever tell anybody that about drupal or anything... :P Also, as a specific response to Earl - inadvertently checking out everything from svn is no easier or harder than cvs. It's just different. It's the ?default trunk/ branches/ tags/ that tends to cause inadvertent enormous checkouts like that, and folks accustomed to cvs are more likely to do it. Fortunately, since that repo layout isn't hard-coded into svn, we could take steps to reduce that confusion by making the layout more familiar to cvs users. > we're exactly where we've been for at least the last 2 > years. This comes as no surprise at all, and why I've never had much > of a sense of urgency about this situation. To summarize: > > - DVCS is relatively new, immature, and very complicated. The basic > level of understanding among Drupal developers of even simple VCS and > release management 101 is so low that a DVCS would produce vastly > more problems than it would solve. At least for the foreseeable > future, DVCS is out of reach for the overall Drupal developer > community. Maybe in N years when the tools are more mature, the > documentation is better, and more people have gained knowledge of > DVCS concepts in other areas of their technical lives, we can reopen > this part of the thread. > > - The only viable traditional VCS alternative to CVS is SVN, which > only has minor feature improvements, and has a serious conceptual > drawback with its naive tagging semantics. > > Therefore, a switch away from CVS will require massive effort for > little or no gain. > > > Shall I update Angie's FAQ to summarize this state of affairs? Can > we put this thread to rest for another 2 years? > > > Cheers, > -Derek (dww) > > > p.s. Sam, please don't let that stop you from taking over > versioncontrol_api. That'd still be a good thing for project*, even > if d.o isn't using SVN or git. ;) No worries :) As I said in the caveat of my initial response here, I'm just providing information, not advocating. Really, even if it doesn't sound like it at times :P. I've already taken over vcs api, and will be doing what's needed there regardless of how all these decisions play out. cheers, s From lyle at ubercart.org Thu Jul 31 18:27:05 2008 From: lyle at ubercart.org (Lyle Mantooth) Date: Thu, 31 Jul 2008 14:27:05 -0400 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <20080731131006.tks1jacl2r0o4swc@mail.progw.org> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <20080731131006.tks1jacl2r0o4swc@mail.progw.org> Message-ID: <489203F9.6050209@ubercart.org> Earnie Boyd wrote: > The hardship people tend to have with CVS is understanding the meaning > of branch and release tags. However, Drupal has well defined meanings > for those and the release tools and documentation handle them well. > > Earnie -- http://for-my-kids.com/ > -- http://give-me-an-offer.com/ > For me, the problem isn't understanding the concept of a branches and tags, but getting CVS to tell me the reality of those branches and tags. Maybe I just haven't learned how to use the tool properly, but I am constantly worried that I've crossed branches and tagged the wrong files. I know what I should do, but I don't know if that's what I did. I feel like I've learned the concepts of VCS much easier with Bazaar than I ever would have with CVS. That's mostly because I actually felt comfortable using it. --Lyle From drupal at dwwright.net Thu Jul 31 18:43:47 2008 From: drupal at dwwright.net (Derek Wright) Date: Thu, 31 Jul 2008 11:43:47 -0700 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <489203F9.6050209@ubercart.org> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <20080731131006.tks1jacl2r0o4swc@mail.progw.org> <489203F9.6050209@ubercart.org> Message-ID: On Jul 31, 2008, at 11:27 AM, Lyle Mantooth wrote: > I know what I should do, but I don't know if that's what I did. Then get in the habit of running "cvs status" a lot. ;) As I wrote in my handout about release management[1], before every cvs commit, you should run: cvs diff # is this the patch and only the patch i mean to be committing? cvs status # is this the branch i mean to be committing to? ditto, before every cvs tag, you should run "cvs status"... cheers, -Derek (dww) [1] http://drupal.org/files/maintain-release-handout.pdf From drupal at dwwright.net Thu Jul 31 19:03:40 2008 From: drupal at dwwright.net (Derek Wright) Date: Thu, 31 Jul 2008 12:03:40 -0700 Subject: [development] How does the CVS packaging script work? In-Reply-To: <1217528214.12087.75.camel@thereishope> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <1217528214.12087.75.camel@thereishope> Message-ID: <8AC8ABFE-ADA5-47D7-A43A-8B3F35D7E143@dwwright.net> On Jul 31, 2008, at 11:16 AM, Sam Boyer wrote: > BTW, that reminds me - Derek (or anyone who knows), how does the > current > release packaging system work? Does it iterate over the whole repo and > check for changes, or does CVS notify it about the creation of new > release tags so that it can target its efforts more efficiently? Sorry > if there's a page explaining that somewhere... http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/project/ release/package-release-nodes.php?view=markup There's a page explaining parts of it, but that's on infrastructure.drupal.org, and that means the vast majority of the people reading this message won't have permission to view it. So, I just wrote it up here: http://drupal.org/node/289662 Enjoy, -Derek (dww) From larry at garfieldtech.com Thu Jul 31 19:37:01 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Thu, 31 Jul 2008 14:37:01 -0500 Subject: [development] =?utf-8?q?FAQ=3A_Why_is_Drupal_still_using_CVS_when?= =?utf-8?q?_X_is_amuch_better_choice=3F?= In-Reply-To: References: Message-ID: <210d2077fa165550ebde0699e041b2a9@localhost> A distributed VCS would really only offer a benefit if it gets integrated into our development workflow. Were we to instead of having one single maintainer for all of Drupal (or a given version) have subsystem maintainers with partial commit access, the way the Linux kernel does, that would be much easier with a DVCS than with CVS or SVN. (It's probably something we should consider in the near future.) A DVCS could also potentially make major overhauls like FAPI, the theme system, or the new Database API easier to manage as we wouldn't need external svn repositories to coordinate that work. (That has been a sizable pain in the butt for the Database API rewrite.) All of those would require drastic changes to the Way We Work(tm). Unless we are going to make such a change to our development workflow, a DVCS doesn't offer much benefit. Several projects seem to have addressed that issue with, as others have noted, an SVN core repository with a git bridge. I believe PHP itself is planning to do so. That gives a "traditional" VCS for most people while allowing the 5% of users who would actually benefit from a DVCS to sorta use it, although not with all of its benefits. Were we to move off of CVS, at this point that would be my recommendation. Another advantage of svn over CVS that I don't think anyone has mentioned is that, as far as I am aware, it is much easier to do fancy external linking with SVN than CVS. If managed properly, that could be a boon for Drupal companies (like Palantir, where we have been discussing this exact problem) who want to tie their source management more tightly to Drupal's. Let's face it, checking out from CVS into an SVN repository is a hack, and Drupal abhors hacks. :-) --Larry Garfield On Thu, 31 Jul 2008 09:51:28 -0700, Michael Prasuhn wrote: > (This post is directed as much for developers out there, and companies > with their own process than it is at d.o) > > I've recently been through a similar process with the company I'm with > now, and come to the same conclusion regarding SVN. While I prefer to > do my own personal projects in other systems, SVN is the lowest common > denominator of VCS that I could find. I am the first full time > developer at my company, and the other employees must have a GUI or > they can't use VCS. We are currently stuck in a mix of another DVCS > that is not working well, as there is not enough documentation, and > neither I nor the consultant who previously set this up for them are > experienced in it, rather the consultant wanted to be cutting edge and > move to a distributed system. > > The other major complaint I have at this point, is that moving to a > specific DVCS has actually limited workflow options. Previous > companies/clients which used SVN actually had more options since > almost every major DVCS (hg/git/bzr) has an SVN plugin to allow > directly working with a SVN repository. This allows each developer to > use the methodologies/workflow that best suits them, for their > development. > > -Mike > > On Jul 31, 2008, at 3:44 AM, Karoly Negyesi wrote: > >> If we move, we move to SVN. My team, consisting of mostly pretty >> good coders tried a few distributed RCSes and given this experience >> I am now vehemently against any DRCS. The concepts are way too heavy >> and the utilities are not ready. Most of these systems are not that >> mature thus any docs from 1-2 years ago are worthless thus >> documentation is not much. When I was for a DRCS in 2005/2006 I was >> a naive greenhorn sorry for the ruckus I caused then, I now know >> better. >> >> And back to Drupal contrib, at least with a central repo you can >> have some central control trying to keep order but with a DRCS all >> bets are off. Check contrib CVS root for all the crap our CVS >> challenged contributors add there and think what would ensue with a >> DRCS. >> >> It's highly debatable that the most serious of our problems, namely >> understanding RCS would be solved by any DRCS. You sure want to >> explain multiple heads for one or patch algebra for another? How >> does 140+ commands sound (and then some has one or two superb >> powerful switches...) This is a terrible mess. >> >> Now, with SVN we wll need a script to stop tagged things from being >> changed because they are not immutable as they were in CVS -- but >> this is readily available and this is the only problem I am aware >> of. SVN concepts are mapping much better to reality -- one dir per >> branch/tag. Makes it (much) easier to understand. You already keep a >> separate directory for your branches so that's how the repository >> looks like, easy! Thus it _will_ solve some problems -- another >> problem with DRCS that it does nto solve the problems we have :) SVN >> tools are available. SVN is mature and documentation is plentiful. >> svn 1.5 added merge tracking for (much) better team work. >> >> Feature foo and bar might be unavailable for SVN but I can not >> care , we need something that we, we all of the Drupal community can >> use. >> >> Once the reboot of my life is complete (read: September) I will >> rejoin the moving effort and help. > > __________________ > Michael Prasuhn > mike at mikeyp.net > http://mikeyp.net > 503.488.5433 > 714.356.0168 cell > 949.200.7670 fax From drupal-devel at webchick.net Thu Jul 31 19:42:01 2008 From: drupal-devel at webchick.net (Angela Byron) Date: Thu, 31 Jul 2008 15:42:01 -0400 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> Message-ID: <48921589.3090002@webchick.net> Derek Wright wrote: > > On Jul 31, 2008, at 9:40 AM, Angela Byron wrote: > >> 1. Security. pserver authentication is horribly, horribly insecure. > > I think the security problems will be just as bad with SVN given the > OSUOSL infrastructure. There's a way to do CVS securely (over ssh), > which is basically equivalent to what we'd have to do to actually make > SVN secure (as far as I know), but the OSUOSL side of this question has > been "won't fixed" because it would involve giving (extremely limited) > shell access to every CVS account holder: > > http://drupal.org/node/199412 > > I'll admit I haven't closely studied SVN's various security models, so I > could be wrong about this, but on the surface, I think this particular > argument is a red herring, since we couldn't configure SVN any more > securely than we can configure CVS. If anyone can provide a link to a > clear document explaining how to configure SVN more securely than > pserver if you don't actually have accounts and ssh keys for everyone, > please do so. As others mentioned, https://svn.drupal.org/.../. I agree SSH accounts/private keys are a huge mess and would reduce our contributor pool to about 20 people. My #1 priority in a move to a new VCS would be "Encourage *more* contributors, not fewer" so I'm also -1 to complicated authentication schemes. >> 2. The ability to rename and move files, retaining version history, >> without having to post a support request to the repository maintainers. > > Yeah, this is a minor pain in the ass (my ass, to be precise, since I > don't think anyone else has ever fielded one of the cvs_rename issues). > But, I've been documenting the process in various issues and hopefully > others could pick up some of this (relatively small, in the scheme of > things) support load. Fair enough. My #2 priority in a move to a new VCS is "Make Derek's life easier," and I thought this was more of a pain in the ass than it apparently is. >> 3. The ability to remove directories without having to post a support >> request to the repository maintainers. > > > The people who botch this aren't the ones who notice and fix it, > anyway. Usually killes or I find the cruft strewn about various places > in the contributions repo directory tree that don't belong and we clean > it up. Sometimes someone else points it out first, but even if we had a > different VCS, cleaning up stuff like this would take the intervention > of a repository admin (because of access control reasons, if nothing else). Fair enough. >> 4. Much, much more intuitive commands. > > This doesn't matter if people already know the CVS commands. If they > don't, we've got handouts, handbooks, screencasts, DrupalCon talks, > off-site writeups, and more, explaining what they need to know... And, > as Earl pointed out, the most important commands for tagging and > branching are arguably much less intuitive, and those are the ones > people seem to have the most trouble with. I think a lot of this can be solved with a pointer to http://svnbook.red-bean.com/ which is an *excellent* and free resource that covers everything from "What is version control?" to "Crazy advanced crap you don't need to know about." This resource is much more comprehensive and complete than anything that we've managed to put together in the hundreds of hours we've spent writing docs ourselves. :\ And I mean this with the greatest respect, and also as someone who's put a bunch of elbow grease into the existing documentation, as you know. I'm officially putting my hat into the ring for helping to upgrade existing docs if we move to SVN. I can't make that promise with DVCS because I am totally new to it, though. >> 6. I don't know a lot about SVK, but if SVK can be combined with SVN >> to provide the advantages of DRCS for advanced users, without reducing >> our pool of contributors to like 5%, then cool. ;) > > Agreed. This is about the only feature I'd actually be psyched about. > And, making the ~10% of developers that would be psyched about this > happy doesn't outweigh the huge costs (and the "terrifies the living > Hell out of me" problem of SVN's notion of tags) of a switch. I've been told by Sam Boyer that I am officially On Crack about the terrifying part, so I'll leave it to him to refute me. ;) >> 7. The SVN community is completely awesome and helpful. > > Hey, what are you trying to say? You think I'm neither awesome nor > helpful? ;) > > Not to butt heads with the contributor of the year, but I don't think > any of these reasons are actually "compelling". ;) No, no, no! You are *extremely* awesome and helpful! You are also just one guy, and seem to be the main person fielding all of the fall-out from using CVS. I don't like that situation, and from the exasperation you have communicated in the past about you being "the guy" who has to deal wth all the support requests, I gather that you don't either. Every Drupal shop that I'm aware of (and we've worked with most of them) only uses CVS to maintain modules/themes on drupal.org. All of their internal and client projects happen in a SVN repository (with maybe 2% on something fancier like Git). So we have a tremendous amount of in-community knowledge about how SVN works that can be leveraged to off-set support requests that end up falling solely on your shoulders. Additionally, based on my experience, #cvs has about 10 people in it. If I ask a question, it might literally be a day before I get an answer, if ever. So I end up asking in #drupal, or on the issue queue. #svn has about 200 people in it. If I ask a question, suddenly 8 people chime in to answer it, give me pointers to resources for additional information, and also give me some tips I might not have thought of before. I don't need to ask in #drupal or the issue queue, because my problem is solved already. So, let's try this again. ;) The compelling reasons for SVN are: 1. Passwords not passed over the wire in plain-text. :P 2. Empowerment of users to do minor things like renaming files and directories without bugging Derek. :D 3. Greatly increasing the pool of people that has knowledge about how to use and setup the revision control system we switch to, so Derek doesn't have to do everything. :D 4. Being able to leverage outside support materials, such as excellent online documentation and real-time support on IRC. Are those better? :) -Angie From karoly at negyesi.net Thu Jul 31 20:03:44 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Thu, 31 Jul 2008 22:03:44 +0200 (CEST) Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> Message-ID: > I'll admit I haven't closely studied SVN's various security models, > so I could be wrong about this, but on the surface, I think this > particular argument is a red herring, since we couldn't configure SVN > any more securely than we can configure CVS. If anyone can provide a > link to a clear document explaining how to configure SVN more > securely than pserver if you don't actually have accounts and ssh > keys for everyone, please do so. Sure. The usual configuration is that SVN is provided by an Apache module (mod_dav and mod_dav_svn) usually over HTTPS so that passwords are not sniffable and mod_authz_svn provides access control. The documentation for this is http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html . > > 2. The ability to rename and move files, retaining version history, > > without having to post a support request to the repository > > maintainers. > > Yeah, this is a minor pain in the ass (my ass, to be precise, since I > don't think anyone else has ever fielded one of the cvs_rename > issues). But, I've been documenting the process in various issues > and hopefully others could pick up some of this (relatively small, in > the scheme of things) support load. Such a rename breaks every conversion tool out there because it is, let's face it, a hack. A clever, useful hack but a hack. > > 6. I don't know a lot about SVK, but if SVK can be combined with > > SVN to provide the advantages of DRCS for advanced users, without > > reducing our pool of contributors to like 5%, then cool. ;) > > Agreed. This is about the only feature I'd actually be psyched > about. And, making the ~10% of developers that would be psyched > about this happy doesn't outweigh the huge costs (and the "terrifies > the living Hell out of me" problem of SVN's notion of tags) of a switch. Sure. But it kills the use "foo DRCS instead" argument. And yes it is indeed possible to grab a mirror of an SVN repo with SVK and then work locally and then push-pull to your hearts' content. > > 7. The SVN community is completely awesome and helpful. > > Hey, what are you trying to say? You think I'm neither awesome nor > helpful? ;) You are on and they are many and yes they are helpful. And there are overlaps already. > Not to butt heads with the contributor of the year, but I don't think > any of these reasons are actually "compelling". ;) To me the compelling idea is that instead of cvs tag -b DRUPAL-7--1 we can say svn copy /contributions/HEAD/modules/foo /contributions/DRUPAL-7--1/modules/foo/ It's SO much easier to explain this because this is what you have on your hard drive. The cvs tag/branch essentially means virtual directories meaning an abstraction layer which people need to comprehend. Here you have files directories and nothing virtual. (Let's not fight now the actual paths we can discuss how to lay out our repo). I find THIS a very compelling reason. Feel free to say "nah you are full of hot air" but please tell me why. I know someone mentioned the svn:externals support. Now, that is a MAJOR feature that might even get some money from concerned Drupal shops (hey, I can dream, can't I?) because it makes their life much easier. http://weierophinney.net/matthew/archives/132-svnexternals.html Derek complained about SVN naive tags. I said that a solution for immutable tags is already readily available: http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svnperms.conf.example says tags/[^/]+/ = *(add) and there we are. I can ask around for other solutions. From karoly at negyesi.net Thu Jul 31 20:04:58 2008 From: karoly at negyesi.net (Karoly Negyesi) Date: Thu, 31 Jul 2008 22:04:58 +0200 (CEST) Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> Message-ID: > I'll admit I haven't closely studied SVN's various security models, > so I could be wrong about this, but on the surface, I think this > particular argument is a red herring, since we couldn't configure SVN > any more securely than we can configure CVS. If anyone can provide a > link to a clear document explaining how to configure SVN more > securely than pserver if you don't actually have accounts and ssh > keys for everyone, please do so. Sure. The usual configuration is that SVN is provided by an Apache module (mod_dav and mod_dav_svn) usually over HTTPS so that passwords are not sniffable and mod_authz_svn provides access control. The documentation for this is http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html . > > 2. The ability to rename and move files, retaining version history, > > without having to post a support request to the repository > > maintainers. > > Yeah, this is a minor pain in the ass (my ass, to be precise, since I > don't think anyone else has ever fielded one of the cvs_rename > issues). But, I've been documenting the process in various issues > and hopefully others could pick up some of this (relatively small, in > the scheme of things) support load. Such a rename breaks every conversion tool out there because it is, let's face it, a hack. A clever, useful hack but a hack. > > 6. I don't know a lot about SVK, but if SVK can be combined with > > SVN to provide the advantages of DRCS for advanced users, without > > reducing our pool of contributors to like 5%, then cool. ;) > > Agreed. This is about the only feature I'd actually be psyched > about. And, making the ~10% of developers that would be psyched > about this happy doesn't outweigh the huge costs (and the "terrifies > the living Hell out of me" problem of SVN's notion of tags) of a switch. Sure. But it kills the use "foo DRCS instead" argument. And yes it is indeed possible to grab a mirror of an SVN repo with SVK and then work locally and then push-pull to your hearts' content. > > 7. The SVN community is completely awesome and helpful. > > Hey, what are you trying to say? You think I'm neither awesome nor > helpful? ;) You are on and they are many and yes they are helpful. And there are overlaps already. > Not to butt heads with the contributor of the year, but I don't think > any of these reasons are actually "compelling". ;) To me the compelling idea is that instead of cvs tag -b DRUPAL-7--1 we can say svn copy /contributions/HEAD/modules/foo /contributions/DRUPAL-7--1/modules/foo/ It's SO much easier to explain this because this is what you have on your hard drive. The cvs tag/branch essentially means virtual directories meaning an abstraction layer which people need to comprehend. Here you have files directories and nothing virtual. (Let's not fight now the actual paths we can discuss how to lay out our repo). I find THIS a very compelling reason. Feel free to say "nah you are full of hot air" but please tell me why. I know someone mentioned the svn:externals support. Now, that is a MAJOR feature that might even get some money from concerned Drupal shops (hey, I can dream, can't I?) because it makes their life much easier. http://weierophinney.net/matthew/archives/132-svnexternals.html Derek complained about SVN naive tags. I said that a solution for immutable tags is already readily available: http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svnperms.conf.example says tags/[^/]+/ = *(add) and there we are. I can ask around for other solutions. From larry at garfieldtech.com Thu Jul 31 21:15:10 2008 From: larry at garfieldtech.com (Larry Garfield) Date: Thu, 31 Jul 2008 16:15:10 -0500 Subject: [development] =?utf-8?q?FAQ=3A_Why_is_Drupal_still_using_CVS_when?= =?utf-8?q?_X_isa=09much_better_choice=3F?= In-Reply-To: <1217527516.12087.67.camel@thereishope> References: <1217527516.12087.67.camel@thereishope> Message-ID: On Thu, 31 Jul 2008 13:05:16 -0500, Sam Boyer wrote: >> Actually, an even easier method is to setup SVN access over https - >> http://gentoo-wiki.com/HOWTO_Apache2_with_subversion_SVN_and_DAV >> This needs no shell accounts or even SSH keys and can authenticate any >> way apache can. >> >> Thanks! >> - Owen > > Yep, https is also an option. I've not worked as extensively with it as > I have with ssh-based svn, but it does obviate the need for ssh keys > from everyone. It is a bit more intensive than svn+ssh. > > http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.serverconfig Sam, we use the HTTPS version at Palantir. :-) (I didn't set it up, but it's worked fine for us.) --Larry Garfield From kkaefer at gmail.com Thu Jul 31 22:55:07 2008 From: kkaefer at gmail.com (=?ISO-8859-1?Q?Konstantin_K=E4fer?=) Date: Fri, 1 Aug 2008 00:55:07 +0200 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <48919C5A.6000102@killesreiter.de> <4891EAF0.9080600@webchick.net> <2401EAF8-F6EE-4F40-ACE1-4AD293F2A379@dwwright.net> Message-ID: > Sure. The usual configuration is that SVN is provided by an Apache > module (mod_dav and mod_dav_svn) usually over HTTPS so that > passwords are not sniffable and mod_authz_svn provides access > control. The documentation for this is http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html > . We could probably even make it authenticate against the users table from drupal.org. I remember that there were issues in the past with CVS passwords not matching... (I might be wrong about that though). >> Yeah, this is a minor pain in the ass (my ass, to be precise, since I >> don't think anyone else has ever fielded one of the cvs_rename >> issues). But, I've been documenting the process in various issues >> and hopefully others could pick up some of this (relatively small, in >> the scheme of things) support load. There are few requests because most people don't know that it's possible to rename files in CVS via a hack. And even if they do know, they are reluctant because it takes time and is not something they can do immediately themselves. > cvs tag -b DRUPAL-7--1 > > we can say > > svn copy /contributions/HEAD/modules/foo /contributions/DRUPAL-7--1/ > modules/foo/ > > It's SO much easier to explain this because this is what you have on > your hard drive. The cvs tag/branch essentially means virtual > directories meaning an abstraction layer which people need to > comprehend. Here you have files directories and nothing virtual. > (Let's not fight now the actual paths we can discuss how to lay out > our repo). The concept of tags as CVS implements it is indeed not easy to grasp, especially if you use a GUI client. I remember that I had a hard time tagging and branching things (documentation was not as good as it is nowadays back then, admittedly). It's much easier if you see that you have different directories with the same directory layout underneath them. I agree that SVN's notion of tags is somewhat different from CVS' approach (which is not necessarily bad, it's just more difficult to understand, imho), but it's certainly not bad. Merging things between branches or copying files from one branch to another or just plain diffing of two branches/tags are more straightforward in SVN because you *see* the directory layout on your hard disk instead of imagining all the different "shadow versions" of the file in your head. Konstantin From gordon at heydon.com.au Thu Jul 31 23:00:46 2008 From: gordon at heydon.com.au (Gordon Heydon) Date: Fri, 1 Aug 2008 09:00:46 +1000 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: <4891E1D7.7090209@logrus.com> References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <8290C899-9906-4543-B5B5-FFCFEDDE672A@heydon.com.au> <4891E1D7.7090209@logrus.com> Message-ID: Hi, On 01/08/2008, at 2:01 AM, Earl Miles wrote: > Gordon Heydon wrote: >> If it needs to be a centralize RCS, the I hope to SVN mainly >> because the git connectivity is so good, and it really works like >> just another git repository. How ever because SVN doesn't know how >> to tag or branch I don't think that the upstream use of branches >> will work that well. > > This is my concern with SVN. Its idea of tagging and branching is > naive and I find it confusing and also intensive when I end up > checking out all the tags unintentionally. It seems like it would be > difficult to translate our current tagging system to SVN and I am > concerned that the amount of work to do so would be wasted effort. > IMO, we have a lot more important problems to solve than this. Yes this is my major concern with SVN, the total lack of tagging and branching support. Gordon. From drupal at samboyer.org Thu Jul 31 23:32:25 2008 From: drupal at samboyer.org (Sam Boyer) Date: Thu, 31 Jul 2008 18:32:25 -0500 Subject: [development] FAQ: Why is Drupal still using CVS when X is a much better choice? In-Reply-To: References: <48909BD1.2020908@webchick.net> <6117a7500807300952o770411cr32d65113b9419746@mail.gmail.com> <48909F2A.7030700@webchick.net> <8290C899-9906-4543-B5B5-FFCFEDDE672A@heydon.com.au> <4891E1D7.7090209@logrus.com> Message-ID: <1217547145.12087.102.camel@thereishope> On Fri, 2008-08-01 at 09:00 +1000, Gordon Heydon wrote: > Hi, > On 01/08/2008, at 2:01 AM, Earl Miles wrote: > > > Gordon Heydon wrote: > >> If it needs to be a centralize RCS, the I hope to SVN mainly > >> because the git connectivity is so good, and it really works like > >> just another git repository. How ever because SVN doesn't know how > >> to tag or branch I don't think that the upstream use of branches > >> will work that well. > > > > This is my concern with SVN. Its idea of tagging and branching is > > naive and I find it confusing and also intensive when I end up > > checking out all the tags unintentionally. It seems like it would be > > difficult to translate our current tagging system to SVN and I am > > concerned that the amount of work to do so would be wasted effort. > > IMO, we have a lot more important problems to solve than this. > > Yes this is my major concern with SVN, the total lack of tagging and > branching support. > > Gordon. This just isn't accurate. Several posts in this discussion - not even all of them being mine - have indirectly or directly explained that svn does have branching/tagging. Sam