Development
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
May 2005
- 81 participants
- 503 discussions
19 May '05
/ bug reports
email spam filtering does not "see" email addresses when they are NOT preceded by a word
age: 17 weeks 4 days
url: http://drupal.org/node/15654
/ bug reports
In some case, "Recent comment" is not linked to THE COMMENT refered to.
age: 13 hours 49 min
url: http://drupal.org/node/23136
Tagging Issues
age: 2 days 3 hours
url: http://drupal.org/node/23026
Can't submit forum post
assigned: mohaqa
age: 2 days 20 hours
url: http://drupal.org/node/22960
Error in TEMP DIRECTORY
age: 3 days 9 hours
url: http://drupal.org/node/22916
PG_QUERY ERROR - LOCK TABLES - IMPLEMENTATION FAULT.
age: 3 days 11 hours
url: http://drupal.org/node/22911
Multiple Error IN DATABASE.PGSQL
age: 3 days 12 hours
url: http://drupal.org/node/22909
Full path and other information disclosure on DB connect error
age: 4 days 7 hours
url: http://drupal.org/node/22872
Database PostgreSQL - Installation Error by CVS
age: 5 days 11 hours
url: http://drupal.org/node/22773
Search memory limit problems after 4.6 upgrade
age: 1 week 1 day
url: http://drupal.org/node/22497
Warning: Wrong parameter count for mysql_connect()
assigned: jselva(a)drupal.org
age: 1 week 5 days
url: http://drupal.org/node/22188
Podcasting feeds broken
age: 2 weeks 1 day
url: http://drupal.org/node/21924
Teaser problem
assigned: childhood
age: 4 weeks 1 day
url: http://drupal.org/node/20843
UTF-8 node title gets truncated at wrong position
age: 4 weeks 5 days
url: http://drupal.org/node/20537
database table "term_node" not updated when removing a term from a node under editing and submitting
age: 5 weeks 2 days
url: http://drupal.org/node/20315
Attached files can not be deleted
age: 5 weeks 2 days
url: http://drupal.org/node/20307
Reassigning a node to a different term does not work properly
age: 5 weeks 3 days
url: http://drupal.org/node/20278
4.6 aggregator showing/not interpreting HTML tags
age: 6 weeks 4 days
url: http://drupal.org/node/19874
Search ranking broken on pgsql
age: 7 weeks 1 day
url: http://drupal.org/node/19629
New submit error, non-admin user, postgresql database
assigned: adrian
age: 10 weeks 1 day
url: http://drupal.org/node/18552
When I delete a user, any forum in which s/he has commented also disappears.
assigned: Jill6q
age: 13 weeks 8 hours
url: http://drupal.org/node/17428
OPML Import for Aggregator
assigned: arnabdotorg
age: 15 weeks 6 days
url: http://drupal.org/node/16282
Change to sesssion.inc violates UID database constraint
age: 17 weeks 4 days
url: http://drupal.org/node/15666
forum.module problem with postgresql v7.4.1
age: 18 weeks 2 days
url: http://drupal.org/node/15411
PHP 5 gives error when session table has no session
assigned: adschar
age: 18 weeks 2 days
url: http://drupal.org/node/15399
postgresql error
age: 19 weeks 3 hours
url: http://drupal.org/node/15175
Entering an empty title broke drupal
age: 26 weeks 2 days
url: http://drupal.org/node/12974
Argument NOT must be type boolean
age: 26 weeks 2 days
url: http://drupal.org/node/12950
Comments in approval queue still show up in tracker
age: 30 weeks 4 days
url: http://drupal.org/node/11647
Twin problems with comments
assigned: Junyor
age: 31 weeks 6 days
url: http://drupal.org/node/11366
Prevent browser page caching of dynamic content
assigned: mathias
age: 1 year 13 weeks
url: http://drupal.org/node/5900
/ feature requests
Add a footer that is specific to a particular book, shown only on certain pages
age: 6 weeks 6 days
url: http://drupal.org/node/19757
moving pages en masse
age: 6 weeks 6 days
url: http://drupal.org/node/19754
Taxonomy module should use nodeapi 'load'
age: 10 weeks 8 hours
url: http://drupal.org/node/18631
Auto PHP memory maximisation
age: 12 weeks 2 days
url: http://drupal.org/node/17663
Don't reset existing password on request, prevent DoS password reset abuse
age: 14 weeks 3 days
url: http://drupal.org/node/16909
User info exposed to anonymous user
age: 24 weeks 5 days
url: http://drupal.org/node/13545
Allow named anchors to work without specifying full path to node
age: 1 year 25 weeks
url: http://drupal.org/node/4213
/ support requests
Please help me out i am stuck here :(
assigned: neerajshokeen
age: 1 week 4 days
url: http://drupal.org/node/22227
Fatal error: Unknown column 'headers' in 'field list' query
assigned: Eagle-i
age: 9 weeks 1 day
url: http://drupal.org/node/18928
Strange session behavior
age: 9 weeks 3 days
url: http://drupal.org/node/18821
user redirected to homepage when logging in
age: 10 weeks 5 days
url: http://drupal.org/node/18381
Problem with Forums
age: 18 weeks 4 days
url: http://drupal.org/node/15299
/ bug reports
Error listing the module
age: 2 days 8 hours
url: http://drupal.org/node/23012
search over fields.inc fields conceptual error
age: 28 weeks 6 days
url: http://drupal.org/node/12259
fields.inc screws up with multible multiselect fields
age: 28 weeks 6 days
url: http://drupal.org/node/12257
Still GMT/TZ issues with CVS
age: 29 weeks 6 days
url: http://drupal.org/node/11870
Time entry is GMT even when site default is not
age: 30 weeks 4 days
url: http://drupal.org/node/11630
Start Time of Event is NOT Preserved
age: 47 weeks 6 days
url: http://drupal.org/node/8565
/ bug reports
Menu item not showing
age: 32 weeks 5 days
url: http://drupal.org/node/11210
/ bug reports
segmentation fault related to filestore
age: 1 year 33 weeks
url: http://drupal.org/node/3001
/ support requests
File store module - Overwriting Filename....Help needed
assigned: harishkm
age: 1 year 6 weeks
url: http://drupal.org/node/6827
Unserialize error at line 104
age: 1 year 13 weeks
url: http://drupal.org/node/5857
Filestore module- sql errors rectified
assigned: harishkm
age: 1 year 14 weeks
url: http://drupal.org/node/5619
Filestore Module Problems unaddressed
assigned: harishkm
age: 1 year 16 weeks
url: http://drupal.org/node/5365
/ bug reports
Gallery error
age: 3 weeks 2 days
url: http://drupal.org/node/21290
Fatal Error: variable_get()
age: 8 weeks 3 days
url: http://drupal.org/node/19189
No Gallery Image Block
age: 8 weeks 6 days
url: http://drupal.org/node/19045
Mini applet can't find gallery at url /
age: 9 weeks 4 days
url: http://drupal.org/node/18785
Fatal error: Undefined class name 'galleryembed'
age: 12 weeks 1 day
url: http://drupal.org/node/17746
/ support requests
Can't Embed Gallery into Drupal
age: 11 weeks 3 days
url: http://drupal.org/node/18029
/ bug reports
Drupal-4.4-rc breaks registration setups and groups.module
age: 1 year 9 weeks
url: http://drupal.org/node/6392
/ bug reports
Image module thumbnail/preview stop working after l10n
age: 3 weeks 6 days
url: http://drupal.org/node/21036
Cannot upload .jpgs
age: 11 weeks 3 days
url: http://drupal.org/node/18076
Wrongly formed html in image gallery
age: 12 weeks 6 days
url: http://drupal.org/node/17462
Image.Module does not know the correct filename
age: 26 weeks 1 day
url: http://drupal.org/node/13032
SAFE MODE Restriction in effect...
age: 29 weeks 6 days
url: http://drupal.org/node/11843
Uploading jpeg makes Imagemagick do high compression
age: 31 weeks 3 days
url: http://drupal.org/node/11445
Image module failing on Preview because of a blank node id
age: 33 weeks 4 days
url: http://drupal.org/node/11069
Similar problem with Directory Upload Slow
age: 33 weeks 4 days
url: http://drupal.org/node/11064
/ support requests
path problems on upgrading...
age: 2 weeks 3 days
url: http://drupal.org/node/21725
/ bug reports
Please update Node_Aggregator
age: 8 weeks 5 days
url: http://drupal.org/node/19096
Import doesn't like XML/RSS feeds with no Title element
age: 50 weeks 4 days
url: http://drupal.org/node/8128
/ feature requests
RSS items overwriting edited items
age: 48 weeks 5 days
url: http://drupal.org/node/8455
/ bug reports
Organic Groups subscription notifications are being sent to *all* group members instead of just group manager
age: 2 weeks 4 days
url: http://drupal.org/node/21635
/ feature requests
Notify.module ignores the true submission queue
age: 1 year 29 weeks
url: http://drupal.org/node/3765
/ feature requests
Internationalization support for PDF
assigned: TheLibrarian
age: 1 year 7 weeks
url: http://drupal.org/node/6795
/ bug reports
Date for latest is incorrect
age: 4 weeks 6 days
url: http://drupal.org/node/20485
Invalid link to release files
age: 12 weeks 3 days
url: http://drupal.org/node/17625
blank page after install
age: 15 weeks 1 day
url: http://drupal.org/node/16575
"Page Not Found" when trying to view issues or add new release
age: 23 weeks 6 days
url: http://drupal.org/node/13815
Project pages display only title and description
age: 26 weeks 6 hours
url: http://drupal.org/node/13082
Fatal error: Cannot use string offset as an array in includes/tablesort.inc on line 113
assigned: publian
age: 32 weeks 6 days
url: http://drupal.org/node/11187
Can't create new project with issue tracker
age: 39 weeks 20 hours
url: http://drupal.org/node/10148
/ support requests
Help with everything - nothing seems to work in the latest build
age: 25 weeks 2 days
url: http://drupal.org/node/13310
/ bug reports
Can't get the inline tag to show series
age: 1 week 1 day
url: http://drupal.org/node/22520
/ bug reports
MySQL Error
age: 7 weeks 6 days
url: http://drupal.org/node/19413
javascrip downloads square.gif for every category
age: 13 weeks 1 day
url: http://drupal.org/node/17366
/ bug reports
drupal special chars error
age: 4 weeks 3 days
url: http://drupal.org/node/20687
1
0
Hello world,
two weeks ago, I asked the drupal-docs(a)drupal.org mailing list for
feedback on having a "Drupal documentation coordinator". Four
excellent candidates stepped forward; Bryan Kennedy [1], Djun Kim
[2], Anisa [3] and Charlie Lowe [4].
[1] http://lists.drupal.org/archives/drupal-docs/2005-05/msg00037.html
[2] http://lists.drupal.org/archives/drupal-docs/2005-05/msg00050.html
[3] http://lists.drupal.org/archives/drupal-docs/2005-05/msg00057.html
[4] http://lists.drupal.org/archives/drupal-docs/2005-05/msg00156.html
While everyone who applied could do the job excellently, I've chosen
Charlie Lowe to be Drupal's first documentation coordinator. Charlie
is a long time Drupal coordinator, known and respected by everyone in
the Drupal community. Last but not least, he has the documentation
experience it takes to keep us on track.
As Drupal's documentation coordinator his responsibility is to (i) to
determine the priorities and direction of Drupal's documentation,
(ii) to maintain policies and style/markup guides, and when necessary
(iii) to make final calls in documentation-related decisions. Of
course, Charlie can delegate responsibilities to anyone involved with
Drupal's documentation so that he doesn't have to carry the "full
weight" himself.
Please support Charlie in his new role and trust his guidance. Thanks!
--
Dries Buytaert :: http://www.buytaert.net/
6
5
[drupal-devel] [bug] Konqueror 3.3.x problems with forms input inside fieldset tags
by syscrusher 19 May '05
by syscrusher 19 May '05
19 May '05
Issue status update for http://drupal.org/node/16729
Project: Drupal
Version: cvs
Component: node system
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: syscrusher
Updated by: syscrusher
Status: patch
This patch works for me, and is in fact almost identical to my suggested
change. +1, and thanks for moving the commit process one step further
along.
Scott
syscrusher
Previous comments:
------------------------------------------------------------------------
February 4, 2005 - 00:33 : syscrusher
Certain versions of the Konqueror browser have a serious problem with
form input in Drupal 4.4.x and 4.5.x. The symptoms are that keyboard
and mouse input is completely ignored in the affected "text" and
"textarea" fields. The symptoms only occur on textual fields that occur
within a <fieldset>...</fieldset> tag set. This occurs, for example,
when the form_group() API function is invoked.
I have tested several variants on the fieldset attributes, and as far
as I can tell it doesn't matter what attributes are applied. I also
tried it with a manually-created <fieldset><input type="text" ...
/></fieldset> sequence, to eliminate the subtags such as legend,
description, and title. The problem occurs even with a bare fieldset,
and immediately goes away when the form elements are used without being
in a fieldset. I further tested to ensure that the <table> tag was not
involved, because a Google search suggested that there were problems
with tables and fieldsets in Konqueror. Again, the problem is
duplicable with no table in the fieldset.
It took a lot of digging, but I have finally traced the problem to the
file misc/drupal.css. Specifically, the following clause appears to be
at fault:
.node-form fieldset {
display: inline;
}
If I comment out the "display: inline;" attribute, then the fields work
correctly. There does not appear to be any ill effect from this so far,
but I haven't tested extensively nor have I tested to see if this patch
breaks any other browsers.
I can duplicate this problem across several patch levels of Konqueror
3.3.0, and across Drupal 4.5.0 through 4.5.2.
------------------------------------------------------------------------
February 4, 2005 - 01:14 : syscrusher
I've verified that the patch doesn't break Firefox 1.0, and also that it
/does/ fix the problem with Konqueror 3.3.0 in Drupal 4.4, on one of my
production sites. Incidentally, the problem doesn't occur with older
Konqueror versions, as far as I can tell.
------------------------------------------------------------------------
March 26, 2005 - 14:15 : Steven
I believe that piece of CSS is there for IE5, but I can't remember if it
was for Windows or Mac. I'll do some testing later.
------------------------------------------------------------------------
March 26, 2005 - 15:00 : Junyor
Works fine in Safari and Opera with or without that rule.
IE 5 seems to have the same problem with or without it. In 4.5.2, the
fieldsets aren't displayed at all. In HEAD, they cross the screen,
pushing everything else down.
In other words, it doesn't seem to have any bad effects on Mac browsers
with or without that rule.
------------------------------------------------------------------------
March 26, 2005 - 15:09 : syscrusher
BTW, I can also duplicate this bug with the CVS version of Drupal 4.6 as
of 2005-03-24.
------------------------------------------------------------------------
March 27, 2005 - 07:28 : stefan nagtegaal
I can verify that this works flawlesly with drupal 4.6 and any Mac
browser..
It would be nice if this would be applied..
------------------------------------------------------------------------
March 27, 2005 - 23:06 : syscrusher
The bug also bit me on the drupal.org site. I finished a new module and
tried to create a project to announce it, but one of the required
fields in the node/add/... page for Project has the CSS bug. I had to
switch to Firefox in order to create the project, because I couldn't
enter the data from Konqueror.
------------------------------------------------------------------------
March 28, 2005 - 09:35 : frjo
I had the same problem as syscrusher when I tried to add a new project
with Safari (v125.12). It was not possible to enter anything to the
field "CVS directory". With Mozilla it worked OK.
------------------------------------------------------------------------
May 18, 2005 - 14:42 : andremolnar
Attachment: http://drupal.org/files/issues/drupal-css1.patch (451 bytes)
This is not tested - I'm not a khtml user... But, I am taking
everyone's word for it that this is what is needed to fix a problem.
Here is a patch that removes the offending declaration.
andre
1
0
Issue status update for http://drupal.org/node/7582
Project: Drupal
Version: cvs
Component: node system
Category: bug reports
Priority: normal
Assigned to: killes(a)www.drop.org
Reported by: killes(a)www.drop.org
Updated by: killes(a)www.drop.org
Status: patch
Dries, thanks for testing it again.
I do think the broken queries you observer have something to do with
the bad performance after the update. Please log the queries any I will
have a look at them. I've never seen any such queries.
My update script also tries to create the appropriate indices, but it
will of course fail if the database contains cruft. the indices for the
forum are probably missing, too.
I am still convinced that the patch is core worthy.
killes(a)www.drop.org
Previous comments:
------------------------------------------------------------------------
May 5, 2004 - 18:25 : killes(a)www.drop.org
Currently all node revisions are stored in a serialized field in
node.table and retrieved for _each_ page view although they are rarely
needed. However, we have agreed that serializing data is bad and that
we should try to keep the memory foot print pf Drupal small.
Therefore I propose to create a separate revisions table which would be
in principle identical to the node table, only that it could have
several old copies of the same node. Extra data added by other modules
could be added in a serialized field unless we find a better solution.
------------------------------------------------------------------------
May 5, 2004 - 19:06 : jhriggs
I too think the serialized approach is less than desirable, but here's
an alternative. This would likely take some considerable rework in
core and contrib, but the following is how we handle similar types of
situations in our databases at work. It is more elegant that a
separate table, and avoids the (almost exact) duplication of a table.
Instead of separate tables, keep all revisions of nodes in the node
table as follows:
* add field: active (0/1 or Y/N)
* add field: revision
* every revision of a node is stored in the node table; however, only
one revision can be active at any given time
* nid can no longer be unique -- primary/unique key becomes (nid,
active)
* any time a node is loaded, updated (without revision), etc., the
active version is used.
Thoughts?
------------------------------------------------------------------------
May 5, 2004 - 19:57 : killes(a)www.drop.org
I am not opposed to your scheme, but I want to stress the following:
* Duplicating a table's structure is not bad (IMHO) as long as the
content is different.
* having two tables will allow us to have a rather small node table.
This is (maybe) a performance gain.
------------------------------------------------------------------------
May 5, 2004 - 20:37 : jhriggs
I don't necessarily think that duplicating a table's structure is _bad_.
It just seems to be wasteful and a pain to maintain. (Every change to
the node table is made twice...easy to do, but also easy to miss
perhaps.)
As for performance, as long as nid and the active indicator are
indexed, there shouldn't be any performance loss. Also, archiving an
old version when making a new revision will be much simpler: just
change the active indicator rather than copying an entire node to
another table (and ensuring everything gets copied...again a potential
maintainance issue).
To be honest, I would just like to see the serialized data go away,
regarless of what approach is taken.
------------------------------------------------------------------------
July 30, 2004 - 21:49 : Nick Nassar
Attachment: http://drupal.org/files/issues/Drupal-Improved_Revision_Schema_07-30-2004.p… (10.47 KB)
I'm interested in using Drupal for a large scale wiki-type project. In
order to do this, I need revisions to be in their own table.
Attached is a patch to do just that. Most of the changes are pretty
self explanatory. Spreading out node data across two tables meant that
I had to add database functions to do locking/transactions. Without
this, race conditions in which the database becomes corrupted are
possible.
------------------------------------------------------------------------
July 30, 2004 - 21:54 : Nick Nassar
Oh yeah... The patch is a diff against Drupal CVS
------------------------------------------------------------------------
July 31, 2004 - 02:00 : Anonymous
Gerhard speaking.
Nick, thanks a lot for your nice patch! It saves me a great deal of
labour. I looked through it and immediately liked it. You not only put
the old revisions into a new table but also the current one. Do you
have an estimate how much more expensive the additional join is?
Besides a few minor coding style issues I found a major one: Just a few
hours before you uploaded your patch JonBob's node access patch hit
core. That means your patch won't apply anymore as all the queries you
change have been changed. Can I bug you to update your patch?
------------------------------------------------------------------------
July 31, 2004 - 03:11 : Anonymous
Also I think that your upgrade path loses existing revisions.
------------------------------------------------------------------------
July 31, 2004 - 04:39 : drumm
I think this is the proper way to do things. No columns are duplicated,
there is no serialized data, and only the fields that are logically
revised are stored. Nothing jumped out at me as a way to have my node
modules be able to keep a table of revisions of additional fields. I'm
guessing this could be done within the confines of _insert and _update.
Assuming the upgrade path works and modules can extend it I give it a
+1.
------------------------------------------------------------------------
July 31, 2004 - 16:40 : Nick Nassar
It figures that just as I finish a big patch, another patch comes along
and breaks it. Oh well, it should be a pretty easy to fix. I'll work on
it.
Fixing the upgrade path to keep revisions should be fairly painless.
I found another issue that needs to be fixed before this patch gets
merged. There format of a node needs to be stored for each revision.
Otherwise, for modules that store a format for the nodes, such as page
and book, if you write one revision in PHP and the next in HTML, the
PHP revision will be displayed as HTML. This is part of a larger issue
of how node modules should store revisions of additional fields. I
think each module that wants to do this should create another table
with (nid, revid) as the primary key. Just as when they want to add
fields to a node they create another table with nid as the primary key.
As far as performance goes, for sites that make heavy use of revisions,
an extra join on primary keys is going to be a lot faster than grabbing
all of the revisions from that database everytime. We would need to run
benchmarks to determine is the overall difference in speed is for an
average site is a gain or a loss. I'm guessing it's very minor either
way.
------------------------------------------------------------------------
August 23, 2004 - 15:55 : Nick Nassar
Attachment: http://drupal.org/files/issues/Drupal-Improved_Revision_Schema_08-23-2004.p… (10.92 KB)
Here's an updated patch against CVS that puts revisions in their own
table, provides an upgrade path, and fixes the format related bugs in
the last patch.
Hopefully, this can make it into CVS as soon as the freeze is over.
------------------------------------------------------------------------
August 23, 2004 - 16:10 : moshe weitzman
Interesting patch ... drumm's question is still outstanding. how do
modules store revisions of their fields? Are they expected to manage
this on their own? Thats not how it works today.
As an aside, i am seeing profile_ fields in my node.revisions column.
One could argue that those need not be saved. They pertain to the node
author, not to the node itself.
------------------------------------------------------------------------
August 23, 2004 - 18:14 : Nick Nassar
Having modules be responsible for storing revisions of their own fields
is a side-effect of storing revision data in tables. There's really no
way around it. However, revisions generally don't make sense for node
types that don't have PHP/HTML content, such as polls. I think it's
going to be a pretty rare scenario for a new node type to want another
field to change per-revision, so it's a pretty good trade-off.
Storing fields that shouldn't be part of revisions, such as the
profile_ fields, is a side-effect of storing revisions as serialized
objects. Applying this patch will free up that wasted space. :)
------------------------------------------------------------------------
August 23, 2004 - 19:20 : Anonymous
There should be a hook that let's the module choose whether it supports
history. This way a module author can prevent the user from doing
something that may break his module or just cause undefined behavior.
If the module doesn't support history then don't let the user/admin
choose to add history to nodes of that type.
Craig
------------------------------------------------------------------------
August 23, 2004 - 21:23 : Nick Nassar
I agree, there should be an API change to make specifying support for
revisions easier. In the interests of keeping patches small and keeping
to one change per patch, I think the API change should be a separate
issue.
A sort of ad-hoc API to decide whether or not a module supports
revisions by default already exists. Instead of having a hook, modules
set the default value of the "Create new revision" field in the edit
form. The admin can change this option in
admin/node/configure/defaults. This patch doesn't change that.
Revisions are broken for node types that have their own database
structure, like polls, even when storing them as serialized objects.
This patch doesn't change that, either.
------------------------------------------------------------------------
October 26, 2004 - 04:35 : moshe weitzman
I'm guessing that someone is going to have to demonstrate that this
patch performs as well as current drupal before it gets comitted. i
think this patch is a few benchmarks from being comitted.
------------------------------------------------------------------------
October 27, 2004 - 03:04 : Nick Nassar
Attachment: http://drupal.org/files/issues/Drupal-Improved_Revision_Schema_10-26-2004.p… (11 KB)
I ran some really unscientific benchmarks, and it looks like this patch
has a negligible affect on performance.
I used apache bench and the database from theregular.org, which doesn't
contain any revisions (worst case scenario for this patch) and contains
several hundred nodes. Both the patched and unpatched versions hovered
between 2.36 and 2.38 requests per second.
The command I used was:
ab -n50 -C 'PHPSESSID=b01a9f92880ef215b0ed6f1314a5eba2'
http://192.168.0.100/
An updated patch that should apply to CVS is attached.
------------------------------------------------------------------------
October 27, 2004 - 03:05 : Nick Nassar
I ran some really unscientific benchmarks, and it looks like this patch
has a negligible affect on performance.
I used apache bench and the database from theregular.org, which doesn't
contain any revisions (worst case scenario for this patch) and contains
several hundred nodes. Both the patched and unpatched versions hovered
between 2.36 and 2.38 requests per second.
The command I used was:
ab -n50 -C 'PHPSESSID=b01a9f92880ef215b0ed6f1314a5eba2'
http://192.168.0.100/
An updated patch that should apply to CVS is attached.
------------------------------------------------------------------------
October 27, 2004 - 03:05 : Nick Nassar
Attachment: http://drupal.org/files/issues/Drupal-Improved_Revision_Schema_10-26-2004.p… (11 KB)
I ran some really unscientific benchmarks, and it looks like this patch
has a negligible affect on performance.
I used apache bench and the database from theregular.org, which doesn't
contain any revisions (worst case scenario for this patch) and contains
several hundred nodes. Both the patched and unpatched versions hovered
between 2.36 and 2.38 requests per second.
The command I used was:
ab -n50 -C 'PHPSESSID=b01a9f92880ef215b0ed6f1314a5eba2'
http://192.168.0.100/
An updated patch that should apply to CVS is attached.
------------------------------------------------------------------------
November 15, 2004 - 07:05 : elias1884
please overthink the revision system default workflow as well. don't
look at the revision system as an isolated system but as a part of the
whole workflow system!
if you combine revisions with the moderation queue the most logic
default workflow would be like that:
auth user creates node (revision #0)
admin approves the node (status = 1, moderation = 0)
=> node publicly available
auth user finds typo and changes node (revision #1, status = 0,
moderation = 1)
-------
what happens at that point at the moment is, that the node is not
accessible anymore at all until the new revision is approved by admin.
of course the new revision should not go online until reviewed and
approved, this is absolutely correct, but there is no reason to not
take the old revision offline, since it was already approved and should
therefore be online until the new revision is approved. it is not
practical if a node disappears only because the author corrected a
typo.
-------
admin approves the node (status = 1, moderation = 0)
eventhough I first thought a plain boolean active field would not be
capable of providing that functionality if finally came to the
conclusion, that it can. The only thing to do is to not set that bit,
when a new revision is created, but when it is approved (in case
moderation is activated under default workflow). Every revision should
have its own moderation, status and active field and on approval they
are set like this (status=1, moderation=0, active=Y).
When you wanna rollback to an old revision, you can chose between all
revisions that already have the moderation bit set back to 0 again and
the published to 1. There should be an extra permission for rollback!
another concern that I have about the default workflow is, that users
can't see the content, they have just created, when moderation is
enabled. Eventhough, there is a big fat "submission accepted" presented
after submissions, unexperienced users tend to question the information
those stupid tincans give them, if they can't find their content
afterwards. Many users are really lazy bastards and they don't even
read the status messages. The best feedback about whether his story was
submitted successfully or not of course is, if he can find the story
somewhere on the site, maybe with a status message on top of it,
mentioning, that the content is currently not publicly available since
it has not been approved yet. there should be a my content section
under my account, like somebody is trying to do with the workspace
module I guess.
so my suggestion is to make (status=0, moderation=1) still available
for the creator under a my content section somewhere!
------------------------------------------------------------------------
November 24, 2004 - 06:21 : Nick Nassar
I agree. The current workflow for moderation queues and revisions needs
to change, but this patch isn't the place for it. The patch is already
too big, and it only does the backend stuff.
Instead of adding more to this patch and making it take even longer to
get into core, would you mind creating a new issue for your UI
suggestions, so the those changes can be added as a separate patch?
Thanks,
Nick
------------------------------------------------------------------------
December 11, 2004 - 14:26 : Dries
This patch is _much_ needed so I'd love to see someone revive it. In
order for this patch to be accepted, the following needs to be done:
Update this patch to CVS HEAD.
Rename revid to vid.
Rename node_rev to node_revisions.
Rename node_rev.changed to node_revisions.timestamp.
Rename $rnode to $revision.
Fix the coding style to match Drupal's: proper spacing, single quotes
where possible, proper variable names.
Benchmark this patch with a large database with enough revisions. I'd
be happy to benchmark this on my local copy of the drupal.org database.
The book.log field should probably move to the node_revisions table.
This can be done in a separate patch.
Investigate whether transactions are well-supported.
------------------------------------------------------------------------
December 13, 2004 - 02:25 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/Drupal-Improved_Revision_Schema_10-26-2004-r… (11.02 KB)
I've worked a bit on the patch (coding style issues as mentioned by
Dries). One thing I noticed is that the patch uses REPLACE. IIRC this
needs to be chagned to "UPDATE, if fail INSERT" for pgsql
compatibility.
Nick, are you still interested in working on that patch? I'd like to
know how it works on your site and work on getting it into core.
------------------------------------------------------------------------
December 13, 2004 - 14:33 : Dries
Gerhard: your patch does not apply.
------------------------------------------------------------------------
December 13, 2004 - 19:10 : killes(a)www.drop.org
Yes, I know, that was the same version as I mailed to you earlier.
------------------------------------------------------------------------
December 13, 2004 - 23:02 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions.patch (52.96 KB)
Ok, upüdated the patch to cvs.
------------------------------------------------------------------------
December 14, 2004 - 10:58 : Dries
Some more comments:
db_begin_transaction() and db_end_transaction() do not belong in
database.inc, but in database.mysql.inc and database.pgsql.inc
respectively.
The node module calls node_revisionsision_list() which is not defined.
(Fxed that on my local copy.)
Do db_begin_transaction() and db_end_transaction() deprecate Jeremy's
table locking patch?
The upgrade path assigns the wrong user ID to each revision.
The upgrade path assigns the wrong date to each revision (that or a
node's revision page shows the wrong usernames/dates).
The coding style needs a bit of work, but we can worry about that
later.
------------------------------------------------------------------------
December 14, 2004 - 19:34 : Nick Nassar
If you need any help getting those things fixed, just let me know.
------------------------------------------------------------------------
December 14, 2004 - 19:50 : Nick Nassar
How this relates to Jeremy's node locking patch:
There was lots of discussion, and node locking was decided against
because from an end user point of view you never want a node to be
locked. He's now advocating for a much simpler patch that warns users
if their changes will overwrite someone elses. That patch still has a
race condition, which might be fixed using db_begin_transaction().
http://drupal.org/node/6025
------------------------------------------------------------------------
December 15, 2004 - 00:26 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_0.patch (55.96 KB)
Here is an updated patch that tries to address Dries concerns.
------------------------------------------------------------------------
December 15, 2004 - 10:32 : Dries
Attachment: http://drupal.org/files/issues/revisions-bug.png (76.06 KB)
It didn't fix the aforementioned bugs. See attached screenshot.
------------------------------------------------------------------------
January 6, 2005 - 22:15 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_1.patch (51.77 KB)
Ok, here is a new version. Dries and myself worked hart at it, so please
have a look.
what is still missing
- database upgrades for the core modules with an own table
- contrib modules need an upgrade too.
- do we need nid and vid in both the node and the node_revisions table?
- the amount of sql queries means a good stress testing for large
databases.
------------------------------------------------------------------------
January 19, 2005 - 23:43 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_2.patch (49.49 KB)
Here is an updated patch. We discussed to keep the current title in node
module and also in the revisiosn table. This is content duplication but
will save many joins as many queries only need the title of a node.
Discussion is welcome.
------------------------------------------------------------------------
January 20, 2005 - 01:33 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_3.patch (29.93 KB)
I've implemented the aforementioned solution. This makes the patch much
smaller. The patch now also removes taxonomy_node_has_term() which
wasn't used anywhere. I'd really apprciate if some people could test
drive the patch. It will be another huge improvement for 4.6.
------------------------------------------------------------------------
January 20, 2005 - 02:05 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_4.patch (30 KB)
Another revision. Steven didn't like my literal $node->vid in queries.
------------------------------------------------------------------------
January 20, 2005 - 03:10 : killes(a)www.drop.org
- database upgrades for the core modules with an own table
- contrib modules need an upgrade too.
- do we need nid and vid in both the node and the node_revisions table?
- the amount of sql queries means a good stress testing for large
databases.
These issues are still open, btw. Especially the first one needs to be
tackled.
------------------------------------------------------------------------
January 25, 2005 - 22:11 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_5.patch (51.13 KB)
Here is a patch that has the database tables updated for forum, book,
and page module.
------------------------------------------------------------------------
January 30, 2005 - 00:55 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_6.patch (49.18 KB)
Yet another update to keep it working with head. The patch now also
removes the table definitons for the page table.
------------------------------------------------------------------------
January 30, 2005 - 00:57 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_7.patch (55.69 KB)
Sorry, that was the old version, this is the right one.
------------------------------------------------------------------------
January 31, 2005 - 21:55 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_8.patch (55.71 KB)
Updated once more.
------------------------------------------------------------------------
January 31, 2005 - 22:52 : Dries
Anyone to help review/test this?
------------------------------------------------------------------------
January 31, 2005 - 23:22 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_9.patch (49.29 KB)
Updated again, the update functions occurred twice. Thanks Bart.
------------------------------------------------------------------------
February 2, 2005 - 02:27 : killes(a)www.drop.org
Don't know if the db I am using is corrupted or what. I still do have
some didficulties.
The latest patch is attached.
------------------------------------------------------------------------
February 2, 2005 - 02:27 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_10.patch (49.67 KB)
I am probably slowly going mad ...
------------------------------------------------------------------------
February 2, 2005 - 03:54 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_11.patch (48.95 KB)
The update issue still needs investigating. This patch is updated for
cvs.
------------------------------------------------------------------------
February 2, 2005 - 22:20 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_12.patch (49.83 KB)
Ok, here is a new version. I've solved my troubles with book.module.
There are still some issues with forum module. Possibly due to
inconsistent database.
------------------------------------------------------------------------
February 2, 2005 - 23:31 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_13.patch (49.83 KB)
Turns out the drupal.org database had indeed some quirks. Please run
this query in your oldest db and tell me the result:
select nid,type from node where type like '%/%';
If you get a non-zero result we might need to add another security
update.
The patch could use still more testing, though.
------------------------------------------------------------------------
February 3, 2005 - 03:16 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_14.patch (49 KB)
Ok, we are getting somewhere. At a first glance the update is working.
There is a problem remaining: the revisions tab will be shown whether
the node has revisions or not. Not sure we can/need to fix this.
People with a drupal.org account can log in at
http://killes.drupaldevs.org/revision/ and poke around. Your
permissions will be the same as on drupal.org. Feel free to vreak
everything but don't forget to file complaints here. (Note: this is
only a pruned version of the drupal.org database with all project nodes
and nodes with nids > 7000 dropped).
------------------------------------------------------------------------
February 3, 2005 - 06:19 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_15.patch (52.39 KB)
There was some error in node_save and also the patches to the
database.inc files got lost...
------------------------------------------------------------------------
February 3, 2005 - 09:07 : robertDouglass
Submitting book pages doesn't work on your test site. It puts the entire
content of the preview inside the body textarea. I wrote a sentence in
the body and the log, and pressing preview put several lines of HTML
containing both sentences in the body textarea on the preview page,
plus the book page wouldn't submit.
-R
------------------------------------------------------------------------
February 3, 2005 - 09:50 : Junyor
0 results here. I started using Drupal with version 4.4, though.
------------------------------------------------------------------------
February 4, 2005 - 01:56 : killes(a)www.drop.org
@Junyor: Thanks, that's a good sign. Maybe somebody else has an older db
to try.
@robertDouglass: The first effect you describe is due to drupaldevs
running on PHP 5. I am unsure why the second thing does not work. In
node_save() the node object has a nid although there is none in the
form. Very strange.
I've enabled display of db queries on the testsite.
------------------------------------------------------------------------
February 4, 2005 - 21:17 : dmjossel
No results here on the query:
select nid,type from node where type like '%/%';
On a database that was put in place prior to Drupal 4 and is now
running on 4.5.2.
------------------------------------------------------------------------
February 4, 2005 - 22:44 : killes(a)www.drop.org
@dmjossel: thanks.
@all. The strange problem I reported was apparently php 5 related.
After applying Steven's php 5 patch it went away. One error is
remaining: If I create a new forum topic it will be shown as part of
the book on preview. Hmm, that was due to a db that got corrupted
during testing so that is fixed too.
Please poke around at the test site and look if you find more errors.
------------------------------------------------------------------------
February 5, 2005 - 09:16 : Steven
By the way, I just remembered that Drupal.org has some blogs lingering
on in the database even though blog.module is not enabled. Perhaps this
is causing troubles?
------------------------------------------------------------------------
February 5, 2005 - 13:22 : Anonymous
I can't see why it would. Drupal.org will need extra updates for images
and project nodes because those have their own tables. GK.
------------------------------------------------------------------------
February 6, 2005 - 14:49 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_16.patch (52.49 KB)
Updated to apply to cvs again.
------------------------------------------------------------------------
February 22, 2005 - 22:15 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_17.patch (49.64 KB)
Updated again.
All we need is a patch to upload module and an upgrade path for it.
------------------------------------------------------------------------
March 4, 2005 - 06:22 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_18.patch (52.31 KB)
Updated once more. Moved log field from book to node_revisions table as
discussed in Antwerp. upload module still missing.
We need to decide under which circumstances the log field should be
displayed. Should that be added to the workflow? Should it depend on
the revisions setting?
------------------------------------------------------------------------
March 5, 2005 - 21:27 : Anonymous
Attachment: http://drupal.org/files/issues/revisions_20.patch (75.52 KB)
Ok, here it is: Yet another revision of this grrrrreat patch.
Changes from previous versions:
- supports versioning for uploaded files. A problem is that if you
delete a file, it will be gone for all revisions.
- the log field is now in the node_revsions table, but each module has
to decide whether to show it or not.
I've implemented it for the page and the book type odes. Also, the
field can be edited when adding non-book nodes to the book. The log is
displayed on the revisions page and if a node is moderated.
- the revisions are moved to an old_revisions table to a) get the node
table smaller and b) still leave the mavailable for contrib modules
that want to retreive old version data.
The patch has been applied to killes.drupaldevs.org/revision where it
can be tested by anybody (especially people who have "site admin"
rights on drupal.org)
The database is from drupal.org and you should b able to log in with
your pass or simply mail yourself a new one.
Gerhard
------------------------------------------------------------------------
March 5, 2005 - 21:51 : Anonymous
Attachment: http://drupal.org/files/issues/revisions_21.patch (59.42 KB)
BTW, I marked this a bug because atm the revisions field can grow quite
big. Neil has reported problems from some users who were not able to
load some nodes due to to many large revisions.
Also, som unrelated stuff crept into the patch. New version attached.
------------------------------------------------------------------------
March 8, 2005 - 07:56 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_22.patch (60.29 KB)
Ok, I think I got it.
Changes to last version:
- uploads are no properly versioned.
Missing are still pgsql checks and updates.
------------------------------------------------------------------------
March 10, 2005 - 18:58 : Anonymous
Was able to get http://drupal.org/files/issues/revisions_21.patch to
work with drupal-cvs.tar.gz (10 March 2005) by:
- includes/database.mysql.inc: Commenting out duplicates for functions
function db_begin_transaction and function db_commit_transaction
- modules: node.module: Removing "'title' => $node->title," from
$node_table_values variable declaration and removing "'title' =>
"'%s'"," from "$node_table_types" variable declaration.
Happy to submit a patch if requested. I'll watch this thread.
------------------------------------------------------------------------
March 12, 2005 - 01:59 : killes(a)www.drop.org
The duplicate function has been removed in rev 22 of this patch.
Why do you think the changes in node_save are needed? Titles are saved
in both tables for performance reasons.
------------------------------------------------------------------------
March 13, 2005 - 18:12 : jlerner
Hi - I posted comment #62. The changes to node_save appear to be needed
because recent patches (both 21 and 22) remove the field 'title' from
table 'node'. So without the changes to node_save, node.module is
broken and generates errors.
Joshua
------------------------------------------------------------------------
March 13, 2005 - 18:29 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_23.patch (61.17 KB)
Thanks, Joshua, for catching this. node:title is there to stay.
------------------------------------------------------------------------
April 13, 2005 - 18:29 : moshe weitzman
since HEAD is open again, perhaps it is a good time to revisit this
patch.
once this is committed, lets address - http://drupal.org/node/11071
"node_validate does not respect group editing"
------------------------------------------------------------------------
April 18, 2005 - 17:43 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_24.patch (60.39 KB)
Updated.
------------------------------------------------------------------------
April 18, 2005 - 18:16 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_24_0.patch (60.39 KB)
Updated.
------------------------------------------------------------------------
April 19, 2005 - 07:19 : Dries
I'll commit this patch later this week! If you haven't checked this
patch already, I urge you to test/check it out because it will have
significant impact on existing code and modules!
------------------------------------------------------------------------
April 19, 2005 - 07:21 : Dries
Also, what do people think about the n.title being duplicated?
------------------------------------------------------------------------
April 19, 2005 - 07:26 : chx
I won't lose any sleep because of duplicated titles...
------------------------------------------------------------------------
April 19, 2005 - 20:35 : killes(a)www.drop.org
Let me explain why I have chosen to duplicate the title (and also the
uid): If you look at all the queries in Drupal, you will find that most
of them only need the title and th uid of a node. That is, by
duplicating it, we save expensive joins on the node_revisions table.
Due to this fact, this patch is actually a performance improvement.
A note about updating contrib module:
Strictly speaking they wouldn't need to be updated. They only need to
if their authors decide that their info should be available for
revisioning. The upgrade path for forum.module in my update.inc patch
(+ the forum patch)
should show you what needs to be done.
I will write a note for the update page once the patch hits core.
------------------------------------------------------------------------
April 24, 2005 - 23:21 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_25.patch (60.38 KB)
Updated to cvs.
Dries: Based on some remarks in #drupal this is the last update I am
going to do. Apply it or won't fix it.
------------------------------------------------------------------------
April 30, 2005 - 05:42 : Jeremy(a)kerneltrap.org
Attachment: http://drupal.org/files/issues/revisions_25.patch.patch (528 bytes)
That's a big patch. I've only started looking through it. I noticed
one little typo, affecting updates. A patch to your last patch is
attached.
I'm running with the revision patch on my dev server now happily. I
like the concept.
What happens if you click 'stop' on your browser in the middle of a
MySQL "transaction"? I assume that kills the connection to MySQL, and
the lock is freed? But this then leaves changes only partially
applied?
What exactly does locking/unlocking the tables buy us in MySQL? I
don't see anywhere that we detect if an apply fails part way through,
and thus roll back...? What am I missing?
------------------------------------------------------------------------
April 30, 2005 - 09:11 : Dries
Jeremy: many of us are worried about the performance ramifications this
patch introduces. Early experiments showed a small performance
improvement (while a performance regression might be expected). More
performance reports from large sites like kerneltrap.org will certainly
help this patch. Mind to do a quick performance comparision and to
report back with some numbers? Thanks.
------------------------------------------------------------------------
April 30, 2005 - 14:38 : Jeremy(a)kerneltrap.org
Dries: I'm not running HEAD on kerneltrap, so this really isn't a
possibility. Furthermore, until I understand why we're locking tables,
I don't like it. The idea of revisions in their own tables is great.
The idea of locking tables to get (without any obvious benefit) there
really worries me.
------------------------------------------------------------------------
April 30, 2005 - 16:16 : killes(a)www.drop.org
@Jeremy: Thanks for looking at the patch! Also for catching the typo. :)
Did you try to upgrade your database? If yes, how did it go? One of
Dries' concerns is the complexity of the upgrade. How many nodes and
revisions did the db have?
About database locking: This part of the patch was created by Nick and
I simply continued to use it.
Maybe the code should rather be:
if(db_begin_transaction(array('{node}', '{node_revisions}',
'{watchdog}', '{sessions}', '{files}'))) {
db_query($node_query, $node_table_values);
db_query($revisions_query, $revisions_table_values);
db_commit_transaction();
...
}
The idea is probably to avoid two updates at the same time. I don't
think the locking helps if you abort the script at an inconvenient
time. Rollbacks aren't implemented in all mysql versions.
We could omit the db locking if deemed inappropriate. Maybe Nick can
explain his ideas behind this.
@Dries: I wonder who the "many of us" are. They certainly haven't
spoken to me. Moshe had some reservations about the upgrade path and
project module, but the time that project module abused revisions to
store issue updates was long ago and his reservations were resolved.
Nobody else (besides you of course and now Jeremy) has voiced
reservations in a way that was audible to me.
If you grep through the patch you will notice that there are only four
queries which have a join on the node_revisions table. Two of them are
in node_load and in the other cases the join replaced a join on the
node table. The two queries in node_load are the only ones that have
both a join on the node and the revisions query. Thus, loading of
individual nodes might become somewhat slower. All other queries will
be faster since the node table is now much smaller. Also, node loading
does not have to be slower, it depends on your node table. If you had
a lot of revisions and thus a large table, then the new scheme will
make your queries actually faster since we do not load the revisions
on each and every node load anymore. If you didn't have many revisions
your node_load migth be somewhat slower.
WRT to the update script Karoly pointed out that we could use multiple
insert queries instead one query per revision. This would probably
make the update somewhat faster. I am willing to work on this iff you
declare that you will commit the patch afterwards. I'd need to know if
this will work on pgsql and on all supported mysql versions before I
work on it.
About locking: Database locking is dog slow, at least on mysql. I was
using locks in an earlier version of the upgrade script but had to
remove it for (serious!) performance reasons.
------------------------------------------------------------------------
May 9, 2005 - 17:07 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_26.patch (46.45 KB)
Ok, another update, cause I need it myself.
I've left out the transaction stuff for now. It is in principle
unrelated to this patch and should be discussed elsewhere.
This also makes the patch smaller and easier to review (hint, hint).
------------------------------------------------------------------------
May 9, 2005 - 22:32 : killes(a)www.drop.org
The patch contained the update functions twice.
------------------------------------------------------------------------
May 9, 2005 - 22:32 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_27.patch (39.05 KB)
The patch contained the update functions twice.
------------------------------------------------------------------------
May 9, 2005 - 23:23 : Dries
Got one error during the upgrade path:
ALTER TABLE {book} ADD PRIMARY KEY vid (vid)
FAILED
------------------------------------------------------------------------
May 9, 2005 - 23:26 : killes(a)www.drop.org
This had happend to me as well, when I tested this patch. The reason is
that for some reason the vid is not unique. Most likely there are some
entries with vid = 0 in there. Can you check which node types those
have? it always was an error in the test database. See:
http://drupal.org/node/7582#comment-20678
------------------------------------------------------------------------
May 9, 2005 - 23:27 : Dries
Actually, I got 2850 errors during the upgrade.
Some of these:
sprintf() [function.sprintf]: Too few arguments in
drupal-cvs/includes/database.inc on line 154.
Some of these:
Query was empty query: in drupal-cvs/includes/database.mysql.inc on
line 66.
And this:
Unknown table 'n' in field list query: SELECT n.nid, n.vid FROM node
INNER JOIN files f ON n.nid = f.nid in
drupal-cvs/includes/database.mysql.inc on line 66.
:-)
------------------------------------------------------------------------
May 9, 2005 - 23:29 : Dries
Or this:
user error: Unknown column 'log' in 'field list'
query: SELECT parent, weight, log FROM book WHERE nid = 1 in
drupal-cvs/includes/database.mysql.inc on line 66
------------------------------------------------------------------------
May 9, 2005 - 23:52 : Dries
The time required to generate my main page went from 902 ms (before
upgrade) to 2139 ms (after upgrade).
The time required to generate a forum listing (?q=forum/x) went from
1872 ms (before upgrade) to 2874 ms (after upgrade).
Maybe this is because my database is not consistent as the result of
the upgrade errors (yet I don't see any errors on the pages I
benchmarked).
------------------------------------------------------------------------
May 10, 2005 - 02:24 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_28.patch (53.47 KB)
Ok, let me get to this from the bottom to the top:
- my test runs indicated a different development wrt timing. If I had
gotten your results, I had stopped working on this long ago. So your
results are wrong for some reason.
- user error: Unknown column 'log' in 'field list'
Wasn't my day, the book patch got lost. It is contained now. First -R
the old patch, then apply this one.
- Unknown table 'n' in field list query:
Walkah found this, but I forgot to fix it. Fixed now.
- I've no idea where the other queries come from. I am hoping that
either your test db is borken or they are follow ups from the other
ones.
If you let me have your test db, I'll try some debugging.
Thanks for wasting your time, too.
------------------------------------------------------------------------
May 10, 2005 - 07:07 : Dries
I double-checked and the numbers don't seem to lie. I'll test some more
after work on another machine to make sure it is not platform-specific.
------------------------------------------------------------------------
May 11, 2005 - 05:32 : killes(a)www.drop.org
Attachment: http://drupal.org/files/issues/revisions_29.patch (54.83 KB)
Ok, here I am again.
What I did:
1) Ask Dries to let me have drupal.org database
2) get 400MB of SQL inserts...
3) take 23 minutes to import said data
4) Remove all image and project nodes (don't want to install their
modules), 11765 nodes left
5) back up data
6) take tests on non-cached /node page (as anonymous user).
ab results:
-c 1 -n 25:
Requests per second: 1.29 [#/sec] (mean)
Connection Times (ms)
min mean[+/-sd] median max
Total: 663 775 179.7 689 1264
7) Do the same for the tracker page:
Requests per second: 0.83 [#/sec] (mean)
Total: 1182 1199 7.4 1199 1217
8) Apply my patch (rev. 28).
9) run db update and hold breath
10) update times out...
11) play back backup from 5)
12) wait
13) getting annoyed and removing cache, watchdog, and accesslog before
playing in backup.
14) wait again. Understand why Dries doesn't try this patch often.
Maybe a smaller DB would do for testing?
15) wait more. get really annoyed.
16) Set time limit to 18000 in update.php
17) try again
18) fails again before the second update is completed.
19) curse.
20) delete search stuff from db. Ooops, sooo much smaller...
21) import again, below 2 minutes...
22) rewrite to use extended insert. Found a bug.
23) still does not complete. Mysql logging to the rescue!
24) tid = 0? Not good.
25) Well, the update works fine till node 10834. 5595 nodes done, 6136
to go.
26) Writing shell based update script. Discovery: 24MB aren't enough.
Hopefully 64 are. Nope.
extended inserts for revisions are apparently not the brightest idea:
Huge memory consumption.
Hmm, no, all updates got through. Selecting the revisions to put them
into old_revisions table screwed it. Learned about CREATE TABLE
old_revisions SELECT syntax.
Yay! finally. 24 MB are just not enough the update.php script seems to
still break.
27) Benchmarks!
/node
Requests per second: 1.54 [#/sec] (mean)
Connection Times (ms)
min mean[+/-sd] median max
Total: 632 649 40.5 636 791
/tracker
Requests per second: 0.86 [#/sec] (mean)
Total: 1119 1165 65.8 1160 1461
Ok: So we get an improvement for many node_loads, but none for simple
selects from node.
More tests can be done.
28) roll new patch
Ain't Drupal fun?
------------------------------------------------------------------------
May 18, 2005 - 15:38 : Dries
I did another round of tests on _another_ machine and it is not looking
good:
Before upgrade After upgrade
?q= (main page) 218 ms/request 340 ms/request
?q=forum (forum overview) 754 ms/request 1520 ms/request
?q=about (book page) 375 ms/request 5400 ms/request
The upgrade process itself gave me a number of 'query was empty' and
'sprintf(): too few arguments' reports. Everything seems to work fine
though.
Looking at the ?q=about page, I see that the following query is
executed twice _and_ that each time, it take more than 2 seconds to
complete:
SELECT n.nid, n.title, b.parent, b.weight FROM node n INNER JOIN book b
ON n.vid = b.vid WHERE n.status = 1 AND n.moderate = 0 ORDER BY
b.weight, n.title;
--8 SHOW INDEX FROM book;
+-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name |
Collation | Cardinality | Sub_part | Packed | Null | Index_type |
Comment |
+-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| book | 1 | book_parent | 1 | parent | A
| 92 | NULL | NULL | | BTREE | |
| book | 1 | nid | 1 | nid | A
| 369 | NULL | NULL | | BTREE | |
+-------+------------+-------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
2 rows in set (0.00 sec)
The book module does not appear to have a primary key? Sounds like a
bad idea so I added one:
mysql> ALTER TABLE book ADD PRIMARY KEY nid (nid);
Query OK, 369 rows affected (0.02 sec)
Records: 369 Duplicates: 0 Warnings: 0
Next, I wanted to make the vid column a unique key in all node tables:
mysql> ALTER TABLE node ADD UNIQUE vid (vid);
Query OK, 20392 rows affected (0.81 sec)
Records: 20392 Duplicates: 0 Warnings: 0
mysql> ALTER TABLE book ADD UNIQUE vid (vid);
ERROR 1062: Duplicate entry '0' for key 2
mysql> ALTER TABLE forum ADD UNIQUE vid (vid);
Query OK, 10806 rows affected (0.10 sec)
Records: 10806 Duplicates: 0 Warnings: 0
As you can see, it fails for the book table which makes me believe
there is some inconsistent data ... I set out to fix that:
mysql> SELECT nid, COUNT(nid) AS vids FROM book GROUP BY vid HAVING
vids > 1;
+-----+------+
| nid | vids |
+-----+------+
| 871 | 2 |
+-----+------+
1 row in set (0.00 sec)
mysql> SELECT title FROM node WHERE nid = 871;
Empty set (0.00 sec)
mysql> DELETE FROM book WHERE nid = 871;
Query OK, 1 row affected (0.00 sec)
mysql> ALTER TABLE book ADD UNIQUE vid (vid);
Query OK, 368 rows affected (0.01 sec)
Records: 368 Duplicates: 0 Warnings: 0
Looks like everything is well now. Ran some new benchmarks:
Before upgrade After upgrade With
indices
?q= (main page) 218 ms/request 340 ms/request 336
ms/request
?q=forum (forum overview) 754 ms/request 1520 ms/request 1531
ms/request
?q=about (book page) 375 ms/request 5400 ms/request 475
ms/request
Unfortunately, we're still slower than the original code.
1
0
18 May '05
Hi y'all.
I've often wondered why node_save returns the nid instead of the whole
node. I've written code a couple of times where I want to
programmatically generate a node. I set $node->type, $node->uid and send
it off to node_save. At that point I'd like to get the filled out node
back, but instead usually have to call node_load with the nid I just
got. Is there a reason for this that I'm unaware of?
thanks
Robert
1
0
[drupal-devel] [bug] Konqueror 3.3.x problems with forms input inside fieldset tags
by andremolnar 18 May '05
by andremolnar 18 May '05
18 May '05
Issue status update for http://drupal.org/node/16729
Project: Drupal
Version: cvs
Component: node system
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: syscrusher
Updated by: andremolnar
-Status: active
+Status: patch
Attachment: http://drupal.org/files/issues/drupal-css1.patch (451 bytes)
This is not tested - I'm not a khtml user... But, I am taking
everyone's word for it that this is what is needed to fix a problem.
Here is a patch that removes the offending declaration.
andre
andremolnar
Previous comments:
------------------------------------------------------------------------
February 4, 2005 - 05:33 : syscrusher
Certain versions of the Konqueror browser have a serious problem with
form input in Drupal 4.4.x and 4.5.x. The symptoms are that keyboard
and mouse input is completely ignored in the affected "text" and
"textarea" fields. The symptoms only occur on textual fields that occur
within a <fieldset>...</fieldset> tag set. This occurs, for example,
when the form_group() API function is invoked.
I have tested several variants on the fieldset attributes, and as far
as I can tell it doesn't matter what attributes are applied. I also
tried it with a manually-created <fieldset><input type="text" ...
/></fieldset> sequence, to eliminate the subtags such as legend,
description, and title. The problem occurs even with a bare fieldset,
and immediately goes away when the form elements are used without being
in a fieldset. I further tested to ensure that the <table> tag was not
involved, because a Google search suggested that there were problems
with tables and fieldsets in Konqueror. Again, the problem is
duplicable with no table in the fieldset.
It took a lot of digging, but I have finally traced the problem to the
file misc/drupal.css. Specifically, the following clause appears to be
at fault:
.node-form fieldset {
display: inline;
}
If I comment out the "display: inline;" attribute, then the fields work
correctly. There does not appear to be any ill effect from this so far,
but I haven't tested extensively nor have I tested to see if this patch
breaks any other browsers.
I can duplicate this problem across several patch levels of Konqueror
3.3.0, and across Drupal 4.5.0 through 4.5.2.
------------------------------------------------------------------------
February 4, 2005 - 06:14 : syscrusher
I've verified that the patch doesn't break Firefox 1.0, and also that it
/does/ fix the problem with Konqueror 3.3.0 in Drupal 4.4, on one of my
production sites. Incidentally, the problem doesn't occur with older
Konqueror versions, as far as I can tell.
------------------------------------------------------------------------
March 26, 2005 - 19:15 : Steven
I believe that piece of CSS is there for IE5, but I can't remember if it
was for Windows or Mac. I'll do some testing later.
------------------------------------------------------------------------
March 26, 2005 - 20:00 : Junyor
Works fine in Safari and Opera with or without that rule.
IE 5 seems to have the same problem with or without it. In 4.5.2, the
fieldsets aren't displayed at all. In HEAD, they cross the screen,
pushing everything else down.
In other words, it doesn't seem to have any bad effects on Mac browsers
with or without that rule.
------------------------------------------------------------------------
March 26, 2005 - 20:09 : syscrusher
BTW, I can also duplicate this bug with the CVS version of Drupal 4.6 as
of 2005-03-24.
------------------------------------------------------------------------
March 27, 2005 - 12:28 : stefan nagtegaal
I can verify that this works flawlesly with drupal 4.6 and any Mac
browser..
It would be nice if this would be applied..
------------------------------------------------------------------------
March 28, 2005 - 04:06 : syscrusher
The bug also bit me on the drupal.org site. I finished a new module and
tried to create a project to announce it, but one of the required
fields in the node/add/... page for Project has the CSS bug. I had to
switch to Firefox in order to create the project, because I couldn't
enter the data from Konqueror.
------------------------------------------------------------------------
March 28, 2005 - 14:35 : frjo
I had the same problem as syscrusher when I tried to add a new project
with Safari (v125.12). It was not possible to enter anything to the
field "CVS directory". With Mozilla it worked OK.
1
0
Issue status update for http://drupal.org/node/23160
Project: Drupal
Version: 4.6.0
Component: upload.module
Category: bug reports
Priority: normal
Assigned to: drumm
Reported by: drumm
Updated by: drumm
Status: patch
Attachment: http://drupal.org/files/issues/upload.module_3.diff (1.36 KB)
The upload module was missing something to replace this particular
%name.
drumm
1
0
Issue status update for http://drupal.org/node/1898
Project: Drupal
Version: cvs
Component: book.module
Category: bug reports
Priority: critical
Assigned to: puregin
Reported by: kika
Updated by: cel4145
Status: patch
The Drupal doc team is very interested in being able to import/export
book content. I'm sure that others would be interested in it, too. Djun
has indicated that this patch is a good step toward having that
functionality
So +1 if the developers can help him to get this patch so that it can
be implemented.
cel4145
Previous comments:
------------------------------------------------------------------------
June 9, 2003 - 17:06 : kika
Snippet from book_render():
$output .= "<dt>". l($node->title, "node/view/$node->nid")
."</dt><dd>". book_body($node) ."<br /><br /></dd>";
Is using definition list here is really correct? This should be
replaced with appropiate div's or even better, funnel through theme()
Same goes for the function book_print():
$output .= "$node->title";
if ($node->body) {
$output .= "<ul>". book_body($node) ."</ul>";
}
Why wrap body inside <ul>?
------------------------------------------------------------------------
June 10, 2003 - 19:31 : al
Yeah, it's all nasty. I patched this ages ago, but no one seemed
interested. The patch now won't apply due to all the changes since
then.
I'm on this - expect a new patch to hit my sandbox shortly.
------------------------------------------------------------------------
June 11, 2003 - 01:03 : ax
please remove the superfluous <ul>s and <li> [1], too.
to solve the problem of invalid nested <hx> tags, maybe we should
change <h$depth> to <h1 class="book-h$depth">? this way, we
could use <h2> - <h6> in book pages. alternatively, we should only use
<h5> and <h6> in book pages - we shouldn't have nestings deeper than 4
in printed books, then.
additionally, i think it would be a good idea to add id's to all book
headings so they can be jumped to via fragment identifiers
(url#fragment-identifier). i often wish this would be possible when
referencing the last paragraph of a long page of documentation ...
these id's should be of the form <hx id="foo" name="foo"> [2], with foo
probably being the node-id of the single book page.
adding id's to headings would also be a good idea for headings /
sections in single book nodes. for example, it would be nice if i could
link to list point 10 in the drupal installation instructions [3] via
something like url#10. these id's had to be added manually. the
question is: how can these id's be named to be unique within a
/printed/ book? probably <node_id>_<section_id> ...
[1] [ [drupal-devel] Drupal handbook formatting and heading tags |
http://lists.drupal.org/pipermail/drupal-devel/2003-June/025860.html ]
[2] [ XHTML Spec, HTML Compatibility Guidelines, Fragment Identifiers |
http://www.w3.org/TR/xhtml1/#C_8 ]
[3] http://drupal.org/node/view/260
------------------------------------------------------------------------
June 15, 2003 - 09:23 : al
Fixed in latest CVS.
Uses all of Ax's suggestions:
- <h1 class="depthX">
- Fixed to use CSS rather than tables.
- Changes link at top to standard "breadcrumb" style, rather than
hierarchy in tree view.
- Removes odd and superfluous <ul> tags and the like.
- Makes printed docs have proper <html> and <body> wrapping, etc.
------------------------------------------------------------------------
May 5, 2005 - 02:20 : puregin
I'm re-opening this, because the problem persists in CVS.
1) The current CVS version (1.288.2.4) of book module still wraps
$node->body in an <ul> element in book_print_recurse(). This produces
non-conformant HTML.
I'm not sure why this was done in the first place - I'm guessing
someone wanted to insulate from having bad markup in a book page throw
off the enclosing page.
Getting rid of the offending UL tags is a one-line solution, but what
is the right thing to do here?
I'd like to see something very structural - wrapping the /entire/
output (including the generated sectional header) of the
book_print_recurse() wrapped in a <div> element. This will properly
nest true structural sections, making the structure accessible to
applications via DOM. It will also make it easier to use XSLT, for
example, to transform into various XML based export formats, for
example. Any reason not to do so?
Also... when we get the 'printer-friendly' version of a page, the
subtree rooted at that page is returned, and the root page is marked up
with a class="book-h1". Is there any reason why we don't compute the
depth of the root page, and use that to generate the "in-place" header?
In other words, if a section is "book-h3" relative to the top-level
book, shouldn't it be "book-h3" whenever it is viewed?
In this case, we could apply the same principal to generating the <div>
tags around each section.
------------------------------------------------------------------------
May 5, 2005 - 17:58 : puregin
Attachment: http://drupal.org/files/issues/book_printer_friendly_div.patch (1.57 KB)
I am attaching a patch which fixes improper printer-friendly output, as
discussed.
The patch fixes book_print and book_print_recurse() to insert a <div>
start tag before emitting the header, and to close this after
subsections have been recursively generated.
The <div> tag has an id attribute of the form id="sect-123", where the
node's nid is 123, and a class attribute of form class="sect/n/" where
the depth of the section is /n/.
I'm marking this issue as critical, since the present HTML output plays
havoc with any attempts at sane PDF generation.
I will address the issue of where printer-friendly subsections should
be 'rooted' in a follow-up.
Djun
------------------------------------------------------------------------
May 6, 2005 - 03:53 : Dries
Let's not abbreviate 'section' to 'sect'. Also, we use '-' to separate
words in CSS names.
- If the section ID uses the node ID, maybe we should use 'node-'
instead of 'sect-'?
- If the class uses depth, maybe we should use 'depth-' instead of
'sect'?
The same is true for your other patch where you suggest to use 'n'.
Better to make that 'node-'. (Feel free to merge both patches.)
Looks like the book.module generates a _lot_ of CSS IDs/classes. If the
introduction of these new IDs/classes allows us to remove some of the
existing IDs/classes, please do.
------------------------------------------------------------------------
May 6, 2005 - 23:26 : Steven
Here's my idea.. why not use regular h tags for the book structure, and
renumber the header tags in the content, starting one level after the
current book depth?
Here's a function which does this:
<?php
function fix_up_headers($text, $level = 1) {
// Find all header tags that are used (if any)
if (preg_match_all('/<h[0-9]+/i', $text, $tags) == 0) {
return $text;
}
// Discard duplicates and sort them by number
$tags = array_unique(array_map('strtolower', $tags[0]));
natsort($tags);
// Renumber them and replace them
$i = $level;
foreach ($tags as $tag) {
$from[] = '@'. preg_quote($tag) .'(?![0-9])@i';
$from[] = '@'. preg_quote(str_replace('<', '</', $tag))
.'(?![0-9])@i';
$to[] = '<h'. $i;
$to[] = '</h'. $i;
$i++;
}
$text = preg_replace($from, $to, $text);
// Change level 7 headers and higher to divs.
return preg_replace(array('!<h([7-9]|[1-9][0-9]+)!i',
'!</h([7-9]|[1-9][0-9]+)!i'), array('<div class="header-\1"', '</div'),
$text);
}
?>
That way you can use header tags safely in the content (which is useful
in the context of a single page) without messing up the book output.
------------------------------------------------------------------------
May 7, 2005 - 02:50 : puregin
Attachment: http://drupal.org/files/issues/02_book_printer_friendly_div.patch (1.78 KB)
The attached patch changes the div id to the form 'node-123'. I was
concerned that a document fragment might be created with both a book
section and a non-book section from the same node, leading to
non-unique id's, but at this point it seems like an unlikely scenario.
I've changed 'class=sect1' to 'class=section-1'. I was trying to be
lazy and use the DocBook section name convention to make XSLT
conversion a little easier, but it's really not saving any effort, in
the end, and this is clearer.
I think 'section' rather than 'depth' is appropriate - it describes
what the role of the div element is.
I've closed the other issue regarding id's in header elements, because
I've replaced the whole 'class="book-hx"' business in headers with
'class="book-header"'. Since the level can now be selected by context
with respect to the enclosing div, separate classes for headers are not
required. That is, we can style with CSS like the following:
.section-1 h1.book-header {
font-weight: bold;
font-size: 2.2em;
}
.section-2 h1.book-header {
font-size: 2em;
}
.section-1 p {
text-align: justified;
}
.section-3 p {
margin-left: 3em;
margin-right: 3em;
}
Note that the section-2 h1 will be bold, since the section-2 div is
nested within the section-1 div. Also, all paragraphs regardless of
section will be justified; and section-3 paragraphs will be indented
left and right.
Because we can style /everything/ by section, not just headers, and
because the styling specifications respect the sectional hierarchy,
it's possible to create very elegant and sophisticated book pages with
very little CSS. Even I can do it! :) I'm definitely *not* a
designer, but I've played around a bit with this - have a look at
http://www.puregin.org/book/print/129 for an example.
I will attach patches for misc/print.css and misc/drupal.css
separately. I don't understand why, but the present version (cvs) of
these files has all of the h1.book-hx selectors in drupal.css - the
printer-friendly page actually looks at print.css. Am I missing
something?
For the record, this approach seems to have been suggested by clairem
in http://drupal.org/node/8049 where I have a little rant about
headings in book pages. Twice :)
Djun
------------------------------------------------------------------------
May 7, 2005 - 03:10 : puregin
Steven - that's a neat idea, and very clever, clean code! But it still
doesn't catch problems such as, for example, an h5 inside of an h1
section with no intervening h2..h4 headers, or?
I'm inclined to be a bit suspicious of the approach, though - I rather
think it's 'doing magic behind the user's back'. If people are going
to insist on putting headings inside of pages, it should be possible.
And it would be odd for users to discover that what they typed isn't
what they get.
------------------------------------------------------------------------
May 7, 2005 - 03:32 : puregin
Attachment: http://drupal.org/files/issues/print_css_div.patch (1.36 KB)
Here's the patch for print.css.
There's a couple of commented-out lines - these show how to make
section headings 'run in' as part of the following paragraph (or other
inline element). I am assuming that print.css is supposed to be
something of an example that people would use to experiment with?
Please feel free to improve this in any way - as I said, I'm far from
being a graphic designer, and I'm also not really sure what the
intention of this file is.
------------------------------------------------------------------------
May 7, 2005 - 13:40 : Steven
Puregin: nope, the code correctly handles missing h numbers. If the book
page only uses h2, then that will be the first new level. If it uses h2
and h4, and it is inside a 3rd level book page for example (whose title
would be h3), they they get renumbered to respectively h4 and h5 (no
missing number).
>From a semantic point of view it is crazy not to use h# for book
titles.
------------------------------------------------------------------------
May 7, 2005 - 13:44 : Steven
A bit more verbose: I think the overwhelming majority of users browse a
book on the site itself. Within a single page, there is a h1 tag for
the page title. So it makes sense for a writer to use h2, h3, etc
inside a single page. This is semantically valid HTML.
On the other hand, the print output places the content in a whole new
context. I would expect the book module to take whatever steps
necessary 'behind the user's back' to ensure it displays correctly.
------------------------------------------------------------------------
May 7, 2005 - 15:43 : puregin
Sorry, I replied to the last post on the list - I'll include the post
here for the record, and expand a little.
Steven, I think that the issue you're addressing is actually a
different one than I am trying to fix in my patch, which addresses how
sections are wrapped.
My patch would still allow users to write headers in their book pages -
it would then be up to post-processing - or something like your
approach - to deal with how embedded headers are dealt with.
Perhaps we should take up your suggestion in another of the book.module
issues dealing with the sequences of headers? How about
http://drupal.org/node/8049, or http://drupal.org/node/4118?
With respect to your suggestion - I understand now that you're
proposing to apply the re-writing only to the printer-friendly output.
I'm conflicted about this idea - on the one hand, the output which it
produces is clearly an improvement over the present output. On the
other hand, it changes what the user types to make it 'right' - I guess
this is in the long tradition of HTML being interpreted very forgivingly
by web-browsers and other applications. On the balance, I support your
idea - I guess it's in the spirit of 'make things easier for the user'.
With respect to the actual code - I don't think it will handle the case
where h2, h3, and h4 are all used in the text, but the sequence h2, h4
occurs. To put it another way, the problem of checking whether headers
are in a legal sequence is context sensitive, while a
regular-expression search and replace (even if the replacement sequence
remaps the targets) is context-free. When I say legal sequence, I mean
legal in terms of book hierarchy, not in terms of the XHTML definition,
which doesn't address hierarchy, because headers are titles, not
sectional elements. SGML/XML publishing DTDs define such things via
inclusion/exclusion on true sectional elements)
The case I described is, admittedly, a relatively infrequent
occurrence, and the general solution would be way to difficult to deal
with - it would involve constructing and manipulating a DOM, or
something along those lines. Ugh!
Djun
1
0
Issue status update for http://drupal.org/node/17030
Project: Drupal
Version: cvs
Component: blog.module
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: Bèr Kessels
Updated by: Chris Johnson
Status: patch
I think this is a useful feature. I've coded custom blocks in the past
to provide it on my sites.
Chris Johnson
Previous comments:
------------------------------------------------------------------------
February 8, 2005 - 17:27 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list.patch (1.66 KB)
Small patch to show a list of bloggers. We all should know that
blog.module is not meant for personal blogging, but that set aside, we
do not have a way to show all bloggers, on a site as a list. This patch
ads a few lines that will allow you to show that overview of blogging
users. It ads a menu item, disabled by default that shows such a list.
------------------------------------------------------------------------
February 8, 2005 - 17:31 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list.png (4.02 KB)
Here is a small screeny that shows what this is about.
------------------------------------------------------------------------
February 8, 2005 - 17:34 : Bèr Kessels
Attachment: http://drupal.org/files/issues/list_bloggers_2.png (2.25 KB)
hmm. error in my png file. Here is a correct one.
------------------------------------------------------------------------
February 19, 2005 - 14:13 : Emiliano
Hi Bèr Kessels!
Thanks for the patch! It's really useful! :-)
I just noticed what I think is a little mistake in this line:
$items[] = l($row->name, 'blog/'.$row->uid)." ".theme('xml_icon',
url('blog/'.$row->uid.'/feed'), TRUE);
Which I believe should end like:
$items[] = l($row->name, 'blog/'.$row->uid)." ".theme('xml_icon',
url*('blog/feed/'.$row->uid)*, TRUE);
Ah, and BTW, "db_rewrite_sql" didn't work for me... I just cut it
off... ;-)
Cheers,
Emiliano.
------------------------------------------------------------------------
March 17, 2005 - 16:17 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list_2.patch (1.81 KB)
and here is the actual patch. (i think i really need some script that
tells me i did not attach a patch ;) )
------------------------------------------------------------------------
March 17, 2005 - 16:19 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list_2_0.patch (1.71 KB)
sigh. something tells me i should stop working.... a silly "F" sneaked
into the previous patch.
------------------------------------------------------------------------
March 24, 2005 - 14:25 : Anonymous
I applied the patch, reuploaded the blog.module and then deactivated and
reactivated it. I cannot see a difference. How do I access the blog
users page?
Drupal 4.6rc
thanks for the help.
------------------------------------------------------------------------
March 24, 2005 - 14:53 : Bèr Kessels
look in the menu admin.
------------------------------------------------------------------------
May 18, 2005 - 07:38 : Bèr Kessels
Nearly two months since the patch. If there is no need for this I will
mark it won't fix.
------------------------------------------------------------------------
May 18, 2005 - 07:52 : tostinni
I made a custom block for this, but it still need a little improvment
(add "read more" for example). So I don't know if it's usefull but if
anyone care :
<?php
$result = db_query("SELECT u.uid, u.name, COUNT(0) AS num FROM {node} n
LEFT JOIN {users} u ON u.uid = n.uid WHERE n.type = 'blog' GROUP BY
u.uid, u.name ORDER BY u.name ASC");
while ($blog = db_fetch_object($result)) {
$output .= '<li />'.l($blog->name. ' ('.$blog->num.')',
'blog/'.$blog->uid);
}
return '<ul>'.$output.'</ul>';
?>
1
0
Issue status update for http://drupal.org/node/17030
Project: Drupal
Version: cvs
Component: blog.module
Category: feature requests
Priority: normal
Assigned to: Anonymous
Reported by: Bèr Kessels
Updated by: tostinni
Status: patch
I made a custom block for this, but it still need a little improvment
(add "read more" for example). So I don't know if it's usefull but if
anyone care :
<?php
$result = db_query("SELECT u.uid, u.name, COUNT(0) AS num FROM {node} n
LEFT JOIN {users} u ON u.uid = n.uid WHERE n.type = 'blog' GROUP BY
u.uid, u.name ORDER BY u.name ASC");
while ($blog = db_fetch_object($result)) {
$output .= '<li />'.l($blog->name. ' ('.$blog->num.')',
'blog/'.$blog->uid);
}
return '<ul>'.$output.'</ul>';
?>
tostinni
Previous comments:
------------------------------------------------------------------------
February 8, 2005 - 18:27 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list.patch (1.66 KB)
Small patch to show a list of bloggers. We all should know that
blog.module is not meant for personal blogging, but that set aside, we
do not have a way to show all bloggers, on a site as a list. This patch
ads a few lines that will allow you to show that overview of blogging
users. It ads a menu item, disabled by default that shows such a list.
------------------------------------------------------------------------
February 8, 2005 - 18:31 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list.png (4.02 KB)
Here is a small screeny that shows what this is about.
------------------------------------------------------------------------
February 8, 2005 - 18:34 : Bèr Kessels
Attachment: http://drupal.org/files/issues/list_bloggers_2.png (2.25 KB)
hmm. error in my png file. Here is a correct one.
------------------------------------------------------------------------
February 19, 2005 - 15:13 : Emiliano
Hi Bèr Kessels!
Thanks for the patch! It's really useful! :-)
I just noticed what I think is a little mistake in this line:
$items[] = l($row->name, 'blog/'.$row->uid)." ".theme('xml_icon',
url('blog/'.$row->uid.'/feed'), TRUE);
Which I believe should end like:
$items[] = l($row->name, 'blog/'.$row->uid)." ".theme('xml_icon',
url*('blog/feed/'.$row->uid)*, TRUE);
Ah, and BTW, "db_rewrite_sql" didn't work for me... I just cut it
off... ;-)
Cheers,
Emiliano.
------------------------------------------------------------------------
March 17, 2005 - 17:17 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list_2.patch (1.81 KB)
and here is the actual patch. (i think i really need some script that
tells me i did not attach a patch ;) )
------------------------------------------------------------------------
March 17, 2005 - 17:19 : Bèr Kessels
Attachment: http://drupal.org/files/issues/blog_bloggers_list_2_0.patch (1.71 KB)
sigh. something tells me i should stop working.... a silly "F" sneaked
into the previous patch.
------------------------------------------------------------------------
March 24, 2005 - 15:25 : Anonymous
I applied the patch, reuploaded the blog.module and then deactivated and
reactivated it. I cannot see a difference. How do I access the blog
users page?
Drupal 4.6rc
thanks for the help.
------------------------------------------------------------------------
March 24, 2005 - 15:53 : Bèr Kessels
look in the menu admin.
------------------------------------------------------------------------
May 18, 2005 - 08:38 : Bèr Kessels
Nearly two months since the patch. If there is no need for this I will
mark it won't fix.
1
0