• 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?

Luxus

Well-known member
#1
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.
 

James

Well-known member
#2
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.
 

Jake Bunce

XenForo moderator
Staff member
#3
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

Well-known member
#4
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

node.png

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

Chris D

XenForo developer
Staff member
#5
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.
 

Luxus

Well-known member
#6
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.
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.
 

Jake Bunce

XenForo moderator
Staff member
#7
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.