Link Thread to Event with Poll - Poll gone

Discussion in 'Bug Reports' started by Axel B, Nov 21, 2015.

  1. Axel B

    Axel B Active Member

    Hi Jeremy,

    Today I linked an existing Thread with a Poll to an existing Event. The Poll disappears. I removed the Thread_ID with phpMyAdmin but unfortunately the Poll is still gone.

    1. How can I get the Poll back in the thread?
    2. Is it possible to keep a Poll when linked to an Event?

    Thanks in advance!
     
  2. Jeremy

    Jeremy Administrator Staff Member

    You need to change the discussion type back to poll on the thread.

    Although a future enhancement possibility, I believe at this time, I'm going to just association of threads that are already distinct discussion types.
     
    Axel B likes this.
  3. Bob B

    Bob B New Member

    You also need to edit the thread record and set the 'discussion_type' field to 'poll' (its probably either set to 'event' or empty). That field is used to determine the content type that the discussion thread is associated with. Core XenForo sets the discussion_type to 'poll' for threads with polls.

    no. As mentioned above, there is a field in the thread record called 'discussion_type' which again is used to determine the content type associated with the thread. Core XenForo sets the discussion_type to 'poll' for threads with polls. When you associate an existing thread with an addon like the FS Events, the XF RM, Showcase etc, those addons set a discussion_type key eg 'resource', 'event', 'showcase' etc...
     
  4. Kintaro

    Kintaro Member

    Bob B what happen if Axel B manually change the content type of the linked thread to Poll? It will lose the link?
     
  5. Bob B

    Bob B New Member

    He specifically asked how to get the POLL back on that thread. I answered that. If he edits the thread record and sets the 'discussion_type' back to 'poll', the poll that is associated with that thread will now be part of that thread again. Obviously, from the Discussion Thread side of things, there is no more association with the Event. However, when doing things MANUALLY like this (editing fields in tables directly), you also need to make sure you handle EVERYTHING that is involved (which he failed to do). There are TWO parts to associated discussion threads with addons. Part 1 is in the THREAD record (which I've mentioned is setting the 'discussion_type' to the content type that is being associated and the other is a field in the content type itself (event record in this case) which stores the THREAD ID.

    POLLS are content that is associated with a discussion thread (they are not PART of the thread). They use the 'discussion_type' field (the key is 'poll'). Only ONE discussion_type can be set, ie, you can't have both 'poll' and 'event' set at the same time (hence why you can't associate a thread with a Poll to another content type (well, you can, but you have to unassociate the poll in order to do so).
     
    Kintaro likes this.
  6. Axel B

    Axel B Active Member

    Bob B thanks! I now understand how this works, how to correct it and why a poll cannot be combined with an event.
    Jeremy, I hope you can put it on your list to make it possible to have an event and a poll in one thread ;)
     
    Bob B likes this.

Share This Page