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.
Yep.
Comment | File | Size | Author |
---|---|---|---|
#18 | forum_shadow_restore_2.patch | 9.93 KB | Freso |
#15 | forum_shadow_restore_1.patch | 9.93 KB | chx |
#6 | forum_shadow_restore_0.patch | 9.75 KB | chx |
#5 | forum_shadow_restore.patch | 10.38 KB | chx |
#1 | forum_26.patch | 1.3 KB | chx |
Comments
Comment #1
chx CreditAttribution: chx commentedYuck. I think forum_nodeapi wins the stupidity contest. Note for example how line 258 adds term_id as a value and yet the foreach on line 249 called for term_ids in keys...
Comment #2
Freso CreditAttribution: Freso commentedOn freshly CVS updated Drupal 6 install, I tried to enable forum module, create two fora ("Test 1" and "Test 2") and then created a forum topic ("Test: Shadow post from forum Test 1 to forum Test 2"). I then went to edit and moved it from "Test 1" to "Test 2" and checked the box saying "Leave shadow copy". This resulted in the forum topic appearing under "Test 2" and not under "Test 1".
I then fetched and (cleanly) applied the patch. Then I created the forum topic "Test #2: Shadow post from forum Test 1 to forum Test 2", again editing after saving it, moving it from "Test 1" to "Test 2" while checking "Leave shadow copy". This time, the entry appears under both "Test 1" and "Test 2".
As far as I can tell, this patch fixes the bug.
Comment #3
chx CreditAttribution: chx commentedAlas. This topic has been moved does not appear in the topic list. So , CNW.
Comment #4
chx CreditAttribution: chx commentedOh dear. The old forum table held valuable information about the forum topics -- their actual tid. http://drupal.org/node/20295 does not even mention shadow, just dropped the table. Which also means that this drop is totally, absolutely wrong because shadow copy information will be lost. You can't deduce from term_node which is the current topic where the forum node lives.
Comment #5
chx CreditAttribution: chx commentedAside from fixing this terrible mess I enrolled a modified fgm and webchick patch from http://drupal.org/node/172633 as those changes are indeed badly needed. I fixed all occurences of tn.nid = n.nid I could find as I went inc. node_search .
Comment #6
chx CreditAttribution: chx commentedOK, I removed the node search fix, submitting another issue.
Comment #7
chx CreditAttribution: chx commentedFinal note before collapsing back to bed: the forum.schema is from an earlier HEAD so it's quite OK.
Comment #8
meba CreditAttribution: meba commentedNot sure what are the conditions to test this, but I installed D6, enabled Forum module, added some containers and forums, then created a forum topic and moved it to another forum. Succesfully moved, this forum topic has "This topic has been moved" in old forum.
Comment #9
chx CreditAttribution: chx commentedGiven meba's comments and my observation that shadow only is displayed when you are leaving behind a shadow, not otherwise, we are fine here.
Comment #10
meba CreditAttribution: meba commentedI agree, it works as expected.
Comment #11
webchickHey, wait a sec...
Restoring the forum table will roll-back the feature in 6.x that allows you to place any node type (poll, event, etc.) into a forum, will it not?
Comment #12
chx CreditAttribution: chx commentedNo. Why it would? forum table is just nid,vid,tid. And it's in nodeapi.
Comment #13
catchMight be a silly question, but why not only store the "shadow" threads in {forum} - that would save bringing back the additional insert that the node types patch removed nearly all the time wouldn't it?
Comment #14
Dries CreditAttribution: Dries commentedIt would be great to add some code comments before this statement:
+ if ($topic->forum_tid != $variables['tid']) {
Comment #15
chx CreditAttribution: chx commentedI have not written that part it's already in core and yet the patch is held back over a comment to that? :(
Comment #16
Dries CreditAttribution: Dries commentedchx: that's correct. There is nothing wrong with holding a patch back, and taking the opportunity to improve the overall quality of core. That's what we are here for not? :-)
Comment #17
chx CreditAttribution: chx commentedYeah, I know. But, I have written a three line comment at the place you asked for, so what holds it now?
Comment #18
Freso CreditAttribution: Freso commentedThis is very, very, very minor, but thought I might as well mention it:
(in the newly added comment) - The topic appears in two topics? I believe this should be "the topic appear in two forums" and the attached patch changes that, and nothing else, in Károly's latest patch.Comment #19
chx CreditAttribution: chx commentedAh yes. I mix'd up those, thanks.
Comment #20
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #21
(not verified) CreditAttribution: commentedComment #22
salvisA piece of this fix is still missing — see #422218: $node->tid can get the wrong tid if a forum content type has additional vocabularies