Drupal 5.7 has been released and is a bug-fix release.

Below are the patches with few corrections to apply cleanly (without warnings about line offsets). Only changed patches are attached.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

druvision’s picture

Category: bug » task
Status: Active » Needs review
druvision’s picture

One out of 5 hunks failed for block_cache.patch in Drupal 5.7 -
block_cache.patch is missing.

GoofyX’s picture

Are you sure you do it correctly? I just tried in a new drupal-5.7 dir (after decompressing drupal-5.7.tar.gz) and all patches except the ones in the issue description apply cleanly, with no failed hunks, that's why I did not include them in the first place. Have you used the right -p patch parameter?

jason.fisher’s picture

comment_cache.patch failed against comment.module here with 5.7:

# patch -p0 < sites/all/modules/advcache/comment_cache.patch
patching file ./modules/comment/comment.module
Hunk #4 FAILED at 1033.
Hunk #5 succeeded at 1099 (offset 9 lines).
Hunk #6 succeeded at 2069 (offset 9 lines).
1 out of 6 hunks FAILED -- saving rejects to file ./modules/comment/comment.module.rej

comment.module.rej contents (patch < sites/all/modules/advcache/comment_cache.patch was the same result)

***************
*** 1002,1022 ****
$query .= ' ORDER BY SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))';
}
}
-
// Start a form, for use with comment control.
$result = pager_query($query, $comments_per_page, 0, $query_count, $query_args);
- if (db_num_rows($result) && (variable_get('comment_controls', COMMENT_CONTROLS_HIDDEN) == COMMENT_CONTROLS_ABOVE || variable_get('comment_controls', COMMENT_CONTROLS_HIDD
EN) == COMMENT_CONTROLS_ABOVE_BELOW)) {
$output .= drupal_get_form('comment_controls', $mode, $order, $comments_per_page);
}

$divs = 0;
$last_depth = 0;
drupal_add_css(drupal_get_path('module', 'comment') .'/comment.css');
while ($comment = db_fetch_object($result)) {
$comment = drupal_unpack($comment);
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
$comment->depth = count(explode('.', $comment->thread)) - 1;

if ($mode == COMMENT_MODE_THREADED_COLLAPSED || $mode == COMMENT_MODE_THREADED_EXPANDED) {
if ($comment->depth > $last_depth) {
$divs++;
--- 1033,1064 ----
$query .= ' ORDER BY SUBSTRING(c.thread, 1, (LENGTH(c.thread) - 1))';
}
}
// Start a form, for use with comment control.
$result = pager_query($query, $comments_per_page, 0, $query_count, $query_args);
+ $comment_count = db_num_rows($result);
+ }
+
+
+ if ($comment_count && (variable_get('comment_controls', COMMENT_CONTROLS_HIDDEN) == COMMENT_CONTROLS_ABOVE || variable_get('comment_controls', COMMENT_CONTROLS_HIDDEN) ==
COMMENT_CONTROLS_ABOVE_BELOW)) {
$output .= drupal_get_form('comment_controls', $mode, $order, $comments_per_page);
}

$divs = 0;
$last_depth = 0;
drupal_add_css(drupal_get_path('module', 'comment') .'/comment.css');
+
+ if (empty($comments)) {
+ $comments = array();
while ($comment = db_fetch_object($result)) {
$comment = drupal_unpack($comment);
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
$comment->depth = count(explode('.', $comment->thread)) - 1;
+ $comments[] = $comment;
+ }
+ cache_set($cache_key, 'cache_comment', serialize($comments));
+ }

+ foreach ($comments as $comment) {
if ($mode == COMMENT_MODE_THREADED_COLLAPSED || $mode == COMMENT_MODE_THREADED_EXPANDED) {
if ($comment->depth > $last_depth) {
$divs++;

GoofyX’s picture

Have you tried the comment_cache.patch attached here or from the latest development version of the module?

osminogin’s picture

block_cache.patch not apply cleanly too.

GoofyX’s picture

Could you dump the output here? What are the commands you used?

robertDouglass’s picture

Thanks for continuing to work on this. When people are testing, make sure you test against 5.7.

SocialNicheGuru’s picture

i applied the patches to 5.8 and this is what I got:

block_cache does not work.

>:~/domains/dev.activelyout.com/html$ patch -Rp0 < sites/all/modules/advcache/block_cache.patch
patching file modules/block/block.module
Hunk #4 FAILED at 641.
Hunk #5 FAILED at 682.
2 out of 5 hunks FAILED -- saving rejects to file modules/block/block.module.rej

>:~/domains/dev.activelyout.com/html$ patch < sites/all/modules/advcache/newpatches/node_cache.patch
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur ../drupal/modules/node/node.module ./modules/node/node.module
|--- ../drupal/modules/node/node.module 2007-09-29 19:41:28.000000000 -0400
|+++ ./modules/node/node.module 2007-12-10 12:35:15.489649433 -0500
--------------------------
File to patch: modules/node/node.module
patching file modules/node/node.module
Hunk #1 succeeded at 541 (offset 40 lines).
Hunk #2 succeeded at 603 (offset 40 lines).
Hunk #3 succeeded at 2034 (offset 40 lines).

>:~/domains/dev.activelyout.com/html$ patch < sites/all/modules/advcache/newpatches/path_cache.patch
can't find file to patch at input line 4
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur ../drupal/includes/common.inc ./includes/common.inc
|--- ../drupal/includes/common.inc 2007-10-17 17:28:59.000000000 -0400
|+++ ./includes/common.inc 2007-12-10 12:35:59.492156947 -0500
--------------------------
File to patch: includes/common.inc
patching file includes/common.inc
Hunk #1 succeeded at 1296 (offset 3 lines).
can't find file to patch at input line 15
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur ../drupal/includes/path.inc ./includes/path.inc
|--- ../drupal/includes/path.inc 2006-12-23 17:04:52.000000000 -0500
|+++ ./includes/path.inc 2007-12-10 12:35:59.492156947 -0500
--------------------------
File to patch: includes/path.inc
patching file includes/path.inc
can't find file to patch at input line 144
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|diff -Naur ../drupal/modules/path/path.module ./modules/path/path.module
|--- ../drupal/modules/path/path.module 2007-05-20 20:52:28.000000000 -0400
|+++ ./modules/path/path.module 2007-12-10 12:35:59.492156947 -0500
--------------------------
File to patch: modules/path/path.module
patching file modules/path/path.module

robertDouglass’s picture

Status: Needs review » Fixed

Please focus work now on making a DRUPAL-5-8 version of the block patch. http://drupal.org/node/282301

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.