Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After talking to Crell and reviewing the issue, I think the proposed schama change for fixing http://drupal.org/node/220064 should not be backported to D5 and D6.
The issue with a backport is that doing so will change the bid/delta value that themers rely on.
So attached here is the original block_box_get() patch. It uses a CAST to reconcile the issue on pgSQL 8.2.3+
Comment | File | Size | Author |
---|---|---|---|
#16 | block_box_delete_submit.patch | 659 bytes | k4ml |
#13 | block-box-get-5.x.patch | 1.23 KB | David_Rothstein |
#3 | block-box-get.patch | 1.56 KB | David_Rothstein |
#1 | block_sql_6.patch | 483 bytes | agentrickard |
block_sql.patch | 712 bytes | agentrickard | |
Comments
Comment #1
agentrickardThere is (perhaps) a simpler way to fix this.
Comment #2
David_Rothstein CreditAttribution: David_Rothstein commentedOops, it looks like the wrong patch was copied over from the other issue. Here is the correct patch (from http://drupal.org/node/220064#comment-827368). This patch seems to work, and the reasons why it should be OK are discussed at http://drupal.org/node/220064#comment-827364... however, it needs one more reviewer before it's RTBC.
Also, if the JOIN really does turn out to be unnecessary, then it shouldn't be in 7.x either, so let's start there and then backport...
Comment #3
David_Rothstein CreditAttribution: David_Rothstein commentedI attached the patch and then it disappeared... so here it is again ;)
Comment #4
agentrickardThis is NOT the D7 patch.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedBoth this and http://drupal.org/node/220064 can go into D7; they don't conflict with each other at all. The reason for the patch here is that it's an unnecessary database JOIN that serves no purpose, that's all (in addition to the critical bug).
However, it's definitely much more time-sensitive for D6, so I suppose we can leave it here and then it can be backported ("forwardported"?) to D7 later...
Comment #6
agentrickardRight, but we separated the issues because the more complex fix in http://drupal.org/node/220064 is not appropriate for D5 or D6, since it introduces API changes (however slight) for themers.
The code here should be part of the other, larger patch for D7.
Comment #7
drupallfm CreditAttribution: drupallfm commentedTested the:
#3
David_Rothstein - May 20, 2008 - 15:18
I attached the patch and then it disappeared... so here it is again ;)
Attachment Size
block-box-get.patch 1.56 KB
And it worked, everything seems ok now.
(and the sql statement appears to be more "cleaner" and optimized)
Thks
Comment #8
drupallfm CreditAttribution: drupallfm commentedI know that this may not belong to this issue, but is regarding pgsql 8.3
please see this http://drupal.org/node/263737
Comment #9
Damien Tournoud CreditAttribution: Damien Tournoud commented#263737 has nothing to do with this, but is another critical bug for PostgreSQL (that definitely needs more testers).
Comment #10
Paul Natsuo Kishimoto CreditAttribution: Paul Natsuo Kishimoto commentedTested #3, which fixes the bug for me. I can now access /admin/build/block/configure/block/[bid] without errors. My platform is:
Per David_Rothstein's remark at http://drupal.org/node/220064#comment-850768 this seems to be RTBC.
Thanks for all the effort in #220064: Ensure block delta is class safe and this issue to improve PostgreSQL support!
Comment #11
Gábor HojtsyCommitted to Drupal 6, thanks!
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #13
David_Rothstein CreditAttribution: David_Rothstein commentedOops, this one was supposed to go into Drupal 5.x too.
Attached is the patch for 5.x; the functions that use this code are essentially the same in 5.x and 6.x, and I have tested that admin-created blocks still work fine after this patch. So I think it's RTBC.
Comment #14
drummCommitted to 5.x.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #16
k4ml CreditAttribution: k4ml commentedI ran into this again today. Running Drupal 5.14 with PostgreSQL 8.3.3. The previous patch in #13 still use delta = %d in block_box_delete_submit function. I've check the schema and it's a varchar and hence the error when deleting the block.
The code suppose to be:-
I try to run update.php in case there's schema changes but no update available from 5.14 upgrade. To reproduce, I just add a new block through admin/build/block and then delete the block. The block is deleted but an error message displayed:-
Comment #17
David_Rothstein CreditAttribution: David_Rothstein commentedThanks! I verified that the patch makes sense and works (and also verified that this issue is limited to Drupal 5.x only).
As a tip for the future, please set issues to 'patch (code needs review)' when you provide a patch that is ready for review. A lot of people don't pay attention to an issue if it's still marked as 'closed'...
Comment #18
drummCommitted to 5.x.