Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
forum.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 May 2012 at 07:53 UTC
Updated:
1 Apr 2022 at 09:09 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #1
larowlanSimple change.
Comment #2
dries commentedCommitted to 8.x. I think this may need backporting to Drupal 7, so moving to 7.x for consideration.
Comment #3
droplet commentedComment #4
larowlanAnd again.
Comment #5
tstoecklerSeems like this could use some tests, or at least a description of exactly what was broken before. Reading the surrounding code does not reveal that.
Comment #6
tim.plunkettFixing tag.
Comment #7
David_Rothstein commentedAs far as I can tell, this patch is relying on an accidental ordering of the database query in order to work. Which means that as soon as the query is actually ordered by something else, it breaks.
For example, you can click on any of the tablesort headers on the forum listing, and by doing that the node will flip back and forth between being displayed as a regular topic and shadow topic...
To be honest, that behavior is significantly less broken than what came before, so maybe this patch is an improvement anyway :) But we should be able to come up with a complete fix for this bug.
Comment #8
David_Rothstein commentedWhile looking into it, it seemed to me that something like the attached patch would actually be a correct fix.
I added some code comments to try to explain what's going on, but agree with @tstoeckler that tests would be a good idea here too. This is a pretty confusing area of the codebase, and it's easy to break.
Comment #9
yurtboy commentedApplied Cleanly
Checking patch core/includes/common.inc...
Hunk #1 succeeded at 4180 (offset -45 lines).
Hunk #2 succeeded at 4256 (offset -45 lines).
Hunk #3 succeeded at 4273 (offset -45 lines).
Applied patch core/includes/common.inc cleanly.
Did some testing on the interface
Made Forum Destination
Made Topic
Moved and set shadow for Destination
Came back to General Discussion to see if one copy of the shadow forum topic was there and noted this error
[SEE ATTACHED]
I then reset branch to see if this existed prior to the patch
And it did which is I assume related to the link above.
Comment #10
Anonymous (not verified) commentedI had bugs mentioned here with 7.19. Applying patch from #8 by hand along with patch at #1123866: PHP notice when moving a forum topic and leaving behind a shadow copy fixed both.
Comment #13
David_Rothstein commentedRerolled the patch for Drupal 8 - not sure how possible it is to test given that #2390065: Moving a forum with "Leave shadow copy" checked should leave a copy in the original forum happens in Drupal 8 also.
Comment #14
jhedstromre #13 do you mean an automated test, or manual testing?
Comment #15
jhedstrom#2390065: Moving a forum with "Leave shadow copy" checked should leave a copy in the original forum now has a test that illustrates the failure, and may be good enough for this issue too.
Comment #16
mgiffordRe-uploading prior patch for the bots.
Comment #24
Munavijayalakshmi commentedRerolled the patch.
Comment #33
quietone commentedThis issue was committed in May 2012 and then re-opened to make improvements. Instead of re-opening a closed issue and potentially having more than one commit for the same issue let's close this and make a follow up.
Made the followup #3270283: Duplicate topics show in list when forum moved with leave shadow. Therefor, marking this as fixed at the time the commit was made.