Better Blogs Importer

Better Blogs Importer 1.6.0 Beta

No permission to download
You're probably judging by the snippet if you're referring to query results. If you click one of the title texts twice, you'll see the full text.
No, it is not. I found some of these articles on the old version of the forum and checked. Titles do not even have 100 points.
For example (86 characters):

SQL-запрос - Adminer 2020-06-09 17-06-56.webp
1591704470315.webp

Something's wrong...
 
OK. Previous query was counting bytes and a UTF-8 character is usually 2 bytes so that's the reason. This query will count characters and show you the correct entries:
SQL:
SELECT * FROM xfa_blog_entry WHERE CHAR_LENGTH(title) > 150
 
This importer does not cover redirects. But there should be a table named mf_blog_import_log in your database that holds the record of old and the new blog entry ids. So it's very possible to do a redirection script.
 
This importer does not cover redirects. But there should be a table named mf_blog_import_log in your database that holds the record of old and the new blog entry ids. So it's very possible to do a redirection script.
Thank you for the answer! Yes, I can find in the database records with old entry ids, but I already have more than 5K entry’s, so I should do 301 redirect manually for each blog entry. If I can save old entry ids than I can simply add one line in my htaccess file.
 
I'm getting this error. Any idea why this may be happening?

Code:
InvalidArgumentException: Attempted to convert NULL to integer [create_date] in src/XF/Mvc/Entity/Entity.php at line 759
XF\Mvc\Entity\Entity->_castValueToType() in src/XF/Mvc/Entity/Entity.php at line 637
XF\Mvc\Entity\Entity->set() in src/XF/Mvc/Entity/Entity.php at line 739
XF\Mvc\Entity\Entity->bulkSet() in src/addons/MF/BetterBlogsImporter/Admin/Controller/ImportBlogs.php at line 995
MF\BetterBlogsImporter\Admin\Controller\ImportBlogs->insertBlog() in src/addons/MF/BetterBlogsImporter/Admin/Controller/ImportBlogs.php at line 346
MF\BetterBlogsImporter\Admin\Controller\ImportBlogs->processBlogs() in src/addons/MF/BetterBlogsImporter/Admin/Controller/ImportBlogs.php at line 137
MF\BetterBlogsImporter\Admin\Controller\ImportBlogs->actionImport() in src/addons/MF/BetterBlogsImporter/Admin/Controller/ImportBlogs.php at line 79
MF\BetterBlogsImporter\Admin\Controller\ImportBlogs->actionIndex() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2300
XF\App->run() in src/XF.php at line 465
XF::runApp() in admin.php at line 13
 
The old add-on accepts NULL as create date where the new one doesn't. One of your options is to update create_date column to 0 in the old addon table because that's default in the new addon. Beware of blog dates tho. Some blogs may show the create date as 1970.
You can run this query:
SQL:
update xfa_blog set create_date = 0 where create_date is null
Or this one if you want to set a random date other than 0, like now, 2021. You won't see 1970 but the date shown(2021) will not be correct.
SQL:
update xfa_blog set create_date = 1612813860 where create_date is null
Take a backup before running anything as you should have by now.
 
The old add-on accepts NULL as create date where the new one doesn't. One of your options is to update create_date column to 0 in the old addon table because that's default in the new addon. Beware of blog dates tho. Some blogs may show the create date as 1970.
You can run this query:
SQL:
update xfa_blog set create_date = 0 where create_date is null
Or this one if you want to set a random date other than 0, like now, 2021. You won't see 1970 but the date shown(2021) will not be correct.
SQL:
update xfa_blog set create_date = 1612813860 where create_date is null
Take a backup before running anything as you should have by now.

When you say "old add on" do you mean the old UBS add-on? If so would it be best for me to uninstall, remove the tables, and then just re-install an older version? Or would those versions not work with 2.2.1 which is my XF 2 version.
 
OK. Previous query was counting bytes and a UTF-8 character is usually 2 bytes so that's the reason. This query will count characters and show you the correct entries:
SQL:
SELECT * FROM xfa_blog_entry WHERE CHAR_LENGTH(title) > 150

Would it be possible to modify the database schema and change that column to varchar(149) --- would that cause the excessive entries to be truncated automatically or only new entries after the schema is changed?
 
Top Bottom