CNS topic move
Posted
#5336
(In Topic #1080)
Noticed an issue with my installation when moving a forum topic to a different forum. There is a stack trace generated complaining about the 'id' variable as undefined on line 431 of cns_topics_action2.php. Currently it reads as
Code
$topic_info[0]['id']Code
$topic_info['id']^^^^^^^^^^^^^^
Scratch all that, I committed the cardinal sin of troubleshooting: tested a solution without recreating the exact steps that lead to the original error. Can I blame it on aging?
Here's what's happening:
- Post in forum that has default access rights for the Regular group
- Move post
- Select destination with same permissions, selecting or not selecting redirect has no impact on results
- After clicking move topic one is presented with the stack trace
- Looking back at the forumview page, the move has not happened (strack trace is pre action)
- Hit refresh and click resend
- No stack track, no warnings
- Looking back at the forumview page: the move has happened but a redirect of sorts exists in the Last Post column: the link is clickable and the destination correct
- Going into the forum itself reports no posts
Code
PHP NOTICE [8] Undefined index: id in sources/cns_topics_action2.php on line 431 (version: 10.0.25, PHP version: 7.2.17, URL: /forum/index.php?page=topics&type=_move_topic&id=32)Lastly, and not sure if this is by design, after deleting the actual posts, I was left with this (General Chat was where the posts were moved from, Site Feedback the destination and where I deleted them):
A manual Tools -> Website cleanup tools -> Forum was required to set things straight again.
Thanx!
Last edit: by SoccerDad
Posted
I did a slightly different fix a while back from an automated error report I saw:
https://github.com/ocproducts/composr/commit/dcb6208197c5c476106e2d938be7cf2bf2d31e77#diff-a25f879bc9b00d68935006028336366b
Only affects when moving 1 single topic.
1 guest and 0 members have recently viewed this.
