Comments

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Simple change.

dries’s picture

Version: 8.x-dev » 7.x-dev

Committed to 8.x. I think this may need backporting to Drupal 7, so moving to 7.x for consideration.

droplet’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new432 bytes
larowlan’s picture

Status: Needs review » Reviewed & tested by the community

And again.

tstoeckler’s picture

Seems 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.

tim.plunkett’s picture

Issue tags: +Needs backport to D7

Fixing tag.

David_Rothstein’s picture

Version: 7.x-dev » 8.x-dev
Status: Reviewed & tested by the community » Needs work

As 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.

David_Rothstein’s picture

Status: Needs work » Needs review
StatusFileSize
new1.06 KB

While 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.

yurtboy’s picture

StatusFileSize
new62.18 KB

Applied 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

Notice: Undefined property: Drupal\node\Node::$new_replies in template_preprocess_forum_topic_list() (line 1187 of /home/alfred/Sites/d8/drupal/core/modules/forum/forum.module).

[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.

Anonymous’s picture

I 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.

Status: Needs review » Needs work

The last submitted patch, 8: forum-shadow-duplicated-1578998-8.patch, failed testing.

David_Rothstein’s picture

Issue summary: View changes
Status: Needs work » Needs review
StatusFileSize
new1.2 KB

Rerolled 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.

jhedstrom’s picture

re #13 do you mean an automated test, or manual testing?

jhedstrom’s picture

#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.

mgifford’s picture

Re-uploading prior patch for the bots.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Dries committed 6f760ac on 8.3.x
    - Patch #1578998 by droplet: move forum topic and leave shadow cause...

  • Dries committed 6f760ac on 8.3.x
    - Patch #1578998 by droplet: move forum topic and leave shadow cause...

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Dries committed 6f760ac on 8.4.x
    - Patch #1578998 by droplet: move forum topic and leave shadow cause...

  • Dries committed 6f760ac on 8.4.x
    - Patch #1578998 by droplet: move forum topic and leave shadow cause...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Munavijayalakshmi’s picture

StatusFileSize
new1.2 KB

Rerolled the patch.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

  • Dries committed 6f760ac on 9.1.x
    - Patch #1578998 by droplet: move forum topic and leave shadow cause...

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
quietone’s picture

Version: 9.3.x-dev » 8.0.x-dev
Status: Needs review » Fixed
Issue tags: -Needs backport to D7 +Bug Smash Initiative

This 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.

Status: Fixed » Closed (fixed)

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