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

XF 1.5 Title length problem after importing

#1
I just imported an old phpbb forum with max title length of 250 chars, then i realized that a lot of thread titles are truncated to 50 chars.
So i modified XenForo to set the limit to 250 chars

Now obviously i have to import from phpBB again to fix the thread titles. The problem is that there's a warning saying the forum must be empty before using import feature but now there's already thousands of posts, threads, users, etc (since i already completed the import process previously)

What's the easiest solution beside starting over and losing hours of work customizing the forum ?

Maybe i could run a SQL query to fix the titles by updating xf_thread based on threads titles from phpbb database ? I still have the "archived_import_log" table but i have no idea how i can use it to fix my issue.

Would really appreciate some help with this. Thanks !
 
#3
It should be possible to update the thread titles now with a custom script.
How ? Can someone help me with this ? I'll pay if i have to.

If i can't get this fixed i won't be able to upgrade to XenForo because i'm upgrading an old phpbb legal music sharing forum where thread titles are the band name and albums, requiring more than 50 chars. With thread titles limited to 50 characters the whole website is messed up. I'm working on a local dev server and waiting until the conversion is complete before buying another license for this website and making it live production. After spending so much time on the configuration, starting over again isn't an option unfortunately

You should have taken a backup before doing the import, as explained here: https://xenforo.com/community/threads/importing-guidelines.25325/
I appreciate the time you put writing this, but honestly there should be a warning in the admin UI during the import process instead of just in a tutorial that no one knows about. I even asked in the forum how to import from phpBB before doing it and i've just been told that it's straightforward with built-in import. Definetly not as easy as people say. It's a big issue since it can cause the loss of everything if you have to start over, there should be clear warnings.
 
#4
So i modified XenForo to set the limit to 250 chars
Hi, I am new to XenForo, so not sure how to solve your issue.

I am facing similar issue.

I would like to ask you how did you increase Title length limit to 250 ? Is there any such option in admin panel ?

(I imported data from vBulletin and I see that few Titles are truncated, as Title length limit in XenForo is 100 characters.)
 
#5
Good luck to get support here. Most of my questions never get any real support.

I had to edit the database to increase title length to 250 but looks like there's an addon here https://xenforo.com/community/resources/cz-modify-title-length.5517/
Can't believe this isn't built-in in XenForo. It should at least be asking for max thread title length before importing. I know some MySQL version are limiting to 50chars but at least provide the option for the vast majority of users running later versions of mysql.

Since you already imported data from vBulletin it means you messed up your whole forum and you have to start over because at this point there's no way to fix the issue. This is so frustrating and there's not even a warning about this during the import process even if it's a major issue for users upgrading.

To fix the thread title length without having to start over, i had to write my own php code to fix the thread titles. If you are a coder you may be able to modify this and adapt it to the forum you are importing from (i was importing from phpbb with this).

Code:
<?php
die();
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
include("mysql2i.class.php");
$dbname = ".....";
$dbuser = "......";
$dbpasswd = '......';
$dbhost = "localhost";
mysql_connect($dbhost, $dbuser, $dbpasswd) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());
mysql_set_charset('utf8');

    $query = "SELECT * FROM xf_thread WHERE length(title) >= 100";
        $res = mysql_query($query) or die(mysql_error());
        while($row = mysql_fetch_array($res)) {
        $thread_id = $row["thread_id"];
        $thread_title = $row["title"];
        echo "Xenforo thread title: $thread_title<br>";

                $phpbb_dbname = "........";
                $phpbb_dbuser = "............";
                $phpbb_dbpasswd = '...........';
                $phpbb_dbhost = "localhost";
                mysql_connect($phpbb_dbhost, $phpbb_dbuser, $phpbb_dbpasswd) or die(mysql_error());
                mysql_select_db($phpbb_dbname) or die(mysql_error());
                mysql_set_charset('utf8');
                    $phpbb_query = "SELECT * FROM phpbb_topics WHERE topic_id = $thread_id LIMIT 1";
                    $phpbb_res = mysql_query($phpbb_query) or die(mysql_error());
                    while($phpbb_row = mysql_fetch_array($phpbb_res)) {
                    $phpbb_thread_id = $phpbb_row["topic_id"];
                    $phpbb_thread_title = mysql_real_escape_string($phpbb_row["topic_title"]);
                    echo "phpBB thread title: $phpbb_thread_title<br>";

                    mysql_connect($dbhost, $dbuser, $dbpasswd) or die(mysql_error());
                    mysql_select_db($dbname) or die(mysql_error());
                    mysql_set_charset('utf8');
                    $fix_title_query = "UPDATE xf_thread SET title = '$phpbb_thread_title' WHERE thread_id = '$thread_id'";
                    echo $fix_title_query."<hr>";
                    $fix_title_res = mysql_query($fix_title_query) or die(mysql_error());
                    }

        }
I'm soon building my third XenForo website and i faced this problem on every single forum. I learnt from my mistakes but new users will face this problem too.
 
#6
Thank You so much.

Yes. This should have been built-in in XenForo (it was built-in in VBulletin).

I think that Plugin mentioned by you may solve my problem for now.

I did only a test import of data in a temporary installation of XenForo, and then observed this Title truncate problem.

Now, planning to do actual installation & import of data.

This is my plan :

1) Install XenForo

2) Install above Modify Title plugin.

3) Change Title length to 200 using this plugin.

4) Import data from vBulletin.

I hope this is the right plan to solve Title length problem.

Did you observe anymore such problems after importing data ?