1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 SQL query to convert a categorie to a forum?

Discussion in 'Troubleshooting and Problems' started by Luxus, Mar 25, 2013.

  1. Luxus

    Luxus Well-Known Member

    Is it possible to convert a categorie to a forum? I can delete the categorie and create a new forum, but don't want to lose the node ID as I did some template conditionals and CSS for that node.
  2. James

    James Well-Known Member

    Surely you can just change the node id in the css if it's node specific? Category css and node css would be different anyway, so it may be useless.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    They are separate data types in XenForo. You should delete and recreate. After deleting you can go into the xf_node table and reset the autoincrement value to reclaim the same node_id upon creation of the next node.
    Luxus likes this.
  4. Luxus

    Luxus Well-Known Member

    The node ID I wish to retain is 15. Here is what I did:

    - Deleted the categorie with node ID 15
    - Set the auto increment to 15


    - Created a new forum, expecting the node ID to be 15

    But the forum got 32 as node ID, so changing the auto increment didn't have an effect. After that the auto increment value became 33. What did I wrong?

    Edit: Actually the auto increment new value was not applied when saving.
  5. Chris D

    Chris D XenForo Developer Staff Member

    I'm not sure what dependencies the node_id has... I would have thought it should be safe to manually change the ID to 15.
  6. Luxus

    Luxus Well-Known Member

    Actually, I did that first, but then the forum was not accessible anymore and in the ACP it says the forum does not exist. I changed it back and everything was ok.
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I assumed the deleted node was the highest node_id (most recently created). You can't set the autoincrement value to be in the middle of the current range of ids.

    Just change the ids in your CSS.
    Luxus likes this.

Share This Page