CNS topic move


Item has a rating of 5 (Liked by Chris Graham)
#5781 (In Topic #1361)
Standard member
SoccerDad is in the usergroup ‘Community saint’

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


Changing this to


appears to make the issue go away.


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:

  1. Post in forum that has default access rights for the Regular group
  2. Move post
  3. Select destination with same permissions, selecting or not selecting redirect has no impact on results
  4. After clicking move topic one is presented with the stack trace
  5. Looking back at the forumview page, the move has not happened (strack trace is pre action)
  6. Hit refresh and click resend
  7. No stack track, no warnings
  8. 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
  9. Going into the forum itself reports no posts


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.


Last edit: by SoccerDad

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved
Online now: No Back to the top


Site director
Chris Graham is in the usergroup ‘Administrators’
Thanks for the detailed report and fix.
I did a slightly different fix a while back from an automated error report I saw:
Fix issue moving one single forum topic, problem with sitemap rebuild… · ocproducts/composr@dcb6208 · GitHub
Only affects when moving 1 single topic.

Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.


Users online:

Philip, John Connor, Vaiva, gabriel58, mytracker, MVLipwig

Forum statistics:
  • 1,253 topics, 5,783 posts, 6,946 members
  • Our newest member is Endoflease
Back to Top